aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-09-29 23:54:33 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-09-29 23:54:33 +0000
commit1e2bffd05c36a9be30d7092d6593a9e9aa009ada (patch)
tree58c96efbf24f98615dee97efafe6528b3d47e8b5 /sysdeps
parent8172aad937f52fe4ae891a206492150815791f2a (diff)
downloadglibc-1e2bffd05c36a9be30d7092d6593a9e9aa009ada.zip
glibc-1e2bffd05c36a9be30d7092d6593a9e9aa009ada.tar.gz
glibc-1e2bffd05c36a9be30d7092d6593a9e9aa009ada.tar.bz2
Use libm_alias_double for some dbl-64 functions.
Continuing the move of libm aliases to common macros that can create _FloatN / _FloatNx aliases in future, this patch converts some dbl-64 functions to using libm_alias_double, thereby eliminating the need for some ldbl-opt wrappers. This patch deliberately limits what functions are converted so that it can be verified by comparison of stipped binaries. Specifically, atan and tan are excluded because they first need converting to being weak aliases; fma is omitted as it has additional complications with versions in other directories (removing the ldbl-opt version can e.g. cause the ldbl-128 version to be used instead of dbl-64); and functions that have both dbl-64/wordsize-64 and ldbl-opt versions are excluded because ldbl-opt currently always wraps dbl-64 function versions, so changing those will result in platforms using both ldbl-opt and dbl-64/wordsize-64 (i.e. alpha) starting to use the dbl-64/wordsize-64 versions of those functions (which is good, as an optimization, but still best separated from the present patch to get better validation). Tested for x86_64, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/ieee754/dbl-64/s_asinh.c: Include <libm-alias-double.h>. (asinh): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_cbrt.c: Include <libm-alias-double.h>. (cbrt): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_copysign.c: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_erf.c: Include <libm-alias-double.h>. (erf): Define using libm_alias_double. (erfc): Likewise. * sysdeps/ieee754/dbl-64/s_expm1.c: Include <libm-alias-double.h>. (expm1): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_fabs.c: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_fromfp.c (fromfp): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_fromfp_main.c: Include <libm-alias-double.h>. * sysdeps/ieee754/dbl-64/s_fromfpx.c (fromfpx): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_getpayload.c: Include <libm-alias-double.h>. (getpayload): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_llrint.c: Include <libm-alias-double.h>. (llrint): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_lrint.c: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_nextup.c: Include <libm-alias-double.h>. (nextup): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_roundeven.c: Include <libm-alias-double.h>. (roundeven): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_setpayload.c (setpayload): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_setpayload_main.c: Include <libm-alias-double.h>. * sysdeps/ieee754/dbl-64/s_setpayloadsig.c (setpayloadsig): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_sin.c: Include <libm-alias-double.h>. (cos): Define using libm_alias_double. (sin): Likewise. * sysdeps/ieee754/dbl-64/s_sincos.c: Include <libm-alias-double.h>. (sincos): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_tanh.c: Include <libm-alias-double.h>. (tanh): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_totalorder.c: Include <libm-alias-double.h>. (totalorder): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_totalordermag.c: Include <libm-alias-double.h>. (totalordermag): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_ufromfp.c (ufromfp): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_ufromfpx.c (ufromfpx): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c: Include <libm-alias-double.h>. (getpayload): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c: Include <libm-alias-double.h>. (roundeven): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c: Include <libm-alias-double.h>. * sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c: Include <libm-alias-double.h>. (totalorder): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c: Include <libm-alias-double.h>. (totalordermag): Define using libm_alias_double. * sysdeps/ieee754/ldbl-opt/s_copysign.c (copysignl): Only define libc compat symbol here. * sysdeps/ieee754/ldbl-opt/s_asinh.c: Remove file. * sysdeps/ieee754/ldbl-opt/s_cbrt.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_erf.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_expm1.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_fabs.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_llrint.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_lrint.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_sin.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_sincos.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_tanh.c: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/dbl-64/s_asinh.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_cbrt.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_copysign.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_erf.c13
-rw-r--r--sysdeps/ieee754/dbl-64/s_expm1.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_fabs.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_fromfp.c6
-rw-r--r--sysdeps/ieee754/dbl-64/s_fromfp_main.c1
-rw-r--r--sysdeps/ieee754/dbl-64/s_fromfpx.c6
-rw-r--r--sysdeps/ieee754/dbl-64/s_getpayload.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_llrint.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_lrint.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_nextup.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_roundeven.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_setpayload.c6
-rw-r--r--sysdeps/ieee754/dbl-64/s_setpayload_main.c1
-rw-r--r--sysdeps/ieee754/dbl-64/s_setpayloadsig.c6
-rw-r--r--sysdeps/ieee754/dbl-64/s_sin.c13
-rw-r--r--sysdeps/ieee754/dbl-64/s_sincos.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_tanh.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_totalorder.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_totalordermag.c7
-rw-r--r--sysdeps/ieee754/dbl-64/s_ufromfp.c6
-rw-r--r--sysdeps/ieee754/dbl-64/s_ufromfpx.c6
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c7
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c7
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c1
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c7
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c7
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_asinh.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_cbrt.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_copysign.c6
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_erf.c6
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_expm1.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_fabs.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_llrint.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_lrint.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_sin.c15
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_sincos.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_tanh.c5
40 files changed, 52 insertions, 206 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_asinh.c b/sysdeps/ieee754/dbl-64/s_asinh.c
index 9193301..31f67e2 100644
--- a/sysdeps/ieee754/dbl-64/s_asinh.c
+++ b/sysdeps/ieee754/dbl-64/s_asinh.c
@@ -24,6 +24,7 @@
#include <float.h>
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
static const double
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
@@ -65,8 +66,4 @@ __asinh (double x)
}
return __copysign (w, x);
}
-weak_alias (__asinh, asinh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__asinh, __asinhl)
-weak_alias (__asinh, asinhl)
-#endif
+libm_alias_double (__asinh, asinh)
diff --git a/sysdeps/ieee754/dbl-64/s_cbrt.c b/sysdeps/ieee754/dbl-64/s_cbrt.c
index 689abc8..884476c 100644
--- a/sysdeps/ieee754/dbl-64/s_cbrt.c
+++ b/sysdeps/ieee754/dbl-64/s_cbrt.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#define CBRT2 1.2599210498948731648 /* 2^(1/3) */
@@ -69,8 +70,4 @@ __cbrt (double x)
return __ldexp (x > 0.0 ? ym : -ym, xe / 3);
}
-weak_alias (__cbrt, cbrt)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cbrt, __cbrtl)
-weak_alias (__cbrt, cbrtl)
-#endif
+libm_alias_double (__cbrt, cbrt)
diff --git a/sysdeps/ieee754/dbl-64/s_copysign.c b/sysdeps/ieee754/dbl-64/s_copysign.c
index 7755e0d..ab81d73 100644
--- a/sysdeps/ieee754/dbl-64/s_copysign.c
+++ b/sysdeps/ieee754/dbl-64/s_copysign.c
@@ -22,6 +22,7 @@ static char rcsid[] = "$NetBSD: s_copysign.c,v 1.8 1995/05/10 20:46:57 jtc Exp $
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
double
__copysign (double x, double y)
@@ -32,8 +33,4 @@ __copysign (double x, double y)
SET_HIGH_WORD (x, (hx & 0x7fffffff) | (hy & 0x80000000));
return x;
}
-weak_alias (__copysign, copysign)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__copysign, __copysignl)
-weak_alias (__copysign, copysignl)
-#endif
+libm_alias_double (__copysign, copysign)
diff --git a/sysdeps/ieee754/dbl-64/s_erf.c b/sysdeps/ieee754/dbl-64/s_erf.c
index 676b6f9..78287fd 100644
--- a/sysdeps/ieee754/dbl-64/s_erf.c
+++ b/sysdeps/ieee754/dbl-64/s_erf.c
@@ -116,6 +116,7 @@ static char rcsid[] = "$NetBSD: s_erf.c,v 1.8 1995/05/10 20:47:05 jtc Exp $";
#include <float.h>
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <fix-int-fp-convert-zero.h>
static const double
@@ -294,11 +295,7 @@ __erf (double x)
else
return r / x - one;
}
-weak_alias (__erf, erf)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__erf, __erfl)
-weak_alias (__erf, erfl)
-#endif
+libm_alias_double (__erf, erf)
double
__erfc (double x)
@@ -421,8 +418,4 @@ __erfc (double x)
return two - tiny;
}
}
-weak_alias (__erfc, erfc)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__erfc, __erfcl)
-weak_alias (__erfc, erfcl)
-#endif
+libm_alias_double (__erfc, erfc)
diff --git a/sysdeps/ieee754/dbl-64/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c
index 25370d3..3e136e7 100644
--- a/sysdeps/ieee754/dbl-64/s_expm1.c
+++ b/sysdeps/ieee754/dbl-64/s_expm1.c
@@ -112,6 +112,7 @@
#include <float.h>
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#define one Q[0]
static const double
huge = 1.0e+300,
@@ -255,8 +256,4 @@ __expm1 (double x)
}
return y;
}
-weak_alias (__expm1, expm1)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__expm1, __expm1l)
-weak_alias (__expm1, expm1l)
-#endif
+libm_alias_double (__expm1, expm1)
diff --git a/sysdeps/ieee754/dbl-64/s_fabs.c b/sysdeps/ieee754/dbl-64/s_fabs.c
index 73c09a2..8232183 100644
--- a/sysdeps/ieee754/dbl-64/s_fabs.c
+++ b/sysdeps/ieee754/dbl-64/s_fabs.c
@@ -19,14 +19,11 @@ static char rcsid[] = "$NetBSD: s_fabs.c,v 1.7 1995/05/10 20:47:13 jtc Exp $";
*/
#include <math.h>
+#include <libm-alias-double.h>
double
__fabs (double x)
{
return __builtin_fabs (x);
}
-weak_alias (__fabs, fabs)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fabs, __fabsl)
-weak_alias (__fabs, fabsl)
-#endif
+libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/ieee754/dbl-64/s_fromfp.c b/sysdeps/ieee754/dbl-64/s_fromfp.c
index efc02f7..30572b2 100644
--- a/sysdeps/ieee754/dbl-64/s_fromfp.c
+++ b/sysdeps/ieee754/dbl-64/s_fromfp.c
@@ -2,8 +2,4 @@
#define INEXACT 0
#define FUNC __fromfp
#include <s_fromfp_main.c>
-weak_alias (__fromfp, fromfp)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fromfp, __fromfpl)
-weak_alias (__fromfp, fromfpl)
-#endif
+libm_alias_double (__fromfp, fromfp)
diff --git a/sysdeps/ieee754/dbl-64/s_fromfp_main.c b/sysdeps/ieee754/dbl-64/s_fromfp_main.c
index ca0aa82..c053922 100644
--- a/sysdeps/ieee754/dbl-64/s_fromfp_main.c
+++ b/sysdeps/ieee754/dbl-64/s_fromfp_main.c
@@ -20,6 +20,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <stdbool.h>
#include <stdint.h>
diff --git a/sysdeps/ieee754/dbl-64/s_fromfpx.c b/sysdeps/ieee754/dbl-64/s_fromfpx.c
index 4451b2d..b7a0d59 100644
--- a/sysdeps/ieee754/dbl-64/s_fromfpx.c
+++ b/sysdeps/ieee754/dbl-64/s_fromfpx.c
@@ -2,8 +2,4 @@
#define INEXACT 1
#define FUNC __fromfpx
#include <s_fromfp_main.c>
-weak_alias (__fromfpx, fromfpx)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fromfpx, __fromfpxl)
-weak_alias (__fromfpx, fromfpxl)
-#endif
+libm_alias_double (__fromfpx, fromfpx)
diff --git a/sysdeps/ieee754/dbl-64/s_getpayload.c b/sysdeps/ieee754/dbl-64/s_getpayload.c
index a868109..632d78e 100644
--- a/sysdeps/ieee754/dbl-64/s_getpayload.c
+++ b/sysdeps/ieee754/dbl-64/s_getpayload.c
@@ -19,6 +19,7 @@
#include <fix-int-fp-convert-zero.h>
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <stdint.h>
double
@@ -32,8 +33,4 @@ __getpayload (const double *x)
return 0.0f;
return (double) ix;
}
-weak_alias (__getpayload, getpayload)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__getpayload, __getpayloadl)
-weak_alias (__getpayload, getpayloadl)
-#endif
+libm_alias_double (__getpayload, getpayload)
diff --git a/sysdeps/ieee754/dbl-64/s_llrint.c b/sysdeps/ieee754/dbl-64/s_llrint.c
index 574c608..b643563 100644
--- a/sysdeps/ieee754/dbl-64/s_llrint.c
+++ b/sysdeps/ieee754/dbl-64/s_llrint.c
@@ -23,6 +23,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <fix-fp-int-convert-overflow.h>
static const double two52[2] =
@@ -96,8 +97,4 @@ __llrint (double x)
return sx ? -result : result;
}
-weak_alias (__llrint, llrint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__llrint, __llrintl)
-weak_alias (__llrint, llrintl)
-#endif
+libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/ieee754/dbl-64/s_lrint.c b/sysdeps/ieee754/dbl-64/s_lrint.c
index d2da6f9..26ac664 100644
--- a/sysdeps/ieee754/dbl-64/s_lrint.c
+++ b/sysdeps/ieee754/dbl-64/s_lrint.c
@@ -23,6 +23,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <fix-fp-int-convert-overflow.h>
static const double two52[2] =
@@ -120,8 +121,4 @@ __lrint (double x)
return sx ? -result : result;
}
-weak_alias (__lrint, lrint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lrint, __lrintl)
-weak_alias (__lrint, lrintl)
-#endif
+libm_alias_double (__lrint, lrint)
diff --git a/sysdeps/ieee754/dbl-64/s_nextup.c b/sysdeps/ieee754/dbl-64/s_nextup.c
index fb01859..624e1f0 100644
--- a/sysdeps/ieee754/dbl-64/s_nextup.c
+++ b/sysdeps/ieee754/dbl-64/s_nextup.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
/* Return the least floating-point number greater than X. */
double
@@ -51,8 +52,4 @@ __nextup (double x)
return x;
}
-weak_alias (__nextup, nextup)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__nextup, __nextupl)
-weak_alias (__nextup, nextupl)
-#endif
+libm_alias_double (__nextup, nextup)
diff --git a/sysdeps/ieee754/dbl-64/s_roundeven.c b/sysdeps/ieee754/dbl-64/s_roundeven.c
index feb874c..402f68a 100644
--- a/sysdeps/ieee754/dbl-64/s_roundeven.c
+++ b/sysdeps/ieee754/dbl-64/s_roundeven.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <stdint.h>
#define BIAS 0x3ff
@@ -101,8 +102,4 @@ __roundeven (double x)
return x;
}
hidden_def (__roundeven)
-weak_alias (__roundeven, roundeven)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__roundeven, __roundevenl)
-weak_alias (__roundeven, roundevenl)
-#endif
+libm_alias_double (__roundeven, roundeven)
diff --git a/sysdeps/ieee754/dbl-64/s_setpayload.c b/sysdeps/ieee754/dbl-64/s_setpayload.c
index a37846a..0f53695 100644
--- a/sysdeps/ieee754/dbl-64/s_setpayload.c
+++ b/sysdeps/ieee754/dbl-64/s_setpayload.c
@@ -1,8 +1,4 @@
#define SIG 0
#define FUNC __setpayload
#include <s_setpayload_main.c>
-weak_alias (__setpayload, setpayload)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__setpayload, __setpayloadl)
-weak_alias (__setpayload, setpayloadl)
-#endif
+libm_alias_double (__setpayload, setpayload)
diff --git a/sysdeps/ieee754/dbl-64/s_setpayload_main.c b/sysdeps/ieee754/dbl-64/s_setpayload_main.c
index c6128c7..98cf1d1 100644
--- a/sysdeps/ieee754/dbl-64/s_setpayload_main.c
+++ b/sysdeps/ieee754/dbl-64/s_setpayload_main.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <nan-high-order-bit.h>
#include <stdint.h>
diff --git a/sysdeps/ieee754/dbl-64/s_setpayloadsig.c b/sysdeps/ieee754/dbl-64/s_setpayloadsig.c
index ad1ee7a..96ea34b 100644
--- a/sysdeps/ieee754/dbl-64/s_setpayloadsig.c
+++ b/sysdeps/ieee754/dbl-64/s_setpayloadsig.c
@@ -1,8 +1,4 @@
#define SIG 1
#define FUNC __setpayloadsig
#include <s_setpayload_main.c>
-weak_alias (__setpayloadsig, setpayloadsig)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__setpayloadsig, __setpayloadsigl)
-weak_alias (__setpayloadsig, setpayloadsigl)
-#endif
+libm_alias_double (__setpayloadsig, setpayloadsig)
diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
index c258d39..3572af3 100644
--- a/sysdeps/ieee754/dbl-64/s_sin.c
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
@@ -52,6 +52,7 @@
#include "MathLib.h"
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <fenv.h>
/* Helper macros to compute sin of the input values. */
@@ -912,16 +913,8 @@ cslow2 (double x)
}
#ifndef __cos
-weak_alias (__cos, cos)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__cos, __cosl)
-weak_alias (__cos, cosl)
-# endif
+libm_alias_double (__cos, cos)
#endif
#ifndef __sin
-weak_alias (__sin, sin)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__sin, __sinl)
-weak_alias (__sin, sinl)
-# endif
+libm_alias_double (__sin, sin)
#endif
diff --git a/sysdeps/ieee754/dbl-64/s_sincos.c b/sysdeps/ieee754/dbl-64/s_sincos.c
index 05cff50..19c4d32 100644
--- a/sysdeps/ieee754/dbl-64/s_sincos.c
+++ b/sysdeps/ieee754/dbl-64/s_sincos.c
@@ -21,6 +21,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#define __sin __sin_local
#define __cos __cos_local
@@ -106,8 +107,4 @@ __sincos (double x, double *sinx, double *cosx)
*sinx = *cosx = x / x;
}
-weak_alias (__sincos, sincos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__sincos, __sincosl)
-weak_alias (__sincos, sincosl)
-#endif
+libm_alias_double (__sincos, sincos)
diff --git a/sysdeps/ieee754/dbl-64/s_tanh.c b/sysdeps/ieee754/dbl-64/s_tanh.c
index 344a2f0..321bf44 100644
--- a/sysdeps/ieee754/dbl-64/s_tanh.c
+++ b/sysdeps/ieee754/dbl-64/s_tanh.c
@@ -41,6 +41,7 @@ static char rcsid[] = "$NetBSD: s_tanh.c,v 1.7 1995/05/10 20:48:22 jtc Exp $";
#include <float.h>
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
static const double one = 1.0, two = 2.0, tiny = 1.0e-300;
@@ -91,8 +92,4 @@ __tanh (double x)
}
return (jx >= 0) ? z : -z;
}
-weak_alias (__tanh, tanh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__tanh, __tanhl)
-weak_alias (__tanh, tanhl)
-#endif
+libm_alias_double (__tanh, tanh)
diff --git a/sysdeps/ieee754/dbl-64/s_totalorder.c b/sysdeps/ieee754/dbl-64/s_totalorder.c
index 2504319..d673478 100644
--- a/sysdeps/ieee754/dbl-64/s_totalorder.c
+++ b/sysdeps/ieee754/dbl-64/s_totalorder.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <nan-high-order-bit.h>
#include <stdint.h>
@@ -49,8 +50,4 @@ __totalorder (double x, double y)
ly ^= hy_sign;
return hx < hy || (hx == hy && lx <= ly);
}
-weak_alias (__totalorder, totalorder)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__totalorder, __totalorderl)
-weak_alias (__totalorder, totalorderl)
-#endif
+libm_alias_double (__totalorder, totalorder)
diff --git a/sysdeps/ieee754/dbl-64/s_totalordermag.c b/sysdeps/ieee754/dbl-64/s_totalordermag.c
index b5f3cff..c0ba226 100644
--- a/sysdeps/ieee754/dbl-64/s_totalordermag.c
+++ b/sysdeps/ieee754/dbl-64/s_totalordermag.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <nan-high-order-bit.h>
#include <stdint.h>
@@ -44,8 +45,4 @@ __totalordermag (double x, double y)
#endif
return hx < hy || (hx == hy && lx <= ly);
}
-weak_alias (__totalordermag, totalordermag)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__totalordermag, __totalordermagl)
-weak_alias (__totalordermag, totalordermagl)
-#endif
+libm_alias_double (__totalordermag, totalordermag)
diff --git a/sysdeps/ieee754/dbl-64/s_ufromfp.c b/sysdeps/ieee754/dbl-64/s_ufromfp.c
index f2b9537..2532215 100644
--- a/sysdeps/ieee754/dbl-64/s_ufromfp.c
+++ b/sysdeps/ieee754/dbl-64/s_ufromfp.c
@@ -2,8 +2,4 @@
#define INEXACT 0
#define FUNC __ufromfp
#include <s_fromfp_main.c>
-weak_alias (__ufromfp, ufromfp)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ufromfp, __ufromfpl)
-weak_alias (__ufromfp, ufromfpl)
-#endif
+libm_alias_double (__ufromfp, ufromfp)
diff --git a/sysdeps/ieee754/dbl-64/s_ufromfpx.c b/sysdeps/ieee754/dbl-64/s_ufromfpx.c
index f360e76..0945dfc 100644
--- a/sysdeps/ieee754/dbl-64/s_ufromfpx.c
+++ b/sysdeps/ieee754/dbl-64/s_ufromfpx.c
@@ -2,8 +2,4 @@
#define INEXACT 1
#define FUNC __ufromfpx
#include <s_fromfp_main.c>
-weak_alias (__ufromfpx, ufromfpx)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ufromfpx, __ufromfpxl)
-weak_alias (__ufromfpx, ufromfpxl)
-#endif
+libm_alias_double (__ufromfpx, ufromfpx)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
index 79a62e3..85eecb1 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <stdint.h>
double
@@ -28,8 +29,4 @@ __getpayload (const double *x)
ix &= 0x7ffffffffffffULL;
return (double) ix;
}
-weak_alias (__getpayload, getpayload)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__getpayload, __getpayloadl)
-weak_alias (__getpayload, getpayloadl)
-#endif
+libm_alias_double (__getpayload, getpayload)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c
index 3f7619b..828c376 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <stdint.h>
#define BIAS 0x3ff
@@ -67,8 +68,4 @@ __roundeven (double x)
return x;
}
hidden_def (__roundeven)
-weak_alias (__roundeven, roundeven)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__roundeven, __roundevenl)
-weak_alias (__roundeven, roundevenl)
-#endif
+libm_alias_double (__roundeven, roundeven)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c
index d4f6d55..023b7cd 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <math_private.h>
+#include <libm-alias-double.h>
#include <nan-high-order-bit.h>
#include <stdint.h>
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c
index 1d2b3d9..1db23e2 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <nan-high-order-bit.h>
+#include <libm-alias-double.h>
#include <stdint.h>
int
@@ -45,8 +46,4 @@ __totalorder (double x, double y)
iy ^= iy_sign >> 1;
return ix <= iy;
}
-weak_alias (__totalorder, totalorder)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__totalorder, __totalorderl)
-weak_alias (__totalorder, totalorderl)
-#endif
+libm_alias_double (__totalorder, totalorder)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c
index 94ce11c..7fcab90 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <nan-high-order-bit.h>
+#include <libm-alias-double.h>
#include <stdint.h>
int
@@ -42,8 +43,4 @@ __totalordermag (double x, double y)
#endif
return ix <= iy;
}
-weak_alias (__totalordermag, totalordermag)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__totalordermag, __totalordermagl)
-weak_alias (__totalordermag, totalordermagl)
-#endif
+libm_alias_double (__totalordermag, totalordermag)
diff --git a/sysdeps/ieee754/ldbl-opt/s_asinh.c b/sysdeps/ieee754/ldbl-opt/s_asinh.c
deleted file mode 100644
index e9bcfae..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_asinh.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_asinh.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __asinh, asinhl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_cbrt.c b/sysdeps/ieee754/ldbl-opt/s_cbrt.c
deleted file mode 100644
index cdc6357..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_cbrt.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_cbrt.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __cbrt, cbrtl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_copysign.c b/sysdeps/ieee754/ldbl-opt/s_copysign.c
index f4303f5..8d42a18 100644
--- a/sysdeps/ieee754/ldbl-opt/s_copysign.c
+++ b/sysdeps/ieee754/ldbl-opt/s_copysign.c
@@ -1,9 +1,5 @@
#include <math_ldbl_opt.h>
#include <sysdeps/ieee754/dbl-64/s_copysign.c>
-#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)
+#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_erf.c b/sysdeps/ieee754/ldbl-opt/s_erf.c
deleted file mode 100644
index 76f1baa..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_erf.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_erf.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __erf, erfl, GLIBC_2_0);
-compat_symbol (libm, __erfc, erfcl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_expm1.c b/sysdeps/ieee754/ldbl-opt/s_expm1.c
deleted file mode 100644
index ef9b595..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_expm1.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_expm1.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __expm1, expm1l, GLIBC_2_0);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_fabs.c b/sysdeps/ieee754/ldbl-opt/s_fabs.c
deleted file mode 100644
index e7c9218..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_fabs.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_fabs.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_llrint.c b/sysdeps/ieee754/ldbl-opt/s_llrint.c
deleted file mode 100644
index e631197..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_llrint.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_llrint.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_lrint.c b/sysdeps/ieee754/ldbl-opt/s_lrint.c
deleted file mode 100644
index b7af812..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_lrint.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_lrint.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_sin.c b/sysdeps/ieee754/ldbl-opt/s_sin.c
deleted file mode 100644
index 6932ccc..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_sin.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* dbl-64/s_sin.c uses NAN and sincos identifiers internally. */
-#define sincos sincos_disable
-/* These definitions needed for proper unfolding of __MATHDECL_VEC. */
-#define __DECL_SIMD_sincos_disable
-#define __DECL_SIMD_sincos_disablef
-#define __DECL_SIMD_sincos_disablel
-#define __DECL_SIMD_sincos_disablef128
-#include <math_ldbl_opt.h>
-#undef NAN
-#undef sincos
-#include <sysdeps/ieee754/dbl-64/s_sin.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __sin, sinl, GLIBC_2_0);
-compat_symbol (libm, __cos, cosl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_sincos.c b/sysdeps/ieee754/ldbl-opt/s_sincos.c
deleted file mode 100644
index 6d2a48f..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_sincos.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_sincos.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __sincos, sincosl, GLIBC_2_1);
-#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_tanh.c b/sysdeps/ieee754/ldbl-opt/s_tanh.c
deleted file mode 100644
index e763bbd..0000000
--- a/sysdeps/ieee754/ldbl-opt/s_tanh.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <sysdeps/ieee754/dbl-64/s_tanh.c>
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __tanh, tanhl, GLIBC_2_0);
-#endif