o3 cpu: remove some unused buggy functions in the lsq
[gem5.git] / src / cpu / thread_context.cc
index f2083ef081e0d287b36b5bb7dddc4d9da66cfac9..c403667bf0155d9a3eb880e82c6e02def7413d5c 100644 (file)
@@ -32,6 +32,7 @@
 #include "base/trace.hh"
 #include "config/the_isa.hh"
 #include "cpu/thread_context.hh"
+#include "debug/Context.hh"
 
 void
 ThreadContext::compare(ThreadContext *one, ThreadContext *two)
@@ -55,7 +56,6 @@ ThreadContext::compare(ThreadContext *one, ThreadContext *two)
             panic("Float reg idx %d doesn't match, one: %#x, two: %#x",
                   i, t1, t2);
     }
-#if FULL_SYSTEM
     for (int i = 0; i < TheISA::NumMiscRegs; ++i) {
         TheISA::MiscReg t1 = one->readMiscRegNoEffect(i);
         TheISA::MiscReg t2 = two->readMiscRegNoEffect(i);
@@ -63,18 +63,9 @@ ThreadContext::compare(ThreadContext *one, ThreadContext *two)
             panic("Misc reg idx %d doesn't match, one: %#x, two: %#x",
                   i, t1, t2);
     }
-#endif
-
-    Addr pc1 = one->readPC();
-    Addr pc2 = two->readPC();
-    if (pc1 != pc2)
-        panic("PCs doesn't match, one: %#x, two: %#x", pc1, pc2);
-
-    Addr npc1 = one->readNextPC();
-    Addr npc2 = two->readNextPC();
-    if (npc1 != npc2)
-        panic("NPCs doesn't match, one: %#x, two: %#x", npc1, npc2);
 
+    if (!(one->pcState() == two->pcState()))
+        panic("PC state doesn't match.");
     int id1 = one->cpuId();
     int id2 = two->cpuId();
     if (id1 != id2)