]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Specialise NZ after DECW.
authorJulian Seward <jseward@acm.org>
Mon, 1 Aug 2005 13:35:18 +0000 (13:35 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 1 Aug 2005 13:35:18 +0000 (13:35 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1308

VEX/priv/guest-amd64/ghelpers.c

index 8e22dd97dc24ff38ac50e632e817f9a5d7b57c95..57ae5fd7e7b99bfb3f19b050ff3d95d4091e2e37 100644 (file)
@@ -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)) {