CheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable
[gem5.git] / src / cpu / o3 / dyn_inst_impl.hh
index ed1e374e8a1920cb364c2392ce96558c5d6d42f4..2870d40fe504c7b48e4efe2232f2a2e4357f0a05 100644 (file)
@@ -41,7 +41,6 @@
  */
 
 #include "base/cp_annotate.hh"
-#include "config/use_checker.hh"
 #include "cpu/o3/dyn_inst.hh"
 #include "sim/full_system.hh"
 
@@ -138,11 +137,12 @@ BaseO3DynInst<Impl>::completeAcc(PacketPtr pkt)
     bool in_syscall = this->thread->inSyscall;
     this->thread->inSyscall = true;
 
-#if USE_CHECKER
-    if (this->isStoreConditional()) {
-       this->reqToVerify->setExtraData(pkt->req->getExtraData());
+    if (this->cpu->checker) {
+        if (this->isStoreConditional()) {
+            this->reqToVerify->setExtraData(pkt->req->getExtraData());
+        }
     }
-#endif
+
     this->fault = this->staticInst->completeAcc(pkt, this, this->traceData);
 
     this->thread->inSyscall = in_syscall;