From bb974d5a47b05163d1286ea3e4e41d26b40f7de3 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 15 Apr 2009 23:10:43 -0700 Subject: [PATCH] o3: fix {read,set}ArchFloatReg* functions. Register indices were not being calculated properly. --- src/cpu/o3/cpu.cc | 12 ++++++------ 1 file 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 float FullO3CPU::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 double FullO3CPU::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 uint64_t FullO3CPU::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 void FullO3CPU::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 void FullO3CPU::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 void FullO3CPU::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); -- 2.30.2