(isgreater, isgreaterequal, isless, islessequal, islessgreater): Remove;

use default.
(isunordered): Convert inputs to double.
This commit is contained in:
Ulrich Drepper 2004-03-10 05:58:46 +00:00
parent 23386e2249
commit 15d7e9922c
1 changed files with 10 additions and 25 deletions

View File

@ -28,34 +28,19 @@
# define __MATH_INLINE extern __inline # define __MATH_INLINE extern __inline
#endif #endif
#ifdef __USE_ISOC99 #if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0)
# define isunordered(x, y) \ # undef isgreater
# undef isgreaterequal
# undef isless
# undef islessequal
# undef islessgreater
# undef isunordered
# define isunordered(u, v) \
(__extension__ \ (__extension__ \
({ double __r; \ ({ double __r, __u = (u), __v = (v); \
__asm ("cmptun/su %1,%2,%0\n\ttrapb" \ __asm ("cmptun/su %1,%2,%0\n\ttrapb" \
: "=&f" (__r) : "f" (x), "f"(y)); \ : "=&f" (__r) : "f" (__u), "f"(__v)); \
__r != 0; })) __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 */ #endif /* ISO C99 */
#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ #if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \