]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't inadvertantly invert the D flag when doing pushfl. Real needle
authorJulian Seward <jseward@acm.org>
Thu, 16 Dec 2004 02:54:54 +0000 (02:54 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 16 Dec 2004 02:54:54 +0000 (02:54 +0000)
in a haystack job, finding this one.

git-svn-id: svn://svn.valgrind.org/vex/trunk@664

VEX/priv/guest-x86/toIR.c

index 430afa555b134e34ddbcb314dcb1b6d93d8a8ded..c5df36f39fb481a6afb711b7bcdd8475fd49f8f2 100644 (file)
@@ -12155,13 +12155,13 @@ static DisResult disInstr ( /*IN*/  Bool    resteerOK,
       t2 = newTemp(Ity_I32);
       assign( t2, mk_x86g_calculate_eflags_all() );
 
-      /* Patch in the D flag.  This can simply be the inversion
-         of bit 10 of baseBlock[OFFB_DFLAG]. */
+      /* Patch in the D flag.  This can simply be a copy of bit 10 of
+         baseBlock[OFFB_DFLAG]. */
       t3 = newTemp(Ity_I32);
       assign( t3, binop(Iop_Or32,
                         mkexpr(t2),
                         binop(Iop_And32,
-                              unop(Iop_Not32, IRExpr_Get(OFFB_DFLAG,Ity_I32)),
+                              IRExpr_Get(OFFB_DFLAG,Ity_I32),
                               mkU32(1<<10))) 
             );