From: Philippe Waroquiers Date: Tue, 12 Jul 2016 20:49:05 +0000 (+0000) Subject: Fix n-i-bz amd64: memcheck false positive with shr %edx X-Git-Tag: svn/VALGRIND_3_12_0^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebc19f644107772d7fa670589649617570489cff;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c index ab53e156b2..3a0a4c606a 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. */