diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-02-10 12:50:52 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-02-10 12:50:52 +0100 |
commit | b2684e5512b097fbaa63dd18c35f8af4b351920c (patch) | |
tree | 518c686730121bc0969d28916fd46def4d925ab4 /libgcc/soft-fp/fixtdbitint.c | |
parent | 39920447f876128ff7942a9cd931021800865894 (diff) | |
download | gcc-b2684e5512b097fbaa63dd18c35f8af4b351920c.zip gcc-b2684e5512b097fbaa63dd18c35f8af4b351920c.tar.gz gcc-b2684e5512b097fbaa63dd18c35f8af4b351920c.tar.bz2 |
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 <jakub@redhat.com>
* 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.
Diffstat (limited to 'libgcc/soft-fp/fixtdbitint.c')
-rw-r--r-- | libgcc/soft-fp/fixtdbitint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgcc/soft-fp/fixtdbitint.c b/libgcc/soft-fp/fixtdbitint.c index 6d33ec2..66aca1c 100644 --- a/libgcc/soft-fp/fixtdbitint.c +++ b/libgcc/soft-fp/fixtdbitint.c @@ -126,9 +126,9 @@ __bid_fixtdbitint (UBILtype *r, SItype rprec, _Decimal128 a) mantissalo = limbs[BITINT_END (5, 4)]; rem = limbs[6] | limbs[7]; #elif BIL_TYPE_SIZE == 32 - mantissahi = limbs[BITINT_END (8, 11)] << 32; + mantissahi = (UDItype) limbs[BITINT_END (8, 11)] << 32; mantissahi |= limbs[BITINT_END (9, 10)]; - mantissalo = limbs[BITINT_END (10, 9)] << 32; + mantissalo = (UDItype) limbs[BITINT_END (10, 9)] << 32; mantissalo |= limbs[BITINT_END (11, 8)]; rem = limbs[12] | limbs[13] | limbs[14] | limbs[15]; #endif |