summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--math/libm-test.inc2
-rw-r--r--sysdeps/i386/fpu/e_logl.S1
-rw-r--r--sysdeps/i386/i686/fpu/e_logl.S1
-rw-r--r--sysdeps/x86_64/fpu/e_logl.S1
5 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d140aab66..82c698d918 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2016-06-08 Joseph Myers <joseph@codesourcery.com>
+ [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.
+
[BZ #20226]
* sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL): Add NaN argument to
itself.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 35a256c485..c16009b9ae 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -8998,6 +8998,8 @@ static const struct test_f_f_data log_test_data[] =
TEST_f_f (log, plus_infty, plus_infty, ERRNO_UNCHANGED),
TEST_f_f (log, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
TEST_f_f (log, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+ TEST_f_f (log, snan_value, qnan_value, INVALID_EXCEPTION),
+ TEST_f_f (log, -snan_value, qnan_value, INVALID_EXCEPTION),
AUTO_TESTS_f_f (log),
};
diff --git a/sysdeps/i386/fpu/e_logl.S b/sysdeps/i386/fpu/e_logl.S
index 7a6d370e8f..53127d704e 100644
--- a/sysdeps/i386/fpu/e_logl.S
+++ b/sysdeps/i386/fpu/e_logl.S
@@ -67,6 +67,7 @@ ENTRY(__ieee754_logl)
3: jp 4b // in case x is +-Inf
fstp %st(1)
fstp %st(1)
+ fadd %st(0)
ret
END (__ieee754_logl)
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)
diff --git a/sysdeps/x86_64/fpu/e_logl.S b/sysdeps/x86_64/fpu/e_logl.S
index dbe6fd59dc..0d3576f48b 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)