From df179d88080ad7a733edccc655cf5f6bbec6f8fc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 8 Jun 2016 22:24:06 +0000 Subject: 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. --- sysdeps/i386/i686/fpu/e_logl.S | 1 + 1 file changed, 1 insertion(+) (limited to 'sysdeps/i386/i686') diff --git a/sysdeps/i386/i686/fpu/e_logl.S b/sysdeps/i386/i686/fpu/e_logl.S index e9ecbcd472..7e3bc8d817 100644 --- a/sysdeps/i386/i686/fpu/e_logl.S +++ b/sysdeps/i386/i686/fpu/e_logl.S @@ -64,6 +64,7 @@ ENTRY(__ieee754_logl) ret 3: fstp %st(1) + fadd %st(0) ret END (__ieee754_logl) -- cgit 1.4.1