]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix previous commit (r1640?) so that it's actually correct :-)
authorJulian Seward <jseward@acm.org>
Sat, 19 Aug 2006 22:18:53 +0000 (22:18 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 19 Aug 2006 22:18:53 +0000 (22:18 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1641

VEX/priv/guest-ppc/toIR.c

index 7fd3d71469547dfca1833fe854d53deb9b249061..38d6796ba3de6d5c01b3df8f68e8e0840e090067 100644 (file)
@@ -2940,8 +2940,9 @@ static Bool dis_int_cmp ( UInt theInstr )
             doesn't depend on the contents of the reg.  Therefore
             remove the false dependency, which has been known to cause
             memcheck to produce false errors. */
-        if (rA_addr == rB_addr)
-            a = b = mode64 ? mkU64(0) : mkU32(0);
+         if (rA_addr == rB_addr)
+            a = b = typeOfIRExpr(irbb->tyenv,a) == Ity_I64
+                    ? mkU64(0)  : mkU32(0);
          if (flag_L == 1) {
             putCR321(crfD, unop(Iop_64to8, binop(Iop_CmpORD64S, a, b)));
          } else {
@@ -2958,8 +2959,9 @@ static Bool dis_int_cmp ( UInt theInstr )
             doesn't depend on the contents of the reg.  Therefore
             remove the false dependency, which has been known to cause
             memcheck to produce false errors. */
-        if (rA_addr == rB_addr)
-            a = b = mode64 ? mkU64(0) : mkU32(0);
+         if (rA_addr == rB_addr)
+            a = b = typeOfIRExpr(irbb->tyenv,a) == Ity_I64
+                    ? mkU64(0)  : mkU32(0);
          if (flag_L == 1) {
             putCR321(crfD, unop(Iop_64to8, binop(Iop_CmpORD64U, a, b)));
          } else {