Received: from eggs.gnu.org ([2001:4830:134:3::10]:51232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2i5e-0001Dd-9L for qemu-devel@nongnu.org; Fri, 04 Nov 2016 13:15:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2i5d-0000nL-6L for qemu-devel@nongnu.org; Fri, 04 Nov 2016 13:15:42 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:35780) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2i5c-0000kt-Uj for qemu-devel@nongnu.org; Fri, 04 Nov 2016 13:15:41 -0400 Received: by mail-pf0-x243.google.com with SMTP id i88so8469109pfk.2 for ; Fri, 04 Nov 2016 10:15:40 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Fri, 4 Nov 2016 11:15:29 -0600 Message-Id: <1478279729-21524-3-git-send-email-rth@twiddle.net> In-Reply-To: <1478279729-21524-1-git-send-email-rth@twiddle.net> References: <1478279729-21524-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 2/2] target-m68k: Do not cpu_abort on undefined insns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: laurent@vivier.eu 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 --- target-m68k/translate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index 856c385..2f10776 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) -- 2.7.4