From: Julian Seward Date: Wed, 20 Jul 2005 01:12:48 +0000 (+0000) Subject: Specialise NZ after ANDL/ORL/XORL. This fixes #109314. X-Git-Tag: svn/VALGRIND_3_0_1^2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=218719fbd3e8f232567846348298bfa500f27a2c;p=thirdparty%2Fvalgrind.git Specialise NZ after ANDL/ORL/XORL. This fixes #109314. git-svn-id: svn://svn.valgrind.org/vex/trunk@1280 --- diff --git a/VEX/priv/guest-amd64/ghelpers.c b/VEX/priv/guest-amd64/ghelpers.c index 77022f0ded..5ffc209287 100644 --- a/VEX/priv/guest-amd64/ghelpers.c +++ b/VEX/priv/guest-amd64/ghelpers.c @@ -996,6 +996,14 @@ IRExpr* guest_amd64_spechelper ( HChar* function_name, mkU64(0))); } + if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondNZ)) { + /* long and/or/xor, then NZ --> test dst!=0 */ + return unop(Iop_1Uto64, + binop(Iop_CmpNE64, + binop(Iop_Shl64,cc_dep1,mkU8(32)), + mkU64(0))); + } + //.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondS)) { //.. /* long and/or/xor, then S --> test dst