Avoid reading them every instruction, and also eliminate the last use of the
thread context in the decoders.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
data = inst;
offset = (fetchPC >= pc.instAddr()) ? 0 : pc.instAddr() - fetchPC;
emi.thumb = pc.thumb();
- FPSCR fpscr = tc->readMiscReg(MISCREG_FPSCR);
- emi.fpscrLen = fpscr.len;
- emi.fpscrStride = fpscr.stride;
+ emi.fpscrLen = fpscrLen;
+ emi.fpscrStride = fpscrStride;
outOfBytes = false;
process();
bool foundIt;
ITSTATE itBits;
+ int fpscrLen;
+ int fpscrStride;
+
public:
void reset()
{
foundIt = false;
}
- Decoder(ThreadContext * _tc) : tc(_tc), data(0)
+ Decoder(ThreadContext * _tc) : tc(_tc), data(0),
+ fpscrLen(0), fpscrStride(0)
{
reset();
}
return (!emi.thumb || emi.bigThumb) ? 4 : 2;
}
+ void setContext(FPSCR fpscr)
+ {
+ fpscrLen = fpscr.len;
+ fpscrStride = fpscr.stride;
+ }
+
protected:
/// A cache of decoded instruction objects.
static GenericISA::BasicDecodeCache defaultCache;
fpscrMask.n = ones;
newVal = (newVal & (uint32_t)fpscrMask) |
(miscRegs[MISCREG_FPSCR] & ~(uint32_t)fpscrMask);
+ tc->getDecodePtr()->setContext(newVal);
}
break;
case MISCREG_CPSR_Q:
}
//FPSCR
- context->setMiscRegNoEffect(MISCREG_FPSCR, gdbregs.regs[REG_FPSCR]>>32);
+ context->setMiscReg(MISCREG_FPSCR, gdbregs.regs[REG_FPSCR]>>32);
}
void