diff mbox

[2/5] target-m68k: Do not cpu_abort on undefined insns

Message ID 1478413123-4575-3-git-send-email-rth@twiddle.net
State New
Headers show

Commit Message

Richard Henderson Nov. 6, 2016, 6:18 a.m. UTC
Report this properly via exception and, importantly, allow
the disassembler the chance to tell us what insn is not handled.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-m68k/translate.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Laurent Vivier Nov. 6, 2016, 4:53 p.m. UTC | #1
Le 06/11/2016 à 07:18, Richard Henderson a écrit :
> Report this properly via exception and, importantly, allow
> the disassembler the chance to tell us what insn is not handled.
> 
> Signed-off-by: Richard Henderson <rth@twiddle.net>

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff mbox

Patch

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 60c8b4b..2f956d9 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1214,10 +1214,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)