summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/faults.cc7
-rw-r--r--src/arch/x86/faults.hh5
-rw-r--r--src/arch/x86/isa/formats/unknown.isa3
3 files changed, 13 insertions, 2 deletions
diff --git a/src/arch/x86/faults.cc b/src/arch/x86/faults.cc
index 4c8fb33c2..4f2d97f90 100644
--- a/src/arch/x86/faults.cc
+++ b/src/arch/x86/faults.cc
@@ -270,6 +270,13 @@ namespace X86ISA
#else
void
+ InvalidOpcode::invoke(ThreadContext * tc, StaticInstPtr inst)
+ {
+ panic("Unrecognized/invalid instruction executed:\n %s",
+ inst->machInst);
+ }
+
+ void
PageFault::invoke(ThreadContext * tc, StaticInstPtr inst)
{
PageFaultErrorCode code = errorCode;
diff --git a/src/arch/x86/faults.hh b/src/arch/x86/faults.hh
index f98ef72e9..cfb654b62 100644
--- a/src/arch/x86/faults.hh
+++ b/src/arch/x86/faults.hh
@@ -250,6 +250,11 @@ namespace X86ISA
InvalidOpcode() :
X86Fault("Invalid-Opcode", "#UD", 6)
{}
+
+#if !FULL_SYSTEM
+ void invoke(ThreadContext * tc,
+ StaticInstPtr inst = StaticInst::nullStaticInstPtr);
+#endif
};
class DeviceNotAvailable : public X86Fault
diff --git a/src/arch/x86/isa/formats/unknown.isa b/src/arch/x86/isa/formats/unknown.isa
index 9b283b5d7..11751e861 100644
--- a/src/arch/x86/isa/formats/unknown.isa
+++ b/src/arch/x86/isa/formats/unknown.isa
@@ -77,8 +77,7 @@ output exec {{
Fault Unknown::execute(%(CPU_exec_context)s *xc,
Trace::InstRecord *traceData) const
{
- warn("No instructions are implemented for X86!\n");
- return NoFault;
+ return new InvalidOpcode();
}
}};