From: Julian Seward Date: Tue, 14 Nov 2006 17:46:12 +0000 (+0000) Subject: Add an %eflags rule for COPY-CondP. X-Git-Tag: svn/VALGRIND_3_3_1^2~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea81e316737ad4ec1741eed0c92f7237090af508;p=thirdparty%2Fvalgrind.git Add an %eflags rule for COPY-CondP. git-svn-id: svn://svn.valgrind.org/vex/trunk@1675 --- 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; }