Take into account that the flattened integer register space is a different size than the architected one. Also fixed some asserts.
--HG-- extra : convert_revision : 26e7863919d1b976ba8cad747af475a6f18e9440
This commit is contained in:
parent
d29979b043
commit
c7bb106886
2 changed files with 17 additions and 7 deletions
|
@ -174,7 +174,7 @@ class PhysRegFile
|
|||
// Remove the base Float reg dependency.
|
||||
reg_idx = reg_idx - numPhysicalIntRegs;
|
||||
|
||||
assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
|
||||
assert(reg_idx < numPhysicalFloatRegs);
|
||||
|
||||
DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
|
||||
int(reg_idx), (uint64_t)val);
|
||||
|
@ -189,7 +189,7 @@ class PhysRegFile
|
|||
// Remove the base Float reg dependency.
|
||||
reg_idx = reg_idx - numPhysicalIntRegs;
|
||||
|
||||
assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
|
||||
assert(reg_idx < numPhysicalFloatRegs);
|
||||
|
||||
DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
|
||||
int(reg_idx), (uint64_t)val);
|
||||
|
@ -204,7 +204,7 @@ class PhysRegFile
|
|||
// Remove the base Float reg dependency.
|
||||
reg_idx = reg_idx - numPhysicalIntRegs;
|
||||
|
||||
assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
|
||||
assert(reg_idx < numPhysicalFloatRegs);
|
||||
|
||||
DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
|
||||
int(reg_idx), (uint64_t)val);
|
||||
|
@ -217,7 +217,7 @@ class PhysRegFile
|
|||
// Remove the base Float reg dependency.
|
||||
reg_idx = reg_idx - numPhysicalIntRegs;
|
||||
|
||||
assert(reg_idx < numPhysicalFloatRegs + numPhysicalIntRegs);
|
||||
assert(reg_idx < numPhysicalFloatRegs);
|
||||
|
||||
DPRINTF(IEW, "RegFile: Setting float register %i to %#x\n",
|
||||
int(reg_idx), (uint64_t)val);
|
||||
|
@ -232,11 +232,11 @@ class PhysRegFile
|
|||
|
||||
MiscReg readMiscReg(int misc_reg, unsigned thread_id)
|
||||
{
|
||||
return miscRegs[thread_id].readReg(misc_reg,
|
||||
cpu->tcBase(thread_id));
|
||||
return miscRegs[thread_id].readReg(misc_reg, cpu->tcBase(thread_id));
|
||||
}
|
||||
|
||||
void setMiscRegNoEffect(int misc_reg, const MiscReg &val, unsigned thread_id)
|
||||
void setMiscRegNoEffect(int misc_reg,
|
||||
const MiscReg &val, unsigned thread_id)
|
||||
{
|
||||
miscRegs[thread_id].setRegNoEffect(misc_reg, val);
|
||||
}
|
||||
|
|
|
@ -996,7 +996,12 @@ DefaultRename<Impl>::renameSrcRegs(DynInstPtr &inst,unsigned tid)
|
|||
if (src_reg < TheISA::FP_Base_DepTag) {
|
||||
flat_src_reg = TheISA::flattenIntIndex(inst->tcBase(), src_reg);
|
||||
DPRINTF(Rename, "Flattening index %d to %d.\n", (int)src_reg, (int)flat_src_reg);
|
||||
} else {
|
||||
// Floating point and Miscellaneous registers need their indexes
|
||||
// adjusted to account for the expanded number of flattened int regs.
|
||||
flat_src_reg = src_reg - TheISA::FP_Base_DepTag + TheISA::NumIntRegs;
|
||||
}
|
||||
|
||||
inst->flattenSrcReg(src_idx, flat_src_reg);
|
||||
|
||||
// Look up the source registers to get the phys. register they've
|
||||
|
@ -1033,8 +1038,13 @@ DefaultRename<Impl>::renameDestRegs(DynInstPtr &inst,unsigned tid)
|
|||
RegIndex dest_reg = inst->destRegIdx(dest_idx);
|
||||
RegIndex flat_dest_reg = dest_reg;
|
||||
if (dest_reg < TheISA::FP_Base_DepTag) {
|
||||
// Integer registers are flattened.
|
||||
flat_dest_reg = TheISA::flattenIntIndex(inst->tcBase(), dest_reg);
|
||||
DPRINTF(Rename, "Flattening index %d to %d.\n", (int)dest_reg, (int)flat_dest_reg);
|
||||
} else {
|
||||
// Floating point and Miscellaneous registers need their indexes
|
||||
// adjusted to account for the expanded number of flattened int regs.
|
||||
flat_dest_reg = dest_reg - TheISA::FP_Base_DepTag + TheISA::NumIntRegs;
|
||||
}
|
||||
|
||||
inst->flattenDestReg(dest_idx, flat_dest_reg);
|
||||
|
|
Loading…
Reference in a new issue