From: Christian Borntraeger Date: Thu, 5 Feb 2015 11:05:10 +0000 (+0000) Subject: Fix bug 343802. We need to handle one more special case in the spechelper X-Git-Tag: svn/VALGRIND_3_11_0^2~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f312f343208b07cd3d5d12d958e0b6bb621c644e;p=thirdparty%2Fvalgrind.git Fix bug 343802. We need to handle one more special case in the spechelper git-svn-id: svn://svn.valgrind.org/vex/trunk@3083 --- diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index 78ca2efa43..df1f24bb65 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -1958,7 +1958,10 @@ guest_s390x_spechelper(const HChar *function_name, IRExpr **args, return unop(Iop_1Uto32, binop(Iop_CmpNE64, cc_dep1, mkU64(0))); } if (cond == 4 || cond == 4 + 1) { - return unop(Iop_1Uto32, binop(Iop_CmpLT64S, cc_dep1, mkU64(0))); + /* Special case cc_dep < 0. Only check the MSB to avoid bogus + memcheck complaints due to gcc magic. Fixes 343802 + */ + return unop(Iop_64to32, binop(Iop_Shr64, cc_dep1, mkU8(63))); } if (cond == 8 + 4 || cond == 8 + 4 + 1) { return unop(Iop_1Uto32, binop(Iop_CmpLE64S, cc_dep1, mkU64(0)));