From: Julian Seward Date: Sat, 23 Oct 2004 00:23:07 +0000 (+0000) Subject: Oops -- properly handle fast case of Carry after Subtract. X-Git-Tag: svn/VALGRIND_3_0_1^2~933 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aec7e4079333737055fa97ade70252e221fc6640;p=thirdparty%2Fvalgrind.git Oops -- properly handle fast case of Carry after Subtract. git-svn-id: svn://svn.valgrind.org/vex/trunk@401 --- diff --git a/VEX/priv/guest-x86/ghelpers.c b/VEX/priv/guest-x86/ghelpers.c index a3d3d2dad3..122c8ccd29 100644 --- a/VEX/priv/guest-x86/ghelpers.c +++ b/VEX/priv/guest-x86/ghelpers.c @@ -499,7 +499,7 @@ static UInt calculate_eflags_c ( UInt cc_op, UInt cc_src, UInt cc_dst ) if (cc_op == CC_OP_DECL) return cc_src; if (cc_op == CC_OP_SUBL) - return ( ((UInt)cc_src) < ((UInt)cc_dst) ) & CC_MASK_C; + return ( ((UInt)cc_src) > ((UInt)cc_dst) ) ? CC_MASK_C : 0; # if PROFILE_EFLAGS if (!initted)