summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2009-04-15 23:10:43 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2009-04-15 23:10:43 -0700
commitbb974d5a47b05163d1286ea3e4e41d26b40f7de3 (patch)
tree2564c9e44dfcbafcf01449aaeaba19eab1d6573a /src/cpu
parent7617dcf736b5b96d44aedccd51550be037e7b937 (diff)
downloadgem5-bb974d5a47b05163d1286ea3e4e41d26b40f7de3.tar.xz
o3: fix {read,set}ArchFloatReg* functions.
Register indices were not being calculated properly.
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/o3/cpu.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 6a39f07be..83a012164 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1283,7 +1283,7 @@ template <class Impl>
float
FullO3CPU<Impl>::readArchFloatRegSingle(int reg_idx, unsigned tid)
{
- int idx = reg_idx + TheISA::FP_Base_DepTag;
+ int idx = reg_idx + TheISA::NumIntRegs;
PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx);
return regFile.readFloatReg(phys_reg);
@@ -1293,7 +1293,7 @@ template <class Impl>
double
FullO3CPU<Impl>::readArchFloatRegDouble(int reg_idx, unsigned tid)
{
- int idx = reg_idx + TheISA::FP_Base_DepTag;
+ int idx = reg_idx + TheISA::NumIntRegs;
PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx);
return regFile.readFloatReg(phys_reg, 64);
@@ -1303,7 +1303,7 @@ template <class Impl>
uint64_t
FullO3CPU<Impl>::readArchFloatRegInt(int reg_idx, unsigned tid)
{
- int idx = reg_idx + TheISA::FP_Base_DepTag;
+ int idx = reg_idx + TheISA::NumIntRegs;
PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx);
return regFile.readFloatRegBits(phys_reg);
@@ -1322,7 +1322,7 @@ template <class Impl>
void
FullO3CPU<Impl>::setArchFloatRegSingle(int reg_idx, float val, unsigned tid)
{
- int idx = reg_idx + TheISA::FP_Base_DepTag;
+ int idx = reg_idx + TheISA::NumIntRegs;
PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx);
regFile.setFloatReg(phys_reg, val);
@@ -1332,7 +1332,7 @@ template <class Impl>
void
FullO3CPU<Impl>::setArchFloatRegDouble(int reg_idx, double val, unsigned tid)
{
- int idx = reg_idx + TheISA::FP_Base_DepTag;
+ int idx = reg_idx + TheISA::NumIntRegs;
PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx);
regFile.setFloatReg(phys_reg, val, 64);
@@ -1342,7 +1342,7 @@ template <class Impl>
void
FullO3CPU<Impl>::setArchFloatRegInt(int reg_idx, uint64_t val, unsigned tid)
{
- int idx = reg_idx + TheISA::FP_Base_DepTag;
+ int idx = reg_idx + TheISA::NumIntRegs;
PhysRegIndex phys_reg = commitRenameMap[tid].lookup(idx);
regFile.setFloatRegBits(phys_reg, val);