From 51ea3b2042ae5012c8e93142baf2e4e84909ff5f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 Dec 2017 23:09:47 +0000 Subject: [PATCH] Ues libm_alias_double for various powerpc functions. Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch various powerpc functions use libm_alias_double to define function aliases (with consequent removal of the need for local compat symbol handling). (The present patch excludes the changes to some functions where such changes could result in differences in installed stripped shared libraries because of changes to the exact ordering or properties of symbols in individual .os files.) Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged for all its hard-float powerpc configurations. * sysdeps/powerpc/fpu/s_rint.c: Include . (rint): Define using libm_alias_double. * sysdeps/powerpc/power5+/fpu/s_modf.c: Include . (modf): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include . (ceil): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include . (floor): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S: Include . (nearbyint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include . (rint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include . (round): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include . (trunc): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c: Include . (ceil): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c: Include . (floor): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c: Include . (modf): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c: Include . (round): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c: Include . (trunc): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S: Include . (ceil): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S: Include . (floor): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S: Include . (round): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S: Include . (trunc): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c: Include . (ceil): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c: Include . (floor): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c: Include . (modf): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c: Include . (round): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c: Include . (trunc): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include . (ceil): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include . (floor): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S: Include . (nearbyint): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include . (rint): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include . (round): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include . (trunc): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: Include . (ceil): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: Include . (floor): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: Include . (round): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: Include . (trunc): Define using libm_alias_double. --- ChangeLog | 96 +++++++++++++++++++ sysdeps/powerpc/fpu/s_rint.c | 7 +- sysdeps/powerpc/power5+/fpu/s_modf.c | 13 +-- sysdeps/powerpc/powerpc32/fpu/s_ceil.S | 11 +-- sysdeps/powerpc/powerpc32/fpu/s_floor.S | 11 +-- sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S | 11 +-- sysdeps/powerpc/powerpc32/fpu/s_rint.S | 11 +-- sysdeps/powerpc/powerpc32/fpu/s_round.S | 11 +-- sysdeps/powerpc/powerpc32/fpu/s_trunc.S | 11 +-- .../powerpc32/power4/fpu/multiarch/s_ceil.c | 11 +-- .../powerpc32/power4/fpu/multiarch/s_floor.c | 11 +-- .../powerpc32/power4/fpu/multiarch/s_modf.c | 13 +-- .../powerpc32/power4/fpu/multiarch/s_round.c | 11 +-- .../powerpc32/power4/fpu/multiarch/s_trunc.c | 11 +-- .../powerpc/powerpc32/power5+/fpu/s_ceil.S | 11 +-- .../powerpc/powerpc32/power5+/fpu/s_floor.S | 11 +-- .../powerpc/powerpc32/power5+/fpu/s_round.S | 11 +-- .../powerpc/powerpc32/power5+/fpu/s_trunc.S | 11 +-- .../powerpc/powerpc64/fpu/multiarch/s_ceil.c | 11 +-- .../powerpc/powerpc64/fpu/multiarch/s_floor.c | 11 +-- .../powerpc/powerpc64/fpu/multiarch/s_modf.c | 13 +-- .../powerpc/powerpc64/fpu/multiarch/s_round.c | 11 +-- .../powerpc/powerpc64/fpu/multiarch/s_trunc.c | 11 +-- sysdeps/powerpc/powerpc64/fpu/s_ceil.S | 11 +-- sysdeps/powerpc/powerpc64/fpu/s_floor.S | 11 +-- sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S | 11 +-- sysdeps/powerpc/powerpc64/fpu/s_rint.S | 11 +-- sysdeps/powerpc/powerpc64/fpu/s_round.S | 11 +-- sysdeps/powerpc/powerpc64/fpu/s_trunc.S | 11 +-- .../powerpc/powerpc64/power5+/fpu/s_ceil.S | 11 +-- .../powerpc/powerpc64/power5+/fpu/s_floor.S | 11 +-- .../powerpc/powerpc64/power5+/fpu/s_round.S | 11 +-- .../powerpc/powerpc64/power5+/fpu/s_trunc.S | 11 +-- 33 files changed, 163 insertions(+), 287 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b13d0dc205..27b49cd1b26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,101 @@ 2017-12-01 Joseph Myers + * sysdeps/powerpc/fpu/s_rint.c: Include . + (rint): Define using libm_alias_double. + * sysdeps/powerpc/power5+/fpu/s_modf.c: Include + . + (modf): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include + . + (ceil): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include + . + (floor): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S: Include + . + (nearbyint): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include + . + (rint): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include + . + (round): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include + . + (trunc): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c: Include + . + (ceil): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c: + Include . + (floor): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c: Include + . + (modf): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c: + Include . + (round): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c: + Include . + (trunc): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S: Include + . + (ceil): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S: Include + . + (floor): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S: Include + . + (round): Define using libm_alias_double. + * sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S: Include + . + (trunc): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c: Include + . + (ceil): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c: Include + . + (floor): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c: Include + . + (modf): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c: Include + . + (round): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c: Include + . + (trunc): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include + . + (ceil): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include + . + (floor): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S: Include + . + (nearbyint): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include + . + (rint): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include + . + (round): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include + . + (trunc): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: Include + . + (ceil): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: Include + . + (floor): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: Include + . + (round): Define using libm_alias_double. + * sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: Include + . + (trunc): Define using libm_alias_double. + * sysdeps/powerpc/fpu/s_fabs.S: Include . (fabs): Define using libm_alias_double. * sysdeps/powerpc/fpu/s_fma.S: Include . diff --git a/sysdeps/powerpc/fpu/s_rint.c b/sysdeps/powerpc/fpu/s_rint.c index a96140b2c93..b382b10686c 100644 --- a/sysdeps/powerpc/fpu/s_rint.c +++ b/sysdeps/powerpc/fpu/s_rint.c @@ -17,6 +17,7 @@ . */ #include +#include double __rint (double x) @@ -39,8 +40,4 @@ __rint (double x) return x; } -weak_alias (__rint, rint) -#ifdef NO_LONG_DOUBLE -strong_alias (__rint, __rintl) -weak_alias (__rint, rintl) -#endif +libm_alias_double (__rint, rint) diff --git a/sysdeps/powerpc/power5+/fpu/s_modf.c b/sysdeps/powerpc/power5+/fpu/s_modf.c index ee0c62874b6..f0e7dbee01c 100644 --- a/sysdeps/powerpc/power5+/fpu/s_modf.c +++ b/sysdeps/powerpc/power5+/fpu/s_modf.c @@ -18,6 +18,7 @@ #include #include #include +#include double __modf (double x, double *iptr) @@ -44,15 +45,7 @@ __modf (double x, double *iptr) return __copysign (x - *iptr, x); } } -weak_alias (__modf, modf) -#ifdef NO_LONG_DOUBLE -strong_alias (__modf, __modfl) -weak_alias (__modf, modfl) -#endif -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __modf, modfl, GLIBC_2_0); -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +libm_alias_double (__modf, modf) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, __modf, modfl, GLIBC_2_0); #endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/fpu/s_ceil.S index 51b8c210271..64ec1257824 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_ceil.S @@ -18,6 +18,7 @@ #include #include +#include .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -72,12 +73,4 @@ ENTRY (__ceil) blr END (__ceil) -weak_alias (__ceil, ceil) - -#ifdef NO_LONG_DOUBLE -weak_alias (__ceil, ceill) -strong_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/powerpc/powerpc32/fpu/s_floor.S b/sysdeps/powerpc/powerpc32/fpu/s_floor.S index 90a1b184df2..3eaf8d3fa3a 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_floor.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_floor.S @@ -18,6 +18,7 @@ #include #include +#include .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -72,12 +73,4 @@ ENTRY (__floor) blr END (__floor) -weak_alias (__floor, floor) - -#ifdef NO_LONG_DOUBLE -weak_alias (__floor, floorl) -strong_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/powerpc/powerpc32/fpu/s_nearbyint.S b/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S index df590e08bd3..296454330f3 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S @@ -22,6 +22,7 @@ #include #include +#include /* double [fp1] nearbyint(double [fp1] x) */ @@ -76,12 +77,4 @@ L(lessthanzero): blr END (__nearbyint) -weak_alias (__nearbyint, nearbyint) - -#ifdef NO_LONG_DOUBLE -weak_alias (__nearbyint, nearbyintl) -strong_alias (__nearbyint, __nearbyintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1) -#endif +libm_alias_double (__nearbyint, nearbyint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_rint.S b/sysdeps/powerpc/powerpc32/fpu/s_rint.S index a1c31164476..30f3b60a1b6 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_rint.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_rint.S @@ -21,6 +21,7 @@ #include #include +#include .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -65,12 +66,4 @@ ENTRY (__rint) blr END (__rint) -weak_alias (__rint, rint) - -#ifdef NO_LONG_DOUBLE -weak_alias (__rint, rintl) -strong_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/powerpc/powerpc32/fpu/s_round.S b/sysdeps/powerpc/powerpc32/fpu/s_round.S index f539890b17a..0704ad96768 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_round.S @@ -18,6 +18,7 @@ #include #include +#include .section .rodata.cst8,"aM",@progbits,8 .align 2 @@ -93,12 +94,4 @@ ENTRY (__round) blr END (__round) -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -weak_alias (__round, roundl) -strong_alias (__round, __roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1) -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S index 85d292c03ce..6ab9d392317 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S @@ -18,6 +18,7 @@ #include #include +#include .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -79,12 +80,4 @@ ENTRY (__trunc) blr END (__trunc) -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -weak_alias (__trunc, truncl) -strong_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) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c index 4e3d980ce68..1c57b133d63 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__ceil) __ceil_ppc32 attribute_hidden; extern __typeof (__ceil) __ceil_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__ceil, ? __ceil_power5plus : __ceil_ppc32); -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/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c index 0da528c922d..62a0378c970 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__floor) __floor_ppc32 attribute_hidden; extern __typeof (__floor) __floor_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__floor, ? __floor_power5plus : __floor_ppc32); -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/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c index 537592ab16a..c35eb52c448 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__modf) __modf_ppc32 attribute_hidden; extern __typeof (__modf) __modf_power5plus attribute_hidden; @@ -29,16 +30,8 @@ libc_ifunc (__modf, ? __modf_power5plus : __modf_ppc32); -weak_alias (__modf, modf) +libm_alias_double (__modf, modf) -#ifdef NO_LONG_DOUBLE -strong_alias (__modf, __modfl) -weak_alias (__modf, modfl) -#endif -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __modf, modfl, GLIBC_2_0); -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, __modf, modfl, GLIBC_2_0); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c index 46102862ac7..fbe2dd0c1b9 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__round) __round_ppc32 attribute_hidden; extern __typeof (__round) __round_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__round, ? __round_power5plus : __round_ppc32); -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -strong_alias (__round, __roundl) -weak_alias (__round, roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1); -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c index 110e7012184..1456d03c91e 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__trunc) __trunc_ppc32 attribute_hidden; extern __typeof (__trunc) __trunc_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__trunc, ? __trunc_power5plus : __trunc_ppc32); -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) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S index efe7be8242b..69a2959d674 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" EALIGN (__ceil, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__ceil, 4, 0) blr END (__ceil) -weak_alias (__ceil, ceil) - -#ifdef NO_LONG_DOUBLE -weak_alias (__ceil, ceill) -strong_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/powerpc/powerpc32/power5+/fpu/s_floor.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S index 9f040d8457c..84a868fcd1b 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" EALIGN (__floor, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__floor, 4, 0) blr END (__floor) -weak_alias (__floor, floor) - -#ifdef NO_LONG_DOUBLE -weak_alias (__floor, floorl) -strong_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/powerpc/powerpc32/power5+/fpu/s_round.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S index 91b42352f31..4353a8111f4 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" EALIGN (__round, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__round, 4, 0) blr END (__round) -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -weak_alias (__round, roundl) -strong_alias (__round, __roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1) -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S index ceca5298260..564b05850fa 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" EALIGN (__trunc, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__trunc, 4, 0) blr END (__trunc) -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -weak_alias (__trunc, truncl) -strong_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) diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c index 968e8cb17ed..611c22f40d3 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__ceil) __ceil_ppc64 attribute_hidden; extern __typeof (__ceil) __ceil_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__ceil, ? __ceil_power5plus : __ceil_ppc64); -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/powerpc/powerpc64/fpu/multiarch/s_floor.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c index 6ab7a354904..5154ba40f9f 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__floor) __floor_ppc64 attribute_hidden; extern __typeof (__floor) __floor_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__floor, ? __floor_power5plus : __floor_ppc64); -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/powerpc/powerpc64/fpu/multiarch/s_modf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c index 3e79b2bd5a4..104ada21f59 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__modf) __modf_ppc64 attribute_hidden; extern __typeof (__modf) __modf_power5plus attribute_hidden; @@ -29,16 +30,8 @@ libc_ifunc (__modf, ? __modf_power5plus : __modf_ppc64); -weak_alias (__modf, modf) +libm_alias_double (__modf, modf) -#ifdef NO_LONG_DOUBLE -strong_alias (__modf, __modfl) -weak_alias (__modf, modfl) -#endif -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __modf, modfl, GLIBC_2_0); -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, __modf, modfl, GLIBC_2_0); #endif diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c index d440f6f45c9..7bf5ab627e1 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__round) __round_ppc64 attribute_hidden; extern __typeof (__round) __round_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__round, ? __round_power5plus : __round_ppc64); -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -strong_alias (__round, __roundl) -weak_alias (__round, roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __round, roundl, GLIBC_2_0); -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c index 54844d5ff2b..c2b430fec8a 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__trunc) __trunc_ppc64 attribute_hidden; extern __typeof (__trunc) __trunc_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__trunc, ? __trunc_power5plus : __trunc_ppc64); -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -strong_alias (__trunc, __truncl) -weak_alias (__trunc, truncl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __trunc, truncl, GLIBC_2_0); -#endif +libm_alias_double (__trunc, trunc) diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S index ce673e51f0f..46a923b26cd 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S @@ -18,6 +18,7 @@ #include #include +#include .section ".toc","aw" .LC0: /* 2**52 */ @@ -61,12 +62,4 @@ ENTRY (__ceil, 4) blr END (__ceil) -weak_alias (__ceil, ceil) - -#ifdef NO_LONG_DOUBLE -weak_alias (__ceil, ceill) -strong_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/powerpc/powerpc64/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/fpu/s_floor.S index 23cea2ab5ae..af0769c9579 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_floor.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_floor.S @@ -18,6 +18,7 @@ #include #include +#include .section ".toc","aw" .LC0: /* 2**52 */ @@ -61,12 +62,4 @@ ENTRY (__floor, 4) blr END (__floor) -weak_alias (__floor, floor) - -#ifdef NO_LONG_DOUBLE -weak_alias (__floor, floorl) -strong_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/powerpc/powerpc64/fpu/s_nearbyint.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S index 88ec253ceda..22810803cc9 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S @@ -22,6 +22,7 @@ #include #include +#include /* double [fp1] nearbyint(double [fp1] x) */ @@ -64,12 +65,4 @@ L(lessthanzero): blr END (__nearbyint) -weak_alias (__nearbyint, nearbyint) - -#ifdef NO_LONG_DOUBLE -weak_alias (__nearbyint, nearbyint) -strong_alias (__nearbyint, __nearbyintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1) -#endif +libm_alias_double (__nearbyint, nearbyint) diff --git a/sysdeps/powerpc/powerpc64/fpu/s_rint.S b/sysdeps/powerpc/powerpc64/fpu/s_rint.S index 3543279ed4a..a4506061eb6 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_rint.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_rint.S @@ -21,6 +21,7 @@ #include #include +#include .section ".toc","aw" .LC0: /* 2**52 */ @@ -54,12 +55,4 @@ ENTRY (__rint, 4) blr END (__rint) -weak_alias (__rint, rint) - -#ifdef NO_LONG_DOUBLE -weak_alias (__rint, rintl) -strong_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/powerpc/powerpc64/fpu/s_round.S b/sysdeps/powerpc/powerpc64/fpu/s_round.S index d10c74d0371..975c10f71e5 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_round.S @@ -18,6 +18,7 @@ #include #include +#include .section ".toc","aw" .LC0: /* 2**52 */ @@ -76,12 +77,4 @@ ENTRY (__round, 4) blr END (__round) -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -weak_alias (__round, roundl) -strong_alias (__round, __roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1) -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc64/fpu/s_trunc.S b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S index 1e356dee7dc..f918293ce55 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_trunc.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S @@ -18,6 +18,7 @@ #include #include +#include .section ".toc","aw" .LC0: /* 2**52 */ @@ -68,12 +69,4 @@ ENTRY (__trunc, 4) blr END (__trunc) -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -weak_alias (__trunc, truncl) -strong_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) diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S index 0d09e56e4e9..bc666317b68 100644 --- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S +++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" ENTRY_TOCLESS (__ceil, 4) @@ -26,12 +27,4 @@ ENTRY_TOCLESS (__ceil, 4) blr END (__ceil) -weak_alias (__ceil, ceil) - -#ifdef NO_LONG_DOUBLE -weak_alias (__ceil, ceill) -strong_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/powerpc/powerpc64/power5+/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S index f8bfb2797e7..c589185a64c 100644 --- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S +++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" ENTRY_TOCLESS (__floor, 4) @@ -26,12 +27,4 @@ ENTRY_TOCLESS (__floor, 4) blr END (__floor) -weak_alias (__floor, floor) - -#ifdef NO_LONG_DOUBLE -weak_alias (__floor, floorl) -strong_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/powerpc/powerpc64/power5+/fpu/s_round.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S index 0a124c80a69..d5b11f24354 100644 --- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" ENTRY_TOCLESS (__round, 4) @@ -26,12 +27,4 @@ ENTRY_TOCLESS (__round, 4) blr END (__round) -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -weak_alias (__round, roundl) -strong_alias (__round, __roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1) -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S index 5fca9f37fa5..dee61dd51ca 100644 --- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S +++ b/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S @@ -18,6 +18,7 @@ #include #include +#include .machine "power5" ENTRY_TOCLESS (__trunc, 4) @@ -26,12 +27,4 @@ ENTRY_TOCLESS (__trunc, 4) blr END (__trunc) -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -weak_alias (__trunc, truncl) -strong_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) -- 2.47.2