o3 cpu: remove some unused buggy functions in the lsq
[gem5.git] / src / cpu / thread_context.cc
index 58912c564b20aa8bed1423dd7f224e143c9874e1..c403667bf0155d9a3eb880e82c6e02def7413d5c 100644 (file)
@@ -30,7 +30,9 @@
 
 #include "base/misc.hh"
 #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)
@@ -54,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);
@@ -62,20 +63,18 @@ 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)
         panic("CPU ids don't match, one: %d, two: %d", id1, id2);
+
+    id1 = one->contextId();
+    id2 = two->contextId();
+    if (id1 != id2)
+        panic("Context ids don't match, one: %d, two: %d", id1, id2);
+
+
 }