qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/5] ARM undefined instruction execution


From: Jason Wessel
Subject: [Qemu-devel] [PATCH 3/5] ARM undefined instruction execution
Date: Sat, 20 May 2006 16:01:32 -0500
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)


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: address@hidden

Jason.
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 via email to

[Prev in Thread] Current Thread [Next in Thread]