summaryrefslogtreecommitdiff
path: root/src/cpu/thread_context.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-13 00:54:32 -0700
committerGabe Black <gabeblack@google.com>2019-01-16 20:27:47 +0000
commitcf0f625b47a8e0334fc3fe8c0c2cdf5aaaf3389e (patch)
tree75505d60b69951ec0a99ca82e8621803c95d921d /src/cpu/thread_context.cc
parent0c4515ce1ff2a4e40d243df734af2a67cb8b1ad1 (diff)
downloadgem5-cf0f625b47a8e0334fc3fe8c0c2cdf5aaaf3389e.tar.xz
cpu: dev: sim: gpu-compute: Banish some ISA specific register types.
These types are IntReg, FloatReg, FloatRegBits, and MiscReg. There are some remaining types, specifically the vector registers and the CCReg. I'm less familiar with these new types of registers, and so will look at getting rid of them at some later time. Change-Id: Ide8f76b15c531286f61427330053b44074b8ac9b Reviewed-on: https://gem5-review.googlesource.com/c/13624 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/cpu/thread_context.cc')
-rw-r--r--src/cpu/thread_context.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cpu/thread_context.cc b/src/cpu/thread_context.cc
index bf25cd65f..2d907a055 100644
--- a/src/cpu/thread_context.cc
+++ b/src/cpu/thread_context.cc
@@ -61,8 +61,8 @@ ThreadContext::compare(ThreadContext *one, ThreadContext *two)
// First loop through the integer registers.
for (int i = 0; i < TheISA::NumIntRegs; ++i) {
- TheISA::IntReg t1 = one->readIntReg(i);
- TheISA::IntReg t2 = two->readIntReg(i);
+ RegVal t1 = one->readIntReg(i);
+ RegVal t2 = two->readIntReg(i);
if (t1 != t2)
panic("Int reg idx %d doesn't match, one: %#x, two: %#x",
i, t1, t2);
@@ -70,8 +70,8 @@ ThreadContext::compare(ThreadContext *one, ThreadContext *two)
// Then loop through the floating point registers.
for (int i = 0; i < TheISA::NumFloatRegs; ++i) {
- TheISA::FloatRegBits t1 = one->readFloatRegBits(i);
- TheISA::FloatRegBits t2 = two->readFloatRegBits(i);
+ RegVal t1 = one->readFloatRegBits(i);
+ RegVal t2 = two->readFloatRegBits(i);
if (t1 != t2)
panic("Float reg idx %d doesn't match, one: %#x, two: %#x",
i, t1, t2);
@@ -87,8 +87,8 @@ ThreadContext::compare(ThreadContext *one, ThreadContext *two)
i, t1, t2);
}
for (int i = 0; i < TheISA::NumMiscRegs; ++i) {
- TheISA::MiscReg t1 = one->readMiscRegNoEffect(i);
- TheISA::MiscReg t2 = two->readMiscRegNoEffect(i);
+ RegVal t1 = one->readMiscRegNoEffect(i);
+ RegVal t2 = two->readMiscRegNoEffect(i);
if (t1 != t2)
panic("Misc reg idx %d doesn't match, one: %#x, two: %#x",
i, t1, t2);
@@ -155,7 +155,7 @@ serialize(ThreadContext &tc, CheckpointOut &cp)
{
using namespace TheISA;
- FloatRegBits floatRegs[NumFloatRegs];
+ RegVal floatRegs[NumFloatRegs];
for (int i = 0; i < NumFloatRegs; ++i)
floatRegs[i] = tc.readFloatRegBitsFlat(i);
// This is a bit ugly, but needed to maintain backwards
@@ -168,7 +168,7 @@ serialize(ThreadContext &tc, CheckpointOut &cp)
}
SERIALIZE_CONTAINER(vecRegs);
- IntReg intRegs[NumIntRegs];
+ RegVal intRegs[NumIntRegs];
for (int i = 0; i < NumIntRegs; ++i)
intRegs[i] = tc.readIntRegFlat(i);
SERIALIZE_ARRAY(intRegs, NumIntRegs);
@@ -190,7 +190,7 @@ unserialize(ThreadContext &tc, CheckpointIn &cp)
{
using namespace TheISA;
- FloatRegBits floatRegs[NumFloatRegs];
+ RegVal floatRegs[NumFloatRegs];
// This is a bit ugly, but needed to maintain backwards
// compatibility.
arrayParamIn(cp, "floatRegs.i", floatRegs, NumFloatRegs);
@@ -203,7 +203,7 @@ unserialize(ThreadContext &tc, CheckpointIn &cp)
tc.setVecRegFlat(i, vecRegs[i]);
}
- IntReg intRegs[NumIntRegs];
+ RegVal intRegs[NumIntRegs];
UNSERIALIZE_ARRAY(intRegs, NumIntRegs);
for (int i = 0; i < NumIntRegs; ++i)
tc.setIntRegFlat(i, intRegs[i]);