]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Correct MIPS math-tests.h condition for sNaN payload preservation.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 2 Jan 2017 20:28:36 +0000 (20:28 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 2 Jan 2017 20:28:36 +0000 (20:28 +0000)
Testing for MIPS soft float shows that the issue with NaN payload
preservation applies to soft float as well as hard float: the
sfp-machine.h emulates hardware non-preservation semantics, although
only for the case of two NaN arguments.

This patch duly changes the MIPS math-tests.h to expect such
non-preservation for soft float as well as hard float.  The issue in
the NAN2008 case for which I posted
<https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00034.html>, of sNaN
payloads being preserved but qNaN payloads not being preserved, is not
currently an issue for glibc tests because we don't have any tests
that check for qNaN payloads being preserved by arithmetic, so a
simple __mips_nan2008 conditional suffices without needing compiler
version checks in the __mips_nan2008 case.

Tested for mips64 soft float.

* sysdeps/mips/math-tests.h (SNAN_TESTS_PRESERVE_PAYLOAD): Do not
condition on [__mips_hard_float].

ChangeLog
sysdeps/mips/math-tests.h

index d321a89a3781512bf60e8fafd9b58b88c084179b..e6b850ce693b76da234a76d2ee8de14391f51dbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-02  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/mips/math-tests.h (SNAN_TESTS_PRESERVE_PAYLOAD): Do not
+       condition on [__mips_hard_float].
+
 2017-01-02  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        [BZ #21014]
index caa2b4f94973a250bd0d3f40a03461d3d32e6d3b..7680db21ee8e369ae61282c1fa8c18e9ee2f0b75 100644 (file)
@@ -37,7 +37,7 @@
 
 /* NaN payload preservation when converting a signaling NaN to quiet
    is only required in NAN2008 mode.  */
-#if defined __mips_hard_float && !defined __mips_nan2008
+#ifndef __mips_nan2008
 # define SNAN_TESTS_PRESERVE_PAYLOAD   0
 #endif