]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add an %eflags rule for COPY-CondP.
authorJulian Seward <jseward@acm.org>
Tue, 14 Nov 2006 17:46:12 +0000 (17:46 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 14 Nov 2006 17:46:12 +0000 (17:46 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1675

VEX/priv/guest-x86/ghelpers.c

index 9cfe7379b7ab4763ed63fd2d41189484afadff31..5ad6210aedfad89624b2e1d2542e9a175aa40872 100644 (file)
@@ -1161,6 +1161,23 @@ IRExpr* guest_x86_spechelper ( HChar* function_name,
             );
       }
 
+      if (isU32(cc_op, X86G_CC_OP_COPY) && isU32(cond, X86CondP)) {
+         /* COPY, then P --> extract P from dep1, and test (P == 1). */
+         return
+            unop(
+               Iop_1Uto32,
+               binop(
+                  Iop_CmpNE32,
+                  binop(
+                     Iop_And32,
+                     binop(Iop_Shr32, cc_dep1, mkU8(X86G_CC_SHIFT_P)),
+                     mkU32(1)
+                  ),
+                  mkU32(0)
+               )
+            );
+      }
+
       return NULL;
    }