]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix n-i-bz amd64: memcheck false positive with shr %edx
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 12 Jul 2016 20:49:05 +0000 (20:49 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 12 Jul 2016 20:49:05 +0000 (20:49 +0000)
False positive analysis and fix by Julian.

Thanks

git-svn-id: svn://svn.valgrind.org/vex/trunk@3223

VEX/priv/guest_amd64_helpers.c

index ab53e156b26caf24eae555b860d310fc0eefed4f..3a0a4c606ad71a9c61a8c5e957c8269004a18b3e 100644 (file)
@@ -1604,6 +1604,15 @@ IRExpr* guest_amd64_spechelper ( const HChar* function_name,
                            mkU64(0)));
       }
 
+      /*---------------- SHRL ----------------*/
+
+      if (isU64(cc_op, AMD64G_CC_OP_SHRL) && isU64(cond, AMD64CondZ)) {
+         /* SHRL, then Z --> test dep1 == 0 */
+         return unop(Iop_1Uto64,
+                     binop(Iop_CmpEQ32, unop(Iop_64to32, cc_dep1),
+                           mkU32(0)));
+      }
+
       /*---------------- COPY ----------------*/
       /* This can happen, as a result of amd64 FP compares: "comisd ... ;
          jbe" for example. */