]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Specialise NZ after ANDL/ORL/XORL. This fixes #109314.
authorJulian Seward <jseward@acm.org>
Wed, 20 Jul 2005 01:12:48 +0000 (01:12 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 20 Jul 2005 01:12:48 +0000 (01:12 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1280

VEX/priv/guest-amd64/ghelpers.c

index 77022f0ded5facb66fbb6f44a7b46194e1691002..5ffc20928768782001b5412e82b0283d6ca9c598 100644 (file)
@@ -996,6 +996,14 @@ IRExpr* guest_amd64_spechelper ( HChar* function_name,
                            mkU64(0)));
       }
 
+      if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondNZ)) {
+         /* long and/or/xor, then NZ --> test dst!=0 */
+         return unop(Iop_1Uto64,
+                     binop(Iop_CmpNE64, 
+                           binop(Iop_Shl64,cc_dep1,mkU8(32)), 
+                           mkU64(0)));
+      }
+
 //..       if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondS)) {
 //..          /* long and/or/xor, then S --> test dst <s 0 */
 //..          return unop(Iop_1Uto32,binop(Iop_CmpLT32S, cc_dep1, mkU32(0)));