From: Julian Seward Date: Mon, 1 Aug 2005 13:35:18 +0000 (+0000) Subject: Specialise NZ after DECW. X-Git-Tag: svn/VALGRIND_3_0_1^2~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f7392fd5d2bfe3e8f7103e883e02909500f9a30;p=thirdparty%2Fvalgrind.git Specialise NZ after DECW. git-svn-id: svn://svn.valgrind.org/vex/trunk@1308 --- diff --git a/VEX/priv/guest-amd64/ghelpers.c b/VEX/priv/guest-amd64/ghelpers.c index 8e22dd97dc..57ae5fd7e7 100644 --- a/VEX/priv/guest-amd64/ghelpers.c +++ b/VEX/priv/guest-amd64/ghelpers.c @@ -1060,6 +1060,16 @@ IRExpr* guest_amd64_spechelper ( HChar* function_name, mkU64(0))); } + /*---------------- DECW ----------------*/ + + if (isU64(cc_op, AMD64G_CC_OP_DECW) && isU64(cond, AMD64CondNZ)) { + /* 16-bit dec, then NZ --> test dst != 0 */ + return unop(Iop_1Uto64, + binop(Iop_CmpNE64, + binop(Iop_Shl64,cc_dep1,mkU8(48)), + mkU64(0))); + } + //.. /*---------------- DECL ----------------*/ //.. //.. if (isU32(cc_op, AMD64G_CC_OP_DECL) && isU32(cond, X86CondZ)) {