diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/faults.cc | 9 | ||||
-rw-r--r-- | sim/faults.hh | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sim/faults.cc b/sim/faults.cc index 9b4a0ea7f..2b93353ce 100644 --- a/sim/faults.cc +++ b/sim/faults.cc @@ -28,10 +28,19 @@ #include "sim/faults.hh" #include "cpu/exec_context.hh" +#include "cpu/base.hh" #if !FULL_SYSTEM void FaultBase::invoke(ExecContext * xc) { fatal("fault (%s) detected @ PC 0x%08p", name(), xc->readPC()); } +#else +void FaultBase::invoke(ExecContext * xc) +{ + DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), xc->regs.pc); + xc->cpu->recordEvent(csprintf("Fault %s", name())); + + assert(!xc->misspeculating()); +} #endif diff --git a/sim/faults.hh b/sim/faults.hh index 9e8d224cd..18601e8f1 100644 --- a/sim/faults.hh +++ b/sim/faults.hh @@ -51,9 +51,8 @@ class FaultBase : public RefCounted { public: virtual FaultName name() = 0; - virtual FaultStat & stat() = 0; #if FULL_SYSTEM - virtual void invoke(ExecContext * xc) = 0; + virtual void invoke(ExecContext * xc); #else virtual void invoke(ExecContext * xc); #endif |