X86: Make unrecognized instructions behave better in x86.
This commit is contained in:
parent
0dd1f7f01a
commit
0bbd88eb40
3 changed files with 13 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}};
|
||||
|
||||
|
|
Loading…
Reference in a new issue