aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/fpu/e_logl.S
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-06-08 22:24:06 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-06-08 22:24:06 +0000
commitdf179d88080ad7a733edccc655cf5f6bbec6f8fc (patch)
treed1f7b50279ad7221529019078ad2a170fcea5aaf /sysdeps/x86_64/fpu/e_logl.S
parent9bd3ef8e19b19fb3cfcf99a33a1493035891b990 (diff)
downloadglibc-df179d88080ad7a733edccc655cf5f6bbec6f8fc.zip
glibc-df179d88080ad7a733edccc655cf5f6bbec6f8fc.tar.gz
glibc-df179d88080ad7a733edccc655cf5f6bbec6f8fc.tar.bz2
Fix i386/x86_64 logl (sNaN) (bug 20227).
The i386/x86_64 versions of logl return sNaN for sNaN input. This patch fixes them to add a NaN input to itself so that qNaN is returned in this case. Tested for x86_64 and x86 (including a build for i586 to cover the non-i686 logl version). [BZ #20227] * sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Add NaN input to itself. * sysdeps/i386/i686/fpu/e_logl.S (__ieee754_logl): Likewise. * sysdeps/x86_64/fpu/e_logl.S (__ieee754_logl): Likewise. * math/libm-test.inc (log_test_data): Add sNaN tests.
Diffstat (limited to 'sysdeps/x86_64/fpu/e_logl.S')
-rw-r--r--sysdeps/x86_64/fpu/e_logl.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/x86_64/fpu/e_logl.S b/sysdeps/x86_64/fpu/e_logl.S
index dbe6fd5..0d3576f 100644
--- a/sysdeps/x86_64/fpu/e_logl.S
+++ b/sysdeps/x86_64/fpu/e_logl.S
@@ -66,6 +66,7 @@ ENTRY(__ieee754_logl)
jnz 4b // in case x is +-Inf
fstp %st(1)
fstp %st(1)
+ fadd %st(0)
ret
END (__ieee754_logl)