cpu: Use PCStateBase in the checker CPU.
Change-Id: I3f07e2083f803224035198b91064806991aea16e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52056 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
@@ -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<PCStateBase> newPCState;
|
||||
bool exitOnError;
|
||||
bool updateOnError;
|
||||
bool warnOnlyOnLoadError;
|
||||
|
||||
@@ -213,12 +213,12 @@ Checker<DynInstPtr>::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<DynInstPtr>::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<DynInstPtr>::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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user