Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/52056 )

 (

13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: cpu: Use PCStateBase in the checker CPU.
......................................................................

cpu: Use PCStateBase in the checker CPU.

Change-Id: I3f07e2083f803224035198b91064806991aea16e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52056
Tested-by: kokoro <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/cpu/checker/cpu_impl.hh
M src/cpu/checker/cpu.hh
2 files changed, 22 insertions(+), 9 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh
index 7043216..1ed7e0d 100644
--- a/src/cpu/checker/cpu.hh
+++ b/src/cpu/checker/cpu.hh
@@ -415,10 +415,10 @@
     /////////////////////////////////////////

     void
-    recordPCChange(const TheISA::PCState &val)
+    recordPCChange(const PCStateBase &val)
     {
        changedPC = true;
-       newPCState = val;
+       set(newPCState, val);
     }

     void
@@ -511,7 +511,7 @@

     bool changedPC;
     bool willChangePC;
-    TheISA::PCState newPCState;
+    std::unique_ptr<PCStateBase> newPCState;
     bool exitOnError;
     bool updateOnError;
     bool warnOnlyOnLoadError;
diff --git a/src/cpu/checker/cpu_impl.hh b/src/cpu/checker/cpu_impl.hh
index 436ef96..385ee2a 100644
--- a/src/cpu/checker/cpu_impl.hh
+++ b/src/cpu/checker/cpu_impl.hh
@@ -213,12 +213,12 @@
             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 @@
             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 @@
             } 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);
             }
         }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52056
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3f07e2083f803224035198b91064806991aea16e
Gerrit-Change-Number: 52056
Gerrit-PatchSet: 15
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Earl Ou <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to