From: Andreas Arnez Date: Fri, 17 Sep 2021 16:48:12 +0000 (+0200) Subject: s390x: Fix 64-bit shift in s390_irgen_VSTRS X-Git-Tag: VALGRIND_3_18_0~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=687aad3498226d35459b147f751e90bcaeef80e4;p=thirdparty%2Fvalgrind.git s390x: Fix 64-bit shift in s390_irgen_VSTRS The function s390_irgen_VSTRS in guest_s390_toIR.c contains a shift operation that is intended to yield a 64-bit number but uses 1UL instead of 1ULL. This doesn't work on systems where 'unsigned long' is only 32 bits wide. Fix by replacing 1UL by 1ULL. --- diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 1bd18f7602..72222ab045 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -17679,7 +17679,7 @@ s390_irgen_VSTRS(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) assign(result, unop(Iop_ClzNat64, binop(Iop_Or64, unop(Iop_V128HIto64, match), - mkU64((1UL << 48) - 1)))); + mkU64((1ULL << 48) - 1)))); put_vr_qw(v1, binop(Iop_64HLtoV128, mkexpr(result), mkU64(0))); /* Set condition code.