]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target-arm: Correct conversion of Thumb Neon dp encodings into ARM
authorJuha Riihimäki <juha.riihimaki@nokia.com>
Fri, 11 Feb 2011 13:35:25 +0000 (13:35 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 20 Feb 2011 16:30:09 +0000 (17:30 +0100)
We handle Thumb Neon data processing instructions by converting them
into the equivalent ARM encoding, as the two are very close. However
the ARM encoding should have bit 28 set, not clear. This wasn't causing
any problems because we don't actually look at that bit during decode;
however it is better to do the conversion correctly to avoid problems
later if we add checks to UNDEF on SBZ/SBO bits.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/translate.c

index 83dc180545931c51f2f6a952138c533842ecd334..f3488200e693fd731ff75ba163605e9a748886e0 100644 (file)
@@ -8015,7 +8015,7 @@ static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1)
         /* Coprocessor.  */
         if (((insn >> 24) & 3) == 3) {
             /* Translate into the equivalent ARM encoding.  */
-            insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4);
+            insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4) | (1 << 28);
             if (disas_neon_data_insn(env, s, insn))
                 goto illegal_op;
         } else {