]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Another day, another %eflags reduction rule.
authorJulian Seward <jseward@acm.org>
Sun, 17 Sep 2006 10:02:35 +0000 (10:02 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 17 Sep 2006 10:02:35 +0000 (10:02 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1660

VEX/priv/guest-x86/ghelpers.c

index 89555342b3f0750e1bdf1853da3ea7a3ab69bdc4..9cfe7379b7ab4763ed63fd2d41189484afadff31 100644 (file)
@@ -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 */