From 687aad3498226d35459b147f751e90bcaeef80e4 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Fri, 17 Sep 2021 18:48:12 +0200 Subject: [PATCH] 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. --- VEX/priv/guest_s390_toIR.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.47.2