135a136,145
> void
> copyRegs(ThreadContext *src, ThreadContext *dest)
> {
> int i;
> for(i = 0; i < TheISA::NumIntRegs; i++)
> dest->setIntReg(i, src->readIntReg(i));
> for(i = 0; i < TheISA::NumFloatRegs; i++)
> dest->setFloatReg(i, src->readFloatReg(i));
> for(i = 0; i < TheISA::NumMiscRegs; i++)
> dest->setMiscRegNoEffect(i, src->readMiscRegNoEffect(i));
136a147,152
> // setMiscReg "with effect" will set the misc register mapping correctly.
> // e.g. updateRegMap(val)
> dest->setMiscReg(MISCREG_CPSR, src->readMiscRegNoEffect(MISCREG_CPSR));
>
> // Lastly copy PC/NPC
> dest->pcState(src->pcState());
137a154
> }