about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-11-28 00:07:56 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-11-28 00:07:56 +0000
commit5de606387b60d57399e61bdb78d6697139ceb445 (patch)
tree0062f80fad1e61fcb423a6a420617220f9c86e39 /sysdeps
parentd8124864444fa43fe12d9d907fdb5192927add3f (diff)
downloadglibc-5de606387b60d57399e61bdb78d6697139ceb445.tar.gz
glibc-5de606387b60d57399e61bdb78d6697139ceb445.tar.xz
glibc-5de606387b60d57399e61bdb78d6697139ceb445.zip
Use libm_alias_double for alpha.
Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes alpha libm function implementations use
libm_alias_double to define function aliases.  This also simplifies
the code because the compatibility for long double = double is handled
by libm_alias_double instead of locally in each source file.

Tested with build-many-glibcs.py for alpha-linux-gnu that installed
stripped shared libraries are unchanged by the patch.

	* sysdeps/alpha/fpu/s_ceil.c: Include <libm-alias-double.h>.
	(ceil): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_copysign.c: Include <libm-alias-double.h>.
	(copysign): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_fabs.c: Include <libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_floor.c: Include <libm-alias-double.h>.
	(floor): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_fmax.S: Include <libm-alias-double.h>.
	(fmax): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_fmin.S: Include <libm-alias-double.h>.
	(fmin): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_lrint.c: Include <libm-alias-double.h>.
	(lrint): Define using libm_alias_double.
	(llrint): Likewise.
	* sysdeps/alpha/fpu/s_lround.c: Include <libm-alias-double.h>.
	(lround): Define using libm_alias_double.
	(llround): Likewise.
	* sysdeps/alpha/fpu/s_rint.c: Include <libm-alias-double.h>.
	(rint): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_trunc.c: Include <libm-alias-double.h>.
	(trunc): Define using libm_alias_double.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/fpu/s_ceil.c10
-rw-r--r--sysdeps/alpha/fpu/s_copysign.c13
-rw-r--r--sysdeps/alpha/fpu/s_fabs.c10
-rw-r--r--sysdeps/alpha/fpu/s_floor.c10
-rw-r--r--sysdeps/alpha/fpu/s_fmax.S10
-rw-r--r--sysdeps/alpha/fpu/s_fmin.S10
-rw-r--r--sysdeps/alpha/fpu/s_lrint.c15
-rw-r--r--sysdeps/alpha/fpu/s_lround.c15
-rw-r--r--sysdeps/alpha/fpu/s_rint.c10
-rw-r--r--sysdeps/alpha/fpu/s_trunc.c10
10 files changed, 23 insertions, 90 deletions
diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c
index 029ee09315..38ba34e9ce 100644
--- a/sysdeps/alpha/fpu/s_ceil.c
+++ b/sysdeps/alpha/fpu/s_ceil.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 /* Use the -inf rounding mode conversion instructions to implement
    ceil, via something akin to -floor(-x).  This is much faster than
@@ -46,11 +47,4 @@ __ceil (double x)
   return x;
 }
 
-weak_alias (__ceil, ceil)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ceil, __ceill)
-weak_alias (__ceil, ceill)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __ceil, ceill, GLIBC_2_0);
-#endif
+libm_alias_double (__ceil, ceil)
diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c
index 3bd3dd48df..d5d1f9bfbb 100644
--- a/sysdeps/alpha/fpu/s_copysign.c
+++ b/sysdeps/alpha/fpu/s_copysign.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 double
 __copysign (double x, double y)
@@ -25,15 +26,7 @@ __copysign (double x, double y)
   return __builtin_copysign (x, y);
 }
 
-weak_alias (__copysign, copysign)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__copysign, __copysignl)
-weak_alias (__copysign, copysignl)
-#endif
-#if IS_IN (libm)
-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
-# endif
-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+libm_alias_double (__copysign, copysign)
+#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
 compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
 #endif
diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c
index abcc6e7c75..8be9de4fb6 100644
--- a/sysdeps/alpha/fpu/s_fabs.c
+++ b/sysdeps/alpha/fpu/s_fabs.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 double
 __fabs (double x)
@@ -25,11 +26,4 @@ __fabs (double x)
   return __builtin_fabs (x);
 }
 
-weak_alias (__fabs, fabs)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fabs, __fabsl)
-weak_alias (__fabs, fabsl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
-#endif
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index 49a0c760a9..746957c55d 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 
 /* Use the -inf rounding mode conversion instructions to implement
@@ -47,11 +48,4 @@ __floor (double x)
   return x;
 }
 
-weak_alias (__floor, floor)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__floor, __floorl)
-weak_alias (__floor, floorl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __floor, floorl, GLIBC_2_0);
-#endif
+libm_alias_double (__floor, floor)
diff --git a/sysdeps/alpha/fpu/s_fmax.S b/sysdeps/alpha/fpu/s_fmax.S
index 8a65ae4963..d6c275943f 100644
--- a/sysdeps/alpha/fpu/s_fmax.S
+++ b/sysdeps/alpha/fpu/s_fmax.S
@@ -18,6 +18,7 @@
 
 #include <sysdep.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
         .set noat
 	.set noreorder
@@ -47,11 +48,4 @@ END (__fmax)
 strong_alias (__fmax, __fmaxf)
 weak_alias (__fmaxf, fmaxf)
 
-weak_alias (__fmax, fmax)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fmax, __fmaxl)
-weak_alias (__fmaxl, fmaxl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
-#endif
+libm_alias_double (__fmax, fmax)
diff --git a/sysdeps/alpha/fpu/s_fmin.S b/sysdeps/alpha/fpu/s_fmin.S
index 926bd32ec4..6da4a93a6e 100644
--- a/sysdeps/alpha/fpu/s_fmin.S
+++ b/sysdeps/alpha/fpu/s_fmin.S
@@ -18,6 +18,7 @@
 
 #include <sysdep.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
         .set noat
 	.set noreorder
@@ -47,11 +48,4 @@ END (__fmin)
 strong_alias (__fmin, __fminf)
 weak_alias (__fminf, fminf)
 
-weak_alias (__fmin, fmin)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fmin, __fminl)
-weak_alias (__fminl, fminl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
-#endif
+libm_alias_double (__fmin, fmin)
diff --git a/sysdeps/alpha/fpu/s_lrint.c b/sysdeps/alpha/fpu/s_lrint.c
index 2a644c57df..37cfbac508 100644
--- a/sysdeps/alpha/fpu/s_lrint.c
+++ b/sysdeps/alpha/fpu/s_lrint.c
@@ -19,6 +19,7 @@
 #define llrint		not_llrint
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 #undef __llrint
 #undef llrint
 
@@ -33,15 +34,5 @@ __lrint (double x)
 }
 
 strong_alias (__lrint, __llrint)
-weak_alias (__lrint, lrint)
-weak_alias (__llrint, llrint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lrint, __lrintl)
-strong_alias (__lrint, __llrintl)
-weak_alias (__lrintl, lrintl)
-weak_alias (__llrintl, llrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
-#endif
+libm_alias_double (__lrint, lrint)
+libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/alpha/fpu/s_lround.c b/sysdeps/alpha/fpu/s_lround.c
index 78a067daf1..bd32bf8c25 100644
--- a/sysdeps/alpha/fpu/s_lround.c
+++ b/sysdeps/alpha/fpu/s_lround.c
@@ -19,6 +19,7 @@
 #define llround		not_llround
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 #undef __llround
 #undef llround
 
@@ -33,15 +34,5 @@ __lround (double x)
 }
 
 strong_alias (__lround, __llround)
-weak_alias (__lround, lround)
-weak_alias (__llround, llround)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lround, __lroundl)
-strong_alias (__lround, __llroundl)
-weak_alias (__lroundl, lroundl)
-weak_alias (__llroundl, llroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
-compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
-#endif
+libm_alias_double (__lround, lround)
+libm_alias_double (__llround, llround)
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c
index fca35cf961..737988adca 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_rint.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 
 double
@@ -41,11 +42,4 @@ __rint (double x)
   return x;
 }
 
-weak_alias (__rint, rint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
-#endif
+libm_alias_double (__rint, rint)
diff --git a/sysdeps/alpha/fpu/s_trunc.c b/sysdeps/alpha/fpu/s_trunc.c
index 68a013d222..ba3af86e4d 100644
--- a/sysdeps/alpha/fpu/s_trunc.c
+++ b/sysdeps/alpha/fpu/s_trunc.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 
 /* Use the chopped rounding mode conversion instructions to implement trunc. */
@@ -41,11 +42,4 @@ __trunc (double x)
   return copysign (r, x);
 }
 
-weak_alias (__trunc, trunc)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__trunc, __truncl)
-weak_alias (__trunc, truncl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __trunc, truncl, GLIBC_2_1);
-#endif
+libm_alias_double (__trunc, trunc)