From 1e6d07234fc0edcf0e88d75cf48f0b0dbbea3f39 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Thu, 28 Sep 2017 19:20:33 +0100 Subject: Simplify C99 isgreater macros Simplify the C99 isgreater macros. Although some support was added in GCC 2.97, not all targets added support until GCC 3.1. Therefore only use the builtins in math.h from GCC 3.1 onwards, and defer to generic macros otherwise. Improve the generic isunordered macro to use compares rather than call fpclassify twice - this is not only faster but also correct for signaling NaNs. * math/math.h: Improve handling of C99 isgreater macros. * sysdeps/alpha/fpu/bits/mathinline.h: Remove isgreater macros. * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Likewise. * sysdeps/powerpc/bits/mathinline.h: Likewise. * sysdeps/sparc/fpu/bits/mathinline.h: Likewise. * sysdeps/x86/fpu/bits/mathinline.h: Likewise. --- sysdeps/alpha/fpu/bits/mathinline.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'sysdeps/alpha/fpu') diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 00c8c42a83..dad99d3f64 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -27,21 +27,6 @@ # define __MATH_INLINE __extern_inline #endif -#if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0) -# undef isgreater -# undef isgreaterequal -# undef isless -# undef islessequal -# undef islessgreater -# undef isunordered -# define isunordered(u, v) \ - (__extension__ \ - ({ double __r, __u = (u), __v = (v); \ - __asm ("cmptun/su %1,%2,%0\n\ttrapb" \ - : "=&f" (__r) : "f" (__u), "f"(__v)); \ - __r != 0; })) -#endif /* ISO C99 */ - #if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ && defined __OPTIMIZE__ -- cgit v1.2.3