diff options
Diffstat (limited to 'src/cpu/checker/cpu_impl.hh')
-rw-r--r-- | src/cpu/checker/cpu_impl.hh | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/src/cpu/checker/cpu_impl.hh b/src/cpu/checker/cpu_impl.hh index 8c8789cb6..7a99feb06 100644 --- a/src/cpu/checker/cpu_impl.hh +++ b/src/cpu/checker/cpu_impl.hh @@ -44,6 +44,7 @@ #include <list> #include <string> +#include "arch/vtophys.hh" #include "base/refcnt.hh" #include "config/the_isa.hh" #include "cpu/base_dyn_inst.hh" @@ -53,13 +54,10 @@ #include "cpu/thread_context.hh" #include "cpu/checker/cpu.hh" #include "debug/Checker.hh" +#include "sim/full_system.hh" #include "sim/sim_object.hh" #include "sim/stats.hh" -#if FULL_SYSTEM -#include "arch/vtophys.hh" -#endif // FULL_SYSTEM - using namespace std; using namespace TheISA; @@ -401,34 +399,32 @@ Checker<Impl>::verify(DynInstPtr &completed_inst) // Take any faults here if (fault != NoFault) { -#if FULL_SYSTEM fault->invoke(tc, curStaticInst); willChangePC = true; newPCState = thread->pcState(); DPRINTF(Checker, "Fault, PC is now %s\n", newPCState); curMacroStaticInst = StaticInst::nullStaticInstPtr; -#endif } else { advancePC(fault); } -#if FULL_SYSTEM - // @todo: Determine if these should happen only if the - // instruction hasn't faulted. In the SimpleCPU case this may - // not be true, but in the O3 or Ozone case this may be true. - Addr oldpc; - int count = 0; - do { - oldpc = thread->instAddr(); - system->pcEventQueue.service(tc); - count++; - } while (oldpc != thread->instAddr()); - if (count > 1) { - willChangePC = true; - newPCState = thread->pcState(); - DPRINTF(Checker, "PC Event, PC is now %s\n", newPCState); + if (FullSystem) { + // @todo: Determine if these should happen only if the + // instruction hasn't faulted. In the SimpleCPU case this may + // not be true, but in the O3 or Ozone case this may be true. + Addr oldpc; + int count = 0; + do { + oldpc = thread->instAddr(); + system->pcEventQueue.service(tc); + count++; + } while (oldpc != thread->instAddr()); + if (count > 1) { + willChangePC = true; + newPCState = thread->pcState(); + DPRINTF(Checker, "PC Event, PC is now %s\n", newPCState); + } } -#endif // @todo: Optionally can check all registers. (Or just those // that have been modified). |