summaryrefslogtreecommitdiff
path: root/sysdeps/alpha/fpu/bits/mathinline.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-10 06:05:14 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-10 06:05:14 +0000
commitf4c024d1f956a7e853eba10ce33ab6851b5d43d1 (patch)
tree1e1fb47ee60867cc36f948b08e1388786b3ad161 /sysdeps/alpha/fpu/bits/mathinline.h
parent8b9d605485be779bb03778e780e9875525ec2ca4 (diff)
Update.
2004-03-09 Richard Henderson <rth@redhat.com> * math/math.h (isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered): Use builtins if available. * sysdeps/i386/fpu/bits/mathinline.h: Don't define via builtins. * sysdeps/m68k/fpu/bits/mathinline.h: Likewise. * sysdeps/powerpc/fpu/bits/mathinline.h: Likewise. * sysdeps/sparc/fpu/bits/mathinline.h: Likewise. * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise. * sysdeps/alpha/fpu/bits/mathinline.h (isgreater, isgreaterequal, isless, islessequal, islessgreater): Remove; use default. (isunordered): Convert inputs to double.
Diffstat (limited to 'sysdeps/alpha/fpu/bits/mathinline.h')
-rw-r--r--sysdeps/alpha/fpu/bits/mathinline.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 8141485b47..0ba79f9895 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -28,34 +28,19 @@
# define __MATH_INLINE extern __inline
#endif
-#ifdef __USE_ISOC99
-# define isunordered(x, y) \
+#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; \
+ ({ double __r, __u = (u), __v = (v); \
__asm ("cmptun/su %1,%2,%0\n\ttrapb" \
- : "=&f" (__r) : "f" (x), "f"(y)); \
+ : "=&f" (__r) : "f" (__u), "f"(__v)); \
__r != 0; }))
-
-# define isgreater(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x > __y; }))
-# define isgreaterequal(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x >= __y; }))
-# define isless(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x < __y; }))
-# define islessequal(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x <= __y; }))
-# define islessgreater(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x != __y; }))
#endif /* ISO C99 */
#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \