From e3b8ea18bfb1c7b41e943df8ac06e736a38fd4ff Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Sat, 6 Oct 2018 04:59:10 -0400 Subject: [PATCH] Prevents abort with m68K * Prevents abort with m68K Raises exception instead * M68K remove one uses of abort * Less aborts and logs instead for M68K Backports commit 910999d3969b682d8376db1266f9885866cd785c from unicorn --- qemu/target/m68k/helper.c | 6 +++--- qemu/target/m68k/translate.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qemu/target/m68k/helper.c b/qemu/target/m68k/helper.c index 436dfff9..f061cfa7 100644 --- a/qemu/target/m68k/helper.c +++ b/qemu/target/m68k/helper.c @@ -47,9 +47,9 @@ void HELPER(cf_movec_to)(CPUM68KState *env, uint32_t reg, uint32_t val) break; /* TODO: Implement control registers. */ default: - cpu_abort(CPU(cpu), - "Unimplemented control register write 0x%x = 0x%x\n", - reg, val); + qemu_log("Unimplemented control register write 0x%x = 0x%x\n", + reg, val); + raise_exception(env, EXCP_UNSUPPORTED); } } diff --git a/qemu/target/m68k/translate.c b/qemu/target/m68k/translate.c index e595400f..912f3b88 100644 --- a/qemu/target/m68k/translate.c +++ b/qemu/target/m68k/translate.c @@ -4976,7 +4976,8 @@ DISAS_INSN(wdebug) return; } /* TODO: Implement wdebug. */ - cpu_abort(CPU(cpu), "WDEBUG not implemented"); + qemu_log("WDEBUG not implemented\n"); + gen_exception(s, s->pc - 2, EXCP_UNSUPPORTED); } #endif