From: Julian Seward Date: Thu, 25 May 2006 01:04:05 +0000 (+0000) Subject: Yet another %eflags folding rule - this one for performance reasons. X-Git-Tag: svn/VALGRIND_3_2_3^2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ddd660226407cd0c2d3ddd7fc05e5df7f85a60a;p=thirdparty%2Fvalgrind.git Yet another %eflags folding rule - this one for performance reasons. git-svn-id: svn://svn.valgrind.org/vex/trunk@1624 --- diff --git a/VEX/priv/guest-x86/ghelpers.c b/VEX/priv/guest-x86/ghelpers.c index 1929f02949..2e6ff1dbf8 100644 --- a/VEX/priv/guest-x86/ghelpers.c +++ b/VEX/priv/guest-x86/ghelpers.c @@ -935,6 +935,11 @@ IRExpr* guest_x86_spechelper ( HChar* function_name, return unop(Iop_1Uto32,binop(Iop_CmpEQ32, cc_dep1, mkU32(0))); } + if (isU32(cc_op, X86G_CC_OP_LOGICL) && isU32(cond, X86CondNZ)) { + /* long and/or/xor, then NZ --> test dst!=0 */ + return unop(Iop_1Uto32,binop(Iop_CmpNE32, cc_dep1, mkU32(0))); + } + if (isU32(cc_op, X86G_CC_OP_LOGICL) && isU32(cond, X86CondLE)) { /* long and/or/xor, then LE This is pretty subtle. LOGIC sets SF and ZF according to the