From: Julian Seward Date: Sun, 17 Sep 2006 10:02:35 +0000 (+0000) Subject: Another day, another %eflags reduction rule. X-Git-Tag: svn/VALGRIND_3_3_1^2~96 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76e1aa3cb5c35e89350468e8dbfd7adc0b631c5b;p=thirdparty%2Fvalgrind.git Another day, another %eflags reduction rule. git-svn-id: svn://svn.valgrind.org/vex/trunk@1660 --- diff --git a/VEX/priv/guest-x86/ghelpers.c b/VEX/priv/guest-x86/ghelpers.c index 89555342b3..9cfe7379b7 100644 --- a/VEX/priv/guest-x86/ghelpers.c +++ b/VEX/priv/guest-x86/ghelpers.c @@ -853,6 +853,16 @@ IRExpr* guest_x86_spechelper ( HChar* function_name, binop(Iop_CmpLE32S, cc_dep1, cc_dep2)); } + if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondNLE)) { + /* long sub/cmp, then LE (signed not less than or equal) + --> test dst >s src + --> test !(dst <=s src) */ + return binop(Iop_Xor32, + unop(Iop_1Uto32, + binop(Iop_CmpLE32S, cc_dep1, cc_dep2)), + mkU32(1)); + } + if (isU32(cc_op, X86G_CC_OP_SUBL) && isU32(cond, X86CondBE)) { /* long sub/cmp, then BE (unsigned less than or equal) --> test dst <=u src */