]> sourceware.org Git - glibc.git/commitdiff
Update x86 fix-fp-int-compare-invalid.h for GCC 8.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 24 Oct 2017 00:33:08 +0000 (00:33 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 24 Oct 2017 00:33:08 +0000 (00:33 +0000)
The glibc implementation of iseqsig relies on ordered comparison
operators raising the "invalid" exception for quiet NaN operands, with
a workaround on platforms where a GCC bug means that exception is not
raised.  For x86, that bug has now been fixed for GCC 8, so this patch
disables the workaround in that case.  If and when the corresponding
bugs for powerpc and s390 are fixed, the headers for those platforms
should of course be updated similarly.

Tested for x86_64 and x86, including with GCC mainline.  Note that
other failures appear with GCC mainline because of spurious use of
ordered comparison instructions for unordered operations
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82692>.

* sysdeps/x86/fpu/fix-fp-int-compare-invalid.h
(FIX_COMPARE_INVALID): Define to 0 if [__GNUC_PREREQ (8, 0)].

ChangeLog
sysdeps/x86/fpu/fix-fp-int-compare-invalid.h

index 4448c3d79112d536eedf7eba9e288b1a7b6bd305..265524f10aeed9cd573b0f4aee332930ad283531 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-24  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/x86/fpu/fix-fp-int-compare-invalid.h
+       (FIX_COMPARE_INVALID): Define to 0 if [__GNUC_PREREQ (8, 0)].
+
 2017-10-23  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * sysdeps/unix/sysv/linux/spawni.c (__spawnix): Use 0 instead of
index bda247d51febe388b47c99b6f87bc3d0c3b69967..842c94587e8fff159cde27edb4c8583131912f29 100644 (file)
 #ifndef FIX_FP_INT_COMPARE_INVALID_H
 #define FIX_FP_INT_COMPARE_INVALID_H   1
 
-/* As of GCC 5, both x87 and SSE comparisons use unordered comparison
+/* Before GCC 8, both x87 and SSE comparisons use unordered comparison
    instructions when they should use ordered comparisons
    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52451>.  */
-#define FIX_COMPARE_INVALID 1
+#if __GNUC_PREREQ (8, 0)
+# define FIX_COMPARE_INVALID 0
+#else
+# define FIX_COMPARE_INVALID 1
+#endif
 
 #endif /* fix-fp-int-compare-invalid.h */
This page took 0.080576 seconds and 5 git commands to generate.