]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target-arm: Set carry flag correctly for Thumb2 ORNS
authorPeter Maydell <peter.maydell@linaro.org>
Sun, 6 Mar 2011 20:32:09 +0000 (20:32 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 6 Mar 2011 22:30:18 +0000 (23:30 +0100)
The code for Thumb2 ORNS (or negated and set flags) was trashing
a TCG input register which was needed later for use in calculating
flags, with the effect that the carry flag was always set with
the wrong sense. Fix this by using the TCG orc op instead of
separate not and or ops.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/translate.c

index 5be504c800d131e930109834fdbe8adb78d04f76..b08b636635c309b7cc6b4a1cfbddaad787ec33e5 100644 (file)
@@ -7351,8 +7351,7 @@ gen_thumb2_data_op(DisasContext *s, int op, int conds, uint32_t shifter_out, TCG
         logic_cc = conds;
         break;
     case 3: /* orn */
-        tcg_gen_not_i32(t1, t1);
-        tcg_gen_or_i32(t0, t0, t1);
+        tcg_gen_orc_i32(t0, t0, t1);
         logic_cc = conds;
         break;
     case 4: /* eor */