summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/pseudo_inst.cc7
-rw-r--r--src/sim/pseudo_inst.hh1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index aafa5672b..a57bdb2ce 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -219,6 +219,13 @@ m5exit(ThreadContext *tc, Tick delay)
}
void
+m5fail(ThreadContext *tc, Tick delay, uint64_t code)
+{
+ Tick when = curTick() + delay * SimClock::Int::ns;
+ exitSimLoop("m5_fail instruction encountered", code, when);
+}
+
+void
loadsymbol(ThreadContext *tc)
{
if (!FullSystem)
diff --git a/src/sim/pseudo_inst.hh b/src/sim/pseudo_inst.hh
index 4a6493a66..efcd44a69 100644
--- a/src/sim/pseudo_inst.hh
+++ b/src/sim/pseudo_inst.hh
@@ -54,6 +54,7 @@ uint64_t initParam(ThreadContext *xc);
uint64_t rpns(ThreadContext *tc);
void wakeCPU(ThreadContext *tc, uint64_t cpuid);
void m5exit(ThreadContext *tc, Tick delay);
+void m5fail(ThreadContext *tc, Tick delay, uint64_t code);
void resetstats(ThreadContext *tc, Tick delay, Tick period);
void dumpstats(ThreadContext *tc, Tick delay, Tick period);
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period);