target-m68k: Do not cpu_abort on undefined insns

Report this properly via exception and, importantly, allow
the disassembler the chance to tell us what insn is not handled.

Backports commit 72d2e4b6a437f11f97d3138f6b2ec177b78210c7 from qemu
This commit is contained in:
Richard Henderson 2018-03-01 12:02:34 -05:00 committed by Lioncash
parent 90b0b6d867
commit 0c00b036be
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1229,10 +1229,12 @@ DISAS_INSN(undef_fpu)
DISAS_INSN(undef)
{
M68kCPU *cpu = m68k_env_get_cpu(env);
/* ??? This is both instructions that are as yet unimplemented
for the 680x0 series, as well as those that are implemented
but actually illegal for CPU32 or pre-68020. */
qemu_log_mask(LOG_UNIMP, "Illegal instruction: %04x @ %08x",
insn, s->pc - 2);
gen_exception(s, s->pc - 2, EXCP_UNSUPPORTED);
cpu_abort(CPU(cpu), "Illegal instruction: %04x @ %08x", insn, s->pc - 2);
}
DISAS_INSN(mulw)