From b2684e5512b097fbaa63dd18c35f8af4b351920c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 10 Feb 2024 12:50:52 +0100 Subject: libgcc: Fix BIL_TYPE_SIZE == 32 support in _BitInt <-> dfp support I've tried last night to enable _BitInt support for i?86-linux, and a few spots in libgcc emitted -Wshift-count-overflow warnings and clearly didn't do what it was supposed to do. Fixed thusly. 2024-02-10 Jakub Jelinek * soft-fp/fixddbitint.c (__bid_fixddbitint): Fix up BIL_TYPE_SIZE == 32 shifts. * soft-fp/fixsdbitint.c (__bid_fixsdbitint): Likewise. * soft-fp/fixtdbitint.c (__bid_fixtdbitint): Likewise. * soft-fp/floatbitintdd.c (__bid_floatbitintdd): Likewise. * soft-fp/floatbitinttd.c (__bid_floatbitinttd): Likewise. --- libgcc/soft-fp/fixsdbitint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc/soft-fp/fixsdbitint.c') diff --git a/libgcc/soft-fp/fixsdbitint.c b/libgcc/soft-fp/fixsdbitint.c index 98e3ab9..2ba550f 100644 --- a/libgcc/soft-fp/fixsdbitint.c +++ b/libgcc/soft-fp/fixsdbitint.c @@ -104,7 +104,7 @@ __bid_fixsdbitint (UBILtype *r, SItype rprec, _Decimal32 a) #if BIL_TYPE_SIZE == 64 d = limbs[0]; #elif BIL_TYPE_SIZE == 32 - d = (limbs[BITINT_END (0, 1)] << 32) | limbs[BITINT_END (1, 0)]; + d = (UDItype) limbs[BITINT_END (0, 1)] << 32 | limbs[BITINT_END (1, 0)]; #else # error Unsupported BIL_TYPE_SIZE #endif -- cgit v1.1