aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-11-26 13:54:55 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-11-26 13:54:55 +0000
commit706688aaefdeb48e63519525f11108ce14844a26 (patch)
tree97d3ef3595e73782e53222abcac60e5264ace340 /sysdeps/ieee754/ldbl-128ibm
parent12da14a59135fe331f294b91488c1bdf55b35b4e (diff)
downloadglibc-706688aaefdeb48e63519525f11108ce14844a26.zip
glibc-706688aaefdeb48e63519525f11108ce14844a26.tar.gz
glibc-706688aaefdeb48e63519525f11108ce14844a26.tar.bz2
FIx ldbl-128ibm frexpl for 32-bit systems (bug 16619, bug 16740).
This patch fixes bugs in ldbl-128ibm frexpl for 32-bit systems shown up by warnings: ../sysdeps/ieee754/ldbl-128ibm/s_frexpl.c:82:4: warning: left shift count >= width of type ../sysdeps/ieee754/ldbl-128ibm/s_frexpl.c:129:5: warning: left shift count >= width of type This did in fact show up in test-ldouble.out (alongside all the other problems there ... maybe we should again consider running the libm tests at finer granularity from the makefiles) as already covered by the testsuite after the previous patch that fixed these bugs for 64-bit systems. The fix is simply using 1LL instead of 1L when shifting by 52. Tested for powerpc32 (soft float). [BZ #16619] [BZ #16740] * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Use 1LL << 52 instead of 1L << 52.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_frexpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c b/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
index 483c6a8..52d2d3e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
@@ -79,7 +79,7 @@ long double __frexpl(long double x, int *eptr)
if (ix == 0
&& (int64_t) (hx ^ lx) < 0)
{
- hx += 1L << 52;
+ hx += 1LL << 52;
expon -= 1;
}
@@ -126,7 +126,7 @@ long double __frexpl(long double x, int *eptr)
be wrong since the returned low double will be
zero. This can happen if the input was
something weird like 0x1p1000 - 0x1p-1000. */
- hx -= 1L << 52;
+ hx -= 1LL << 52;
expon += 1;
}
}