From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4TDE-0007xo-Nk for qemu-devel@nongnu.org; Wed, 09 Nov 2016 08:46:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4TDC-0003qH-7y for qemu-devel@nongnu.org; Wed, 09 Nov 2016 08:46:48 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33234) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4TDC-0003q8-1J for qemu-devel@nongnu.org; Wed, 09 Nov 2016 08:46:46 -0500 Received: by mail-wm0-x241.google.com with SMTP id u144so29356373wmu.0 for ; Wed, 09 Nov 2016 05:46:45 -0800 (PST) Sender: Richard Henderson From: Richard Henderson Date: Wed, 9 Nov 2016 14:46:08 +0100 Message-Id: <1478699171-10637-3-git-send-email-rth@twiddle.net> In-Reply-To: <1478699171-10637-1-git-send-email-rth@twiddle.net> References: <1478699171-10637-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v2 2/5] 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. Reviewed-by: Laurent Vivier 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 ca99072..4f224d7 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -1577,10 +1577,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