summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/faults.cc5
-rw-r--r--sim/faults.hh13
2 files changed, 18 insertions, 0 deletions
diff --git a/sim/faults.cc b/sim/faults.cc
index f7e9a0691..cb095f852 100644
--- a/sim/faults.cc
+++ b/sim/faults.cc
@@ -45,3 +45,8 @@ void FaultBase::invoke(ExecContext * xc)
assert(!xc->misspeculating());
}
#endif
+
+void UnimpFault::invoke(ExecContext * xc)
+{
+ panic("Unimpfault: %s\n", panicStr.c_str());
+}
diff --git a/sim/faults.hh b/sim/faults.hh
index 18601e8f1..9b3bc9103 100644
--- a/sim/faults.hh
+++ b/sim/faults.hh
@@ -64,4 +64,17 @@ class FaultBase : public RefCounted
FaultBase * const NoFault = 0;
+class UnimpFault : public FaultBase
+{
+ private:
+ std::string panicStr;
+ public:
+ UnimpFault(std::string _str)
+ : panicStr(_str)
+ { }
+
+ FaultName name() {return "Unimplemented simulator feature";}
+ void invoke(ExecContext * xc);
+};
+
#endif // __FAULTS_HH__