qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [Qemu-devel] [PATCH 2/5] target-m68k: Do not cpu_abort on undefined insns
Date: Sat,  5 Nov 2016 23:18:40 -0700	[thread overview]
Message-ID: <1478413123-4575-3-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1478413123-4575-1-git-send-email-rth@twiddle.net>

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(-)

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)
-- 
2.7.4

  parent reply	other threads:[~2016-11-06  6:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-06  6:18 [Qemu-devel] [PATCH 0/5] target-m68k patches Richard Henderson
2016-11-06  6:18 ` [Qemu-devel] [PATCH 1/5] target-m68k: implement 680x0 movem Richard Henderson
2016-11-06 16:52   ` Laurent Vivier
2016-11-06  6:18 ` Richard Henderson [this message]
2016-11-06 16:53   ` [Qemu-devel] [PATCH 2/5] target-m68k: Do not cpu_abort on undefined insns Laurent Vivier
2016-11-06  6:18 ` [Qemu-devel] [PATCH 3/5] target-m68k: Inline shifts Richard Henderson
2016-11-06  6:18 ` [Qemu-devel] [PATCH 4/5] target-m68k: Implement bitfield ops for registers Richard Henderson
2016-11-06  6:18 ` [Qemu-devel] [PATCH 5/5] target-m68k: Implement bitfield ops for memory Richard Henderson
2016-11-06 19:52 ` [Qemu-devel] [PATCH 0/5] target-m68k patches Laurent Vivier
2016-11-07 12:08   ` Richard Henderson
2016-11-07 12:24     ` Laurent Vivier
2016-11-07 13:12       ` Peter Maydell
2016-11-07 13:44         ` Laurent Vivier
2016-11-07 13:50           ` Peter Maydell
2016-11-07 14:00             ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478413123-4575-3-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).