diff options
author | Wilco Dijkstra <Wilco.Dijkstra@arm.com> | 2019-07-16 12:17:22 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-01-03 10:02:04 -0300 |
commit | 220622dde5704c95a100c2792a280f18f3deba73 (patch) | |
tree | fbf0df37c2671a9bc21a200bd2f587fc5e4cbe2b /sysdeps/powerpc | |
parent | cf4dfd461725b6dbe6f27fbd16913f2c6c5cf7c5 (diff) | |
download | glibc-220622dde5704c95a100c2792a280f18f3deba73.tar.gz |
Add libm_alias_finite for _finite symbols
This patch adds a new macro, libm_alias_finite, to define all _finite
symbol. It sets all _finite symbol as compat symbol based on its first
version (obtained from the definition at built generated first-versions.h).
The <fn>f128_finite symbols were introduced in GLIBC 2.26 and so need
special treatment in code that is shared between long double and float128.
It is done by adding a list, similar to internal symbol redifinition,
on sysdeps/ieee754/float128/float128_private.h.
Alpha also needs some tricky changes to ensure we still emit 2 compat
symbols for sqrt(f).
Passes buildmanyglibc.
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/powerpc')
12 files changed, 21 insertions, 22 deletions
diff --git a/sysdeps/powerpc/fpu/e_hypot.c b/sysdeps/powerpc/fpu/e_hypot.c index 0466b22232..df594412c5 100644 --- a/sysdeps/powerpc/fpu/e_hypot.c +++ b/sysdeps/powerpc/fpu/e_hypot.c @@ -21,6 +21,7 @@ #include <math_private.h> #include <math-underflow.h> #include <stdint.h> +#include <libm-alias-finite.h> /* __ieee754_hypot(x,y) * @@ -82,4 +83,6 @@ __ieee754_hypot (double x, double y) } return sqrt (x * x + y * y); } -strong_alias (__ieee754_hypot, __hypot_finite) +#ifndef __ieee754_hypot +libm_alias_finite (__ieee754_hypot, __hypot) +#endif diff --git a/sysdeps/powerpc/fpu/e_hypotf.c b/sysdeps/powerpc/fpu/e_hypotf.c index 4fe9bbf9e0..acfe29b2ac 100644 --- a/sysdeps/powerpc/fpu/e_hypotf.c +++ b/sysdeps/powerpc/fpu/e_hypotf.c @@ -20,6 +20,7 @@ #include <math.h> #include <math_private.h> #include <stdint.h> +#include <libm-alias-finite.h> /* __ieee754_hypotf(x,y) @@ -73,4 +74,6 @@ __ieee754_hypotf (float x, float y) return sqrt ((double) x * x + (double) y * y); } -strong_alias (__ieee754_hypotf, __hypotf_finite) +#ifndef __ieee754_hypotf +libm_alias_finite (__ieee754_hypotf, __hypotf) +#endif diff --git a/sysdeps/powerpc/fpu/e_sqrt.c b/sysdeps/powerpc/fpu/e_sqrt.c index 1e584c5b44..a47f77966f 100644 --- a/sysdeps/powerpc/fpu/e_sqrt.c +++ b/sysdeps/powerpc/fpu/e_sqrt.c @@ -24,6 +24,7 @@ #include <stdint.h> #include <sysdep.h> #include <ldsodefs.h> +#include <libm-alias-finite.h> #ifndef _ARCH_PPCSQ static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */ @@ -173,4 +174,4 @@ __ieee754_sqrt (double x) return z; } -strong_alias (__ieee754_sqrt, __sqrt_finite) +libm_alias_finite (__ieee754_sqrt, __sqrt) diff --git a/sysdeps/powerpc/fpu/e_sqrtf.c b/sysdeps/powerpc/fpu/e_sqrtf.c index 25273f19fb..f119dcf5d9 100644 --- a/sysdeps/powerpc/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/fpu/e_sqrtf.c @@ -24,6 +24,7 @@ #include <stdint.h> #include <sysdep.h> #include <ldsodefs.h> +#include <libm-alias-finite.h> #ifndef _ARCH_PPCSQ static const float almost_half = 0.50000006; /* 0.5 + 2^-24 */ @@ -148,4 +149,4 @@ __ieee754_sqrtf (float x) return z; } -strong_alias (__ieee754_sqrtf, __sqrtf_finite) +libm_alias_finite (__ieee754_sqrtf, __sqrtf) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c index 9854219e07..4d5db60a18 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c @@ -18,9 +18,6 @@ #include <math.h> -#undef strong_alias -#define strong_alias(a, b) - #define __ieee754_hypot __ieee754_hypot_power7 #include <sysdeps/powerpc/fpu/e_hypot.c> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c index 5843ec1787..4df81e4aa7 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c @@ -18,9 +18,6 @@ #include <math.h> -#undef strong_alias -#define strong_alias(a, b) - #define __ieee754_hypot __ieee754_hypot_ppc32 #include <sysdeps/powerpc/fpu/e_hypot.c> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c index 9bf7fb12d9..a6c9b0658b 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c @@ -19,7 +19,7 @@ #include <math.h> #include <math_private.h> #include <math_ldbl_opt.h> -#include <shlib-compat.h> +#include <libm-alias-finite.h> #include "init-arch.h" extern __typeof (__ieee754_hypot) __ieee754_hypot_ppc32 attribute_hidden; @@ -30,4 +30,4 @@ libc_ifunc (__ieee754_hypot, ? __ieee754_hypot_power7 : __ieee754_hypot_ppc32); -strong_alias (__ieee754_hypot, __hypot_finite) +libm_alias_finite (__ieee754_hypot, __hypot) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c index d45b17cb4e..fa3efaeffc 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c @@ -18,9 +18,6 @@ #include <math.h> -#undef strong_alias -#define strong_alias(a, b) - #define __ieee754_hypotf __ieee754_hypotf_power7 #include <sysdeps/powerpc/fpu/e_hypotf.c> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c index 6d81381638..ff0c8084ca 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c @@ -18,9 +18,6 @@ #include <math.h> -#undef strong_alias -#define strong_alias(a, b) - #define __ieee754_hypotf __ieee754_hypotf_ppc32 #include <sysdeps/ieee754/flt-32/e_hypotf.c> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c index 48be6ff54f..130b51f337 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c @@ -19,7 +19,7 @@ #include <math.h> #include <math_private.h> #include <math_ldbl_opt.h> -#include <shlib-compat.h> +#include <libm-alias-finite.h> #include "init-arch.h" extern __typeof (__ieee754_hypotf) __ieee754_hypotf_ppc32 attribute_hidden; @@ -30,4 +30,4 @@ libc_ifunc (__ieee754_hypotf, ? __ieee754_hypotf_power7 : __ieee754_hypotf_ppc32); -strong_alias (__ieee754_hypotf, __hypotf_finite) +libm_alias_finite (__ieee754_hypotf, __hypotf) diff --git a/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c b/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c index 32c948c508..950bdad54a 100644 --- a/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c +++ b/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c @@ -27,6 +27,7 @@ <https://www.gnu.org/licenses/>. */ #include <math.h> +#include <libm-alias-finite.h> /* Unavoidable hacks since TFmode is assumed to be binary128 when -mabi=ibmlongdouble is used. */ @@ -53,4 +54,4 @@ __ieee754_sqrtf128 (__float128 a) FP_HANDLE_EXCEPTIONS; return r; } -strong_alias (__ieee754_sqrtf128, __sqrtf128_finite) +libm_alias_finite (__ieee754_sqrtf128, __sqrtf128) diff --git a/sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c b/sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c index 9784f8dfb6..232fc773c3 100644 --- a/sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c +++ b/sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c @@ -26,6 +26,8 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ +#include <libm-alias-finite.h> + __float128 __ieee754_sqrtf128 (__float128 a) { @@ -33,4 +35,4 @@ __ieee754_sqrtf128 (__float128 a) asm ("xssqrtqp %0,%1" : "=v" (z) : "v" (a)); return z; } -strong_alias (__ieee754_sqrtf128, __sqrtf128_finite) +libm_alias_finite (__ieee754_sqrtf128, __sqrtf128) |