mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 17:53:37 +08:00
Fix POWER7 logb results for negative subnormals (bug 19375)
The optimized POWER7 logb implementation does not use the absolute value of the word extracted from the input to apply the leading 0-bits builtin (to ignore the float sign). This patch fixes it by clearing the signal bit in the resulting word. It fixes the subnormal tests failures when running on POWER7 ou newer chip. Tested on powerpc64le (POWER8). [BZ# 19375] * sysdeps/powerpc/power7/fpu/s_logb.c (__logb): Fix return for negative subnormals.
This commit is contained in:
parent
d29d57eed9
commit
2094350c9c
@ -1,3 +1,8 @@
|
||||
2015-12-17 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
|
||||
* sysdeps/powerpc/power7/fpu/s_logb.c (__logb): Fix return for
|
||||
negative subnormals.
|
||||
|
||||
2015-12-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
|
||||
|
@ -58,6 +58,7 @@ __logb (double x)
|
||||
int ma;
|
||||
|
||||
EXTRACT_WORDS (ix, lx, x);
|
||||
ix &= 0x7fffffff;
|
||||
if (ix == 0)
|
||||
ma = __builtin_clz (lx) + 32;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user