From patchwork Tue Dec 27 17:53:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 709086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tp3mZ1nKkz9t0w for ; Wed, 28 Dec 2016 05:09:50 +1100 (AEDT) Received: from localhost ([::1]:55332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLwC4-0003VO-1v for incoming@patchwork.ozlabs.org; Tue, 27 Dec 2016 13:09:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLvxF-0000IA-1p for qemu-devel@nongnu.org; Tue, 27 Dec 2016 12:54:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLvxA-0000MU-P5 for qemu-devel@nongnu.org; Tue, 27 Dec 2016 12:54:29 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:56367) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cLvxA-0000Lf-FK for qemu-devel@nongnu.org; Tue, 27 Dec 2016 12:54:24 -0500 Received: from Quad.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MH974-1cGxsp160Y-00DnF2; Tue, 27 Dec 2016 18:54:09 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 27 Dec 2016 18:53:58 +0100 Message-Id: <1482861241-17678-10-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482861241-17678-1-git-send-email-laurent@vivier.eu> References: <1482861241-17678-1-git-send-email-laurent@vivier.eu> X-Provags-ID: V03:K0:CqXhAoQ36luxJ+RdUmYH7UW2Oj6XWEe0GY8ipCdl2D2hy41mNT2 BTZ6aTTKDQq4ijdVL3se17C3XeDvvlpoIDNZbf8OtTxeH3gu3K/5ACv7/L421q1YDd+/3mW oIH8w3BhN6T/TDzTyo59YVl8bKd1axm1u+DSqP+TpCvUcd4CTE2s1dxRAeaKia6yH1FH0PE 2uG97BDh/ZmswSjCYZXVw== X-UI-Out-Filterresults: notjunk:1; V01:K0:3umEokEvPxQ=:APr2fosw29WfC4yKCh5wg6 oFQfTdd9a/bLv27bMTGu29LzZ9iepr9s4NZW5wL6oaSk5NoNq37+LeMjTYK1NNHD3EOMeH9tH PSNfX0Ju0ZIMMG4UCS3LvP4m7LCFP8g909/fQr5Msiz+dfnZlV/paRbSMma1AQOy5GSjmYQy1 rMqZDBLIqLmg161XB087SSxckNqMCml0Jfd1i1kL+gfFKNCkkOvM3vylrSyduj5m4c5o7ScPQ wuGYRi5cXHIdcag6s/nE65DGwbiZoI7nejnx4W+itQMrzBJqTgbY4xz+kMyfZVrNf1ErxIZ3T sS4hBHkQuAueUN1iCeTmAj9U6U8xXad1TCl0duYZYMjLUytS1eynlYGggF2PeHCgYp9byzZVe 92qFh/X8+f6EUKU7Ez/8OgCqymj+FtC03tuYnDnR6w/P/qHZa4qrPiSGOhqbfjVuCFG1SLrqq +VaLnhHs3gBphIeaY1rnNrxYCbksHAT6xDQhedX0bbnShFvqI3NVu00pE6jRH4VsY4TleG2ZP PW2z8PfsaxzcG9Yen2WNIP3gbZtVFojEHphHfAhud6JrQ13Txqqszkl3nO1KSvuc3NiS8RJpK zmHu+UKkZk84vulU156N7nuae3X1A+4+JUwbGx/U5EHuvZngqkRwCSpYptaQbMFkGSoeTgfOL 22XdpGI6AgD3fiZ77ThPLYDrkjPmmCSpmEQ17N8kRSa6R9yuMqpS3BLhIZ4sNymD3wrY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.131 Subject: [Qemu-devel] [PULL v2 09/12] target-m68k: Do not cpu_abort on undefined insns X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson 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 Message-Id: <1478699171-10637-3-git-send-email-rth@twiddle.net> Signed-off-by: Laurent Vivier --- 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 acc8182..0417c32 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)