summaryrefslogtreecommitdiff
path: root/sim/faults.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/faults.cc')
-rw-r--r--sim/faults.cc9
1 files changed, 9 insertions, 0 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