commit 632cb02573da3ff6237d9aeb9acd55c09c2ad317
Author: philippe <philippe@8f6e269a-dfd6-0310-a8e1-e2731360e62c>
Date: Tue Jul 12 20:49:05 2016 +0000
Fix n-i-bz amd64: memcheck false positive with shr %edx
False positive analysis and fix by Julian.
Thanks
git-svn-id: svn://svn.valgrind.org/vex/trunk@3223 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c
index ab53e15..3a0a4c6 100644
--- a/VEX/priv/guest_amd64_helpers.c
+++ b/VEX/priv/guest_amd64_helpers.c
@@ -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. */