Skip to contentSkip to conversation

Arm mulxy bug

PATCH New Paul Brook 1 participant 1 message Dec 2, 2005

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

PATCH 1/1 Arm mulxy bug

The patch below fixes a bug in the implementation of the Arm mulxy instruction.

Paul

=== target-arm/translate.c
==================================================================

translate.c +2 -2
@@ -1021,11 +1021,11 @@
 
 static inline void gen_mulxy(int x, int y)
 {
-    if (x & 2)
+    if (x)
         gen_op_sarl_T0_im(16);
     else
         gen_op_sxth_T0();
-    if (y & 1)
+    if (y)
         gen_op_sarl_T1_im(16);
     else
         gen_op_sxth_T1();