From: Julian Seward Date: Tue, 26 Dec 2006 02:24:12 +0000 (+0000) Subject: Merge r1675 (x86 COPY-CondP rule) X-Git-Tag: svn/VALGRIND_3_2_3^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27f5f4f88190bc8e65cc7550cec3269bfda588ee;p=thirdparty%2Fvalgrind.git Merge r1675 (x86 COPY-CondP rule) git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1697 --- diff --git a/VEX/priv/guest-x86/ghelpers.c b/VEX/priv/guest-x86/ghelpers.c index 9cfe7379b7..5ad6210aed 100644 --- a/VEX/priv/guest-x86/ghelpers.c +++ b/VEX/priv/guest-x86/ghelpers.c @@ -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; }