CPU: Fix O3 and possible InOrder segfaults in FS.
This commit is contained in:
parent
3f9f4bf3d6
commit
ab8d7eee76
5 changed files with 9 additions and 8 deletions
|
@ -633,7 +633,9 @@ InOrderCPU::processInterrupts(Fault interrupt)
|
|||
this->interrupts->updateIntrInfo(this->threadContexts[0]);
|
||||
|
||||
DPRINTF(InOrderCPU, "Interrupt %s being handled\n", interrupt->name());
|
||||
this->trap(interrupt, 0);
|
||||
static StaticInstPtr dummyStatic(TheISA::NoopMachInst, 0);
|
||||
static DynInstPtr dummyDyn = new Impl::DynInst(dummyStatic);
|
||||
this->trap(interrupt, dummyDyn);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1062,7 +1062,7 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num)
|
|||
// needed to update the state as soon as possible. This
|
||||
// prevents external agents from changing any specific state
|
||||
// that the trap need.
|
||||
cpu->trap(inst_fault, tid, head_inst);
|
||||
cpu->trap(inst_fault, tid, head_inst->staticInst);
|
||||
|
||||
// Exit state update mode to avoid accidental updating.
|
||||
thread[tid]->inSyscall = false;
|
||||
|
|
|
@ -926,8 +926,7 @@ FullO3CPU<Impl>::processInterrupts(Fault interrupt)
|
|||
this->interrupts->updateIntrInfo(this->threadContexts[0]);
|
||||
|
||||
DPRINTF(O3CPU, "Interrupt %s being handled\n", interrupt->name());
|
||||
DynInstPtr dummyInst;
|
||||
this->trap(interrupt, 0, dummyInst);
|
||||
this->trap(interrupt, 0, NULL);
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
|
@ -944,10 +943,10 @@ FullO3CPU<Impl>::updateMemPorts()
|
|||
|
||||
template <class Impl>
|
||||
void
|
||||
FullO3CPU<Impl>::trap(Fault fault, ThreadID tid, DynInstPtr inst)
|
||||
FullO3CPU<Impl>::trap(Fault fault, ThreadID tid, StaticInstPtr inst)
|
||||
{
|
||||
// Pass the thread's TC into the invoke method.
|
||||
fault->invoke(this->threadContexts[tid], inst->staticInst);
|
||||
fault->invoke(this->threadContexts[tid], inst);
|
||||
}
|
||||
|
||||
#if !FULL_SYSTEM
|
||||
|
|
|
@ -367,7 +367,7 @@ class FullO3CPU : public BaseO3CPU
|
|||
{ return globalSeqNum++; }
|
||||
|
||||
/** Traps to handle given fault. */
|
||||
void trap(Fault fault, ThreadID tid, DynInstPtr inst);
|
||||
void trap(Fault fault, ThreadID tid, StaticInstPtr inst);
|
||||
|
||||
#if FULL_SYSTEM
|
||||
/** HW return from error interrupt. */
|
||||
|
|
|
@ -155,7 +155,7 @@ template <class Impl>
|
|||
void
|
||||
BaseO3DynInst<Impl>::trap(Fault fault)
|
||||
{
|
||||
this->cpu->trap(fault, this->threadNumber, this);
|
||||
this->cpu->trap(fault, this->threadNumber, this->staticInst);
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
|
|
Loading…
Reference in a new issue