]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Specialise computation of carry flag after ADDL.
authorJulian Seward <jseward@acm.org>
Wed, 22 Nov 2006 23:31:37 +0000 (23:31 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 22 Nov 2006 23:31:37 +0000 (23:31 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1683

VEX/priv/guest-x86/ghelpers.c

index ef9273dd02ec0ac82adc7b220078e0bd287f3007..3a490f2372103f091233ed8c375bc131e3ec585f 100644 (file)
@@ -1263,6 +1263,13 @@ IRExpr* guest_x86_spechelper ( HChar* function_name,
                mkU32(1)
             );
       }
+      if (isU32(cc_op, X86G_CC_OP_ADDL)) {
+         /* C after add denotes sum <u either arg */
+         return unop(Iop_1Uto32,
+                     binop(Iop_CmpLT32U, 
+                           binop(Iop_Add32, cc_dep1, cc_dep2), 
+                           cc_dep1));
+      }
 #     if 0
       if (cc_op->tag == Iex_Const) {
          vex_printf("CFLAG "); ppIRExpr(cc_op); vex_printf("\n");