O3: prevent a squash when completeAcc() modifies misc reg through TC.

This happens on ARM instructions when they update the IT state bits.
Code and associated comment was copied from execute() and initiateAcc() methods
This commit is contained in:
Min Kyu Jeong 2010-11-15 14:04:04 -06:00
parent 4a1814bd52
commit 745df74fe0

View file

@ -113,8 +113,17 @@ template <class Impl>
Fault Fault
BaseO3DynInst<Impl>::completeAcc(PacketPtr pkt) BaseO3DynInst<Impl>::completeAcc(PacketPtr pkt)
{ {
// @todo: Pretty convoluted way to avoid squashing from happening
// when using the TC during an instruction's execution
// (specifically for instructions that have side-effects that use
// the TC). Fix this.
bool in_syscall = this->thread->inSyscall;
this->thread->inSyscall = true;
this->fault = this->staticInst->completeAcc(pkt, this, this->traceData); this->fault = this->staticInst->completeAcc(pkt, this, this->traceData);
this->thread->inSyscall = in_syscall;
return this->fault; return this->fault;
} }