aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-10-17 04:52:32 +0000
committerRoland McGrath <roland@gnu.org>2005-10-17 04:52:32 +0000
commit3866a22470657702ec137ec79953b81a76ee3b17 (patch)
treec0edc727cbe4e4299c870956bae04f811671856a
parent05b3887d7e3dce86084b65be195af7a5d7fa71fa (diff)
downloadglibc-3866a22470657702ec137ec79953b81a76ee3b17.zip
glibc-3866a22470657702ec137ec79953b81a76ee3b17.tar.gz
glibc-3866a22470657702ec137ec79953b81a76ee3b17.tar.bz2
2005-01-07 Richard Henderson <rth@redhat.com>
[BZ #721] * math/math_private.h (__copysign): Define as builtin for gcc 4. (__copysignf, __copysignl): Likewise. * sysdeps/alpha/fpu/bits/mathinline.h (copysign): Don't define for gcc 4.0. (copysignf, copysignl, fabsf, fabs): Likewise. (__copysign, __copysignf, __copysignl): Remove. (__fabs, __fabsf): Remove.
-rw-r--r--math/math_private.h14
-rw-r--r--sysdeps/alpha/fpu/bits/mathinline.h17
2 files changed, 19 insertions, 12 deletions
diff --git a/math/math_private.h b/math/math_private.h
index f545841..a6a85d3 100644
--- a/math/math_private.h
+++ b/math/math_private.h
@@ -192,6 +192,10 @@ extern int __kernel_rem_pio2 (double*,double*,int,int,int, const int32_t*);
/* internal functions. */
extern double __copysign (double x, double __y);
+#if __GNUC_PREREQ (4, 0)
+extern inline double __copysign (double x, double y)
+{ return __builtin_copysign (x, y); }
+#endif
/* ieee style elementary float functions */
extern float __ieee754_sqrtf (float);
@@ -235,6 +239,10 @@ extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*);
/* internal functions. */
extern float __copysignf (float x, float __y);
+#if __GNUC_PREREQ (4, 0)
+extern inline float __copysignf (float x, float y)
+{ return __builtin_copysignf (x, y); }
+#endif
/* ieee style elementary long double functions */
extern long double __ieee754_sqrtl (long double);
@@ -298,6 +306,12 @@ extern long double fabsl (long double x);
extern void __sincosl (long double, long double *, long double *);
extern long double __logbl (long double x);
extern long double __significandl (long double x);
+
+#if __GNUC_PREREQ (4, 0)
+extern inline long double __copysignl (long double x, long double y)
+{ return __builtin_copysignl (x, y); }
+#endif
+
#endif
/* Prototypes for functions of the IBM Accurate Mathematical Library. */
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 187bd42..87d4005 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -46,7 +46,8 @@
#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
&& defined __OPTIMIZE__
-#define __inline_copysign(NAME, TYPE) \
+#if !__GNUC_PREREQ (4, 0)
+# define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
__NTH (NAME (TYPE __x, TYPE __y)) \
{ \
@@ -60,19 +61,11 @@ __inline_copysign (copysignf, float)
__inline_copysign (__copysign, double)
__inline_copysign (copysign, double)
-#undef __MATH_INLINE_copysign
+# undef __inline_copysign
+#endif
-#if __GNUC_PREREQ (2, 8)
-__MATH_INLINE float
-__NTH (__fabsf (float __x)) { return __builtin_fabsf (__x); }
-__MATH_INLINE float
-__NTH (fabsf (float __x)) { return __builtin_fabsf (__x); }
-__MATH_INLINE double
-__NTH (__fabs (double __x)) { return __builtin_fabs (__x); }
-__MATH_INLINE double
-__NTH (fabs (double __x)) { return __builtin_fabs (__x); }
-#else
+#if !__GNUC_PREREQ (2, 8)
# define __inline_fabs(NAME, TYPE) \
__MATH_INLINE TYPE \
__NTH (NAME (TYPE __x)) \