From: Julian Seward Date: Sat, 19 Aug 2006 22:18:53 +0000 (+0000) Subject: Fix previous commit (r1640?) so that it's actually correct :-) X-Git-Tag: svn/VALGRIND_3_3_1^2~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=076720d1eb64f1c2a850cdf053760215df38afef;p=thirdparty%2Fvalgrind.git Fix previous commit (r1640?) so that it's actually correct :-) git-svn-id: svn://svn.valgrind.org/vex/trunk@1641 --- diff --git a/VEX/priv/guest-ppc/toIR.c b/VEX/priv/guest-ppc/toIR.c index 7fd3d71469..38d6796ba3 100644 --- a/VEX/priv/guest-ppc/toIR.c +++ b/VEX/priv/guest-ppc/toIR.c @@ -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 {