diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh index 70432167a0..1ed7e0d816 100644 --- a/src/cpu/checker/cpu.hh +++ b/src/cpu/checker/cpu.hh @@ -415,10 +415,10 @@ class CheckerCPU : public BaseCPU, public ExecContext ///////////////////////////////////////// void - recordPCChange(const TheISA::PCState &val) + recordPCChange(const PCStateBase &val) { changedPC = true; - newPCState = val; + set(newPCState, val); } void @@ -511,7 +511,7 @@ class CheckerCPU : public BaseCPU, public ExecContext bool changedPC; bool willChangePC; - TheISA::PCState newPCState; + std::unique_ptr newPCState; bool exitOnError; bool updateOnError; bool warnOnlyOnLoadError; diff --git a/src/cpu/checker/cpu_impl.hh b/src/cpu/checker/cpu_impl.hh index 436ef9615f..385ee2aa53 100644 --- a/src/cpu/checker/cpu_impl.hh +++ b/src/cpu/checker/cpu_impl.hh @@ -213,12 +213,12 @@ Checker::verify(const DynInstPtr &completed_inst) DPRINTF(Checker, "Changed PC recently to %s\n", thread->pcState()); if (willChangePC) { - if (newPCState == thread->pcState()) { + if (*newPCState == thread->pcState()) { DPRINTF(Checker, "Changed PC matches expected PC\n"); } else { warn("%lli: Changed PC does not match expected PC, " "changed: %s, expected: %s", - curTick(), thread->pcState(), newPCState); + curTick(), thread->pcState(), *newPCState); CheckerCPU::handleError(); } willChangePC = false; @@ -386,8 +386,8 @@ Checker::verify(const DynInstPtr &completed_inst) if (FullSystem) { fault->invoke(tc, curStaticInst); willChangePC = true; - newPCState = thread->pcState(); - DPRINTF(Checker, "Fault, PC is now %s\n", newPCState); + set(newPCState, thread->pcState()); + DPRINTF(Checker, "Fault, PC is now %s\n", *newPCState); curMacroStaticInst = nullStaticInstPtr; } } else { @@ -407,8 +407,8 @@ Checker::verify(const DynInstPtr &completed_inst) } while (oldpc != thread->instAddr()); if (count > 1) { willChangePC = true; - newPCState = thread->pcState(); - DPRINTF(Checker, "PC Event, PC is now %s\n", newPCState); + set(newPCState, thread->pcState()); + DPRINTF(Checker, "PC Event, PC is now %s\n", *newPCState); } }