aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/m68k/m680x0
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2017-09-28 19:20:33 +0100
committerWilco Dijkstra <wdijkstr@arm.com>2017-09-28 19:43:54 +0100
commit1e6d07234fc0edcf0e88d75cf48f0b0dbbea3f39 (patch)
tree55a43e82f97a2b808f13effeec49df332dfbc400 /sysdeps/m68k/m680x0
parentb2f03cf3a4b7ae4d1db155fba2180e3f580ce805 (diff)
downloadglibc-1e6d07234fc0edcf0e88d75cf48f0b0dbbea3f39.tar
glibc-1e6d07234fc0edcf0e88d75cf48f0b0dbbea3f39.tar.gz
glibc-1e6d07234fc0edcf0e88d75cf48f0b0dbbea3f39.tar.bz2
glibc-1e6d07234fc0edcf0e88d75cf48f0b0dbbea3f39.zip
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.
Diffstat (limited to 'sysdeps/m68k/m680x0')
-rw-r--r--sysdeps/m68k/m680x0/fpu/bits/mathinline.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
index b92b1f83e7..07ba1454b9 100644
--- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
@@ -29,60 +29,6 @@
#ifdef __GNUC__
#ifdef __USE_ISOC99
-/* GCC 3.1 and up have builtins that actually can be used. */
-# if !__GNUC_PREREQ (3,1)
-/* ISO C99 defines some macros to perform unordered comparisons. The
- m68k FPU supports this with special opcodes and we should use them.
- These must not be inline functions since we have to be able to handle
- all floating-point types. */
-# undef isgreater
-# undef isgreaterequal
-# undef isless
-# undef islessequal
-# undef islessgreater
-# undef isunordered
-# define isgreater(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsogt %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- __result != 0; })
-
-# define isgreaterequal(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsoge %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- __result != 0; })
-
-# define isless(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsolt %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- __result != 0; })
-
-# define islessequal(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsole %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- __result != 0; })
-
-# define islessgreater(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsogl %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- __result != 0; })
-
-# define isunordered(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsun %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- __result != 0; })
-# endif /* GCC 3.1 */
/* Test for negative number. Used in the signbit() macro. */
__MATH_INLINE int