Don't do checker stuff if the checker is not defined
authorNathan Binkert <binkertn@umich.edu>
Wed, 20 Jun 2007 15:15:06 +0000 (08:15 -0700)
committerNathan Binkert <binkertn@umich.edu>
Wed, 20 Jun 2007 15:15:06 +0000 (08:15 -0700)
--HG--
extra : convert_revision : 1c920b050c21e592a386410e4e9f45354f8e4441

src/cpu/o3/cpu.cc
src/cpu/o3/cpu.hh

index a775b66d51b09f8a6cdcfb99b0f1ffd2b7b29480..9e1b5d13247a4fa679d1be615fe4ff2912ad69c2 100644 (file)
@@ -204,19 +204,17 @@ FullO3CPU<Impl>::FullO3CPU(O3CPU *o3_cpu, Params *params)
         _status = Idle;
     }
 
-    checker = NULL;
-
-    if (params->checker) {
 #if USE_CHECKER
+    if (params->checker) {
         BaseCPU *temp_checker = params->checker;
         checker = dynamic_cast<Checker<DynInstPtr> *>(temp_checker);
 #if FULL_SYSTEM
         checker->setSystem(params->system);
 #endif
-#else
-        panic("Checker enabled but not compiled in!");
-#endif // USE_CHECKER
+    } else {
+        checker = NULL;
     }
+#endif // USE_CHECKER
 
 #if !FULL_SYSTEM
     thread.resize(number_of_threads);
index e71d05c8e163207cf7a62f927e2ad6863d7474fa..b7533e3119f8add2ae31bf59d936ba05e3db388b 100644 (file)
@@ -42,6 +42,7 @@
 #include "base/statistics.hh"
 #include "base/timebuf.hh"
 #include "config/full_system.hh"
+#include "config/use_checker.hh"
 #include "cpu/activity.hh"
 #include "cpu/base.hh"
 #include "cpu/simple_thread.hh"
@@ -617,11 +618,13 @@ class FullO3CPU : public BaseO3CPU
     /** The global sequence number counter. */
     InstSeqNum globalSeqNum;//[Impl::MaxThreads];
 
+#if USE_CHECKER
     /** Pointer to the checker, which can dynamically verify
      * instruction results at run time.  This can be set to NULL if it
      * is not being used.
      */
     Checker<DynInstPtr> *checker;
+#endif
 
 #if FULL_SYSTEM
     /** Pointer to the system. */