Skip to contentSkip to conversation

Bug in arm saturating instructions

PATCH New Paul Brook 1 participant 1 message May 1, 2005

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

PATCH 1/1 Bug in arm saturating instructions

The patch below fixes a but in the arm saturating add/subtract instructions. We were writing the result back to the wrong register.

Paul

Index: target-arm/translate.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/translate.c,v retrieving revision 1.24

translate.c +1 -1
diff -u -p -r1.24 translate.c
@@ -1032,7 +1032,7 @@ static void disas_arm_insn(CPUState * en
                 gen_op_subl_T0_T1_saturate();
             else
                 gen_op_addl_T0_T1_saturate();
-            gen_movl_reg_T0(s, rn);
+            gen_movl_reg_T0(s, rd);
             break;
         case 0x8: /* signed multiply */
         case 0xa: