All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 3/5] ARM undefined instruction execution
Date: Sat, 20 May 2006 16:01:32 -0500	[thread overview]
Message-ID: <446F83AC.6050609@windriver.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]


This patch fixes the execution of undefined instructions for ARM.  With 
out it the virtualized CPU incorrectly executes the do_abort vector instead.

signed-off-by: jason.wessel@windriver.com

Jason.

[-- Attachment #2: undefined_instruction_handler_fix.patch --]
[-- Type: text/plain, Size: 740 bytes --]

Index: qemu/target-arm/translate.c
===================================================================
--- qemu.orig/target-arm/translate.c
+++ qemu/target-arm/translate.c
@@ -1589,6 +1589,15 @@ static void disas_arm_insn(CPUState * en
         case 0x5:
         case 0x6:
         case 0x7:
+            /* Check for undefined extension instructions
+             * per the ARM Bible IE:
+             * xxxx 0111 1111 xxxx  xxxx xxxx 1111 xxxx
+             */
+            sh = (0xf << 20) | (0xf << 4);
+            if (op1 == 0x7 && ((insn & sh) == sh))
+            {
+                goto illegal_op;
+            }
             /* load/store byte/word */
             rn = (insn >> 16) & 0xf;
             rd = (insn >> 12) & 0xf;

                 reply	other threads:[~2006-05-20 21:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=446F83AC.6050609@windriver.com \
    --to=jason.wessel@windriver.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.