X86: Make unrecognized instructions behave better in x86.
This commit is contained in:
@@ -269,6 +269,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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user