inorder: ISA-zero reg handling

ignore writes to the ISA zero register
This commit is contained in:
Korey Sewell 2011-06-19 21:43:34 -04:00
parent 2a59fcfbe9
commit 17f5749dbb

View file

@ -1135,10 +1135,16 @@ InOrderCPU::readFloatRegBits(RegIndex reg_idx, ThreadID tid)
void
InOrderCPU::setIntReg(RegIndex reg_idx, uint64_t val, ThreadID tid)
{
DPRINTF(IntRegs, "[tid:%i]: Setting Int. Reg %i to %x\n",
tid, reg_idx, val);
if (reg_idx == TheISA::ZeroReg) {
DPRINTF(IntRegs, "[tid:%i]: Ignoring Setting of ISA-ZeroReg "
"(Int. Reg %i) to %x\n", tid, reg_idx, val);
return;
} else {
DPRINTF(IntRegs, "[tid:%i]: Setting Int. Reg %i to %x\n",
tid, reg_idx, val);
intRegs[tid][reg_idx] = val;
intRegs[tid][reg_idx] = val;
}
}