]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use libm_alias_double for some dbl-64 functions.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 29 Sep 2017 23:54:33 +0000 (23:54 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 29 Sep 2017 23:54:33 +0000 (23:54 +0000)
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.

41 files changed:
ChangeLog
sysdeps/ieee754/dbl-64/s_asinh.c
sysdeps/ieee754/dbl-64/s_cbrt.c
sysdeps/ieee754/dbl-64/s_copysign.c
sysdeps/ieee754/dbl-64/s_erf.c
sysdeps/ieee754/dbl-64/s_expm1.c
sysdeps/ieee754/dbl-64/s_fabs.c
sysdeps/ieee754/dbl-64/s_fromfp.c
sysdeps/ieee754/dbl-64/s_fromfp_main.c
sysdeps/ieee754/dbl-64/s_fromfpx.c
sysdeps/ieee754/dbl-64/s_getpayload.c
sysdeps/ieee754/dbl-64/s_llrint.c
sysdeps/ieee754/dbl-64/s_lrint.c
sysdeps/ieee754/dbl-64/s_nextup.c
sysdeps/ieee754/dbl-64/s_roundeven.c
sysdeps/ieee754/dbl-64/s_setpayload.c
sysdeps/ieee754/dbl-64/s_setpayload_main.c
sysdeps/ieee754/dbl-64/s_setpayloadsig.c
sysdeps/ieee754/dbl-64/s_sin.c
sysdeps/ieee754/dbl-64/s_sincos.c
sysdeps/ieee754/dbl-64/s_tanh.c
sysdeps/ieee754/dbl-64/s_totalorder.c
sysdeps/ieee754/dbl-64/s_totalordermag.c
sysdeps/ieee754/dbl-64/s_ufromfp.c
sysdeps/ieee754/dbl-64/s_ufromfpx.c
sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c
sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c
sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c
sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c
sysdeps/ieee754/ldbl-opt/s_asinh.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_cbrt.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_copysign.c
sysdeps/ieee754/ldbl-opt/s_erf.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_expm1.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_fabs.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_llrint.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_lrint.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_sin.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_sincos.c [deleted file]
sysdeps/ieee754/ldbl-opt/s_tanh.c [deleted file]

index b6dbff0624bc472b580b58a7264e0b81eea2f018..3636af0ed6a291bedcaddcf64a40f756ca026f12 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,90 @@
+2017-09-29  Joseph Myers  <joseph@codesourcery.com>
+
+       * 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.
+
 2017-09-29  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/arm/dl-machine.h (elf_machine_load_address): Use
index 9193301b5ebbcdd283ab814e9ff930f2a3d35f2f..31f67e29a07a197c04f845557b4adb75a30a5daf 100644 (file)
@@ -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)
index 689abc89ec8f34983eb0e01456bd42cdb058fdbb..884476c75dfce812dc06e1bfeb3204166c91ac1f 100644 (file)
@@ -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)
index 7755e0d984f08537525ae49fd739da28079ea67f..ab81d732ab5805d99a48417e610e43868066c5a9 100644 (file)
@@ -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)
index 676b6f96e9f2fe133699a22f21be39831c196694..78287fd1cbeadf176604ee1425a910f7e2ecb5f7 100644 (file)
@@ -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)
index 25370d3e78662122231538a6870a3fb9fb696118..3e136e7ee07375d6b7aeafbfe9cafca5412acd12 100644 (file)
 #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)
index 73c09a269ec47b73a51ab7c9c012890f29cc5302..823218332496bd9ee80ac877546a953e8ae60b5d 100644 (file)
@@ -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)
index efc02f74814fb4954805ecfd3ced9dd6a692be61..30572b2a9be18dd779b1618048027b92f09410da 100644 (file)
@@ -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)
index ca0aa82092c1d87e03dcd0c1fa3d7e35c18fa127..c0539224ac5d084c4c195b346c8abbb8f45f3543 100644 (file)
@@ -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>
 
index 4451b2d08b2a9379abeb335ce4d4481c00539f03..b7a0d59a0506c609e224064929ea2f15071c6022 100644 (file)
@@ -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)
index a868109e0a45d2ef85fd8950e83955bfaff7e827..632d78e4bec8b1fc71859c48844c969f2be4e3ab 100644 (file)
@@ -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)
index 574c6087ee6541c51e186245995955b0aa0d8cd8..b643563c44a0b50bf940c150fed71c9f33f3eae3 100644 (file)
@@ -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)
index d2da6f9a5dc3c4f4d4fe1a9aa03c99be7ae969d3..26ac66465d0dde8b2fc9052f83dc045715c30cd4 100644 (file)
@@ -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)
index fb01859e9152034f8ef45e44ce0043c94c4b315e..624e1f075dda611d9253e8836ca7004032b5c2b2 100644 (file)
@@ -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)
index feb874c3364328b35d502a3fb4273971516b9744..402f68a68dfb651eb532d0bc2d43eb2c8547d46b 100644 (file)
@@ -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)
index a37846aa532cfb88ccc29d0c1d4dd8d87bab61ee..0f536956f49ca637465461459ac834eff780def0 100644 (file)
@@ -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)
index c6128c7fe4d1dc2a42f26d7878f0d36d2e98c0d2..98cf1d1bbe79a7290c4083b11b0812a72a1d6bac 100644 (file)
@@ -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>
 
index ad1ee7a3f35e56a675e051f6eeb4a3ff3c250bc7..96ea34b07005cd2ec9f2633c01afbeeee31ed750 100644 (file)
@@ -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)
index c258d39e494b009963f35da92d12fcad60a325db..3572af301fae46c35b1d8cce7d8f80ca3b95b40a 100644 (file)
@@ -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
index 05cff50ce81dac57b86603e2aa777a82485af267..19c4d320c406b617a0bbd92108b8f82488cf636b 100644 (file)
@@ -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)
index 344a2f0330e21b146b47542c49c2ed849b827527..321bf4414226be9e8522821e1695adf4f1ba9645 100644 (file)
@@ -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)
index 25043193193b7c61a6abe5af36ab24fab9e7b897..d67347897b295d911c40221a65364869b34be386 100644 (file)
@@ -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)
index b5f3cff67eb5eff79000f4dd5dd43f8a41384c17..c0ba226b2d3fa8d3841740ad9570ed2b1759c25a 100644 (file)
@@ -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)
index f2b9537338ed1661881e4f0d313f00b8d33fee29..2532215981d33c27d9fdeea8609d3bbdd9ebcd4b 100644 (file)
@@ -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)
index f360e760e2b5628d404cf314171d56f1d48e4a93..0945dfce0830741e56f984f075d1063a5d088b5c 100644 (file)
@@ -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)
index 79a62e3e63898c829fbc12e8a9988450087c0e42..85eecb1c1f4490f9616f009ad1449ae9829f8185 100644 (file)
@@ -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)
index 3f7619b5f345085d78c8075dbe4a71499c809447..828c3760fd73560b1888a62e2465c14c04a910ea 100644 (file)
@@ -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)
index d4f6d55432a30673a71dcb4ad751dd36f290e035..023b7cdb640af99b897f7826dab40fdd21987d80 100644 (file)
@@ -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>
 
index 1d2b3d97104c57378e09286b8e668d4054532d01..1db23e2432410539c0e96b8c61da1d258d66bf72 100644 (file)
@@ -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)
index 94ce11ccc5a56244b1a5727b46a6975adf402753..7fcab90766fb2ec3c9e57152b770f8956ff03109 100644 (file)
@@ -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 (file)
index e9bcfae..0000000
+++ /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 (file)
index cdc6357..0000000
+++ /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
index f4303f576874ac0f849dd06bffe4dc4b9f71cf4b..8d42a181df73657e4baab5a5376135cbfce4b439 100644 (file)
@@ -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 (file)
index 76f1baa..0000000
+++ /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 (file)
index ef9b595..0000000
+++ /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 (file)
index e7c9218..0000000
+++ /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 (file)
index e631197..0000000
+++ /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 (file)
index b7af812..0000000
+++ /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 (file)
index 6932ccc..0000000
+++ /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 (file)
index 6d2a48f..0000000
+++ /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 (file)
index e763bbd..0000000
+++ /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