From d17542d235dd6dd4a83d28997f789543417afe11 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 2 Dec 2017 00:11:37 +0000 Subject: Use libm_alias_double for remaining powerpc functions. Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes the remaining double powerpc functions use libm_alias_double to define function aliases (with consequent removal of the need for local compat symbol handling). Previous cleanups avoid this patch changing installed stripped shared libraries for any build-many-glibcs.py configuration (there are still some functions in this patch for which the order of double and float aliases changes within an individual source file, but in this case this doesn't result in changes to the final library). Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged for all its hard-float powerpc configurations. * sysdeps/powerpc/power7/fpu/s_logb.c: Include . (logb): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include . (copysign): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include . (llrint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_llround.c: Include . (llround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include . (lrint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include . (lround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c: Include . (copysign): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint.c: Include . (llrint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround.c: Include . (llround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb.c: Include . (logb): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint.c: Include . (lrint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround.c: Include . (lround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: Include . (llrint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S: Include . (llround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S: Include . (llround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S: Include . (lround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: Include . (copysign): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: Include . (llrint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S: Include . (llround): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S: Include . (lrint): Define using libm_alias_double. * sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S: Include . (lround): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c: Include . (copysign): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c: Include . (llrint): Define using libm_alias_double. (lrint): Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c: Include . (llround): Define using libm_alias_double. (lround): Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c: Include . (logb): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include . (copysign): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include . (llrint): Define using libm_alias_double. (lrint): Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include . (llround): Define using libm_alias_double. (lround): Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: Include . (llround): Define using libm_alias_double. (lround): Likewise. * sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Include . (copysign): Define using libm_alias_double. * sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: Include . (llrint): Define using libm_alias_double. (lrint): Likewise. * sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: Include . (llround): Define using libm_alias_double. (lround): Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S: Include . (llrint): Define using libm_alias_double. (lrint): Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S: Include . (llround): Define using libm_alias_double. (lround): Likewise. --- sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c | 13 +++---------- sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c | 19 +++---------------- sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c | 20 +++----------------- sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c | 12 ++---------- 4 files changed, 11 insertions(+), 53 deletions(-) (limited to 'sysdeps/powerpc/powerpc64/fpu/multiarch') diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c index 2bfb625bf7..1bd971aa24 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c @@ -25,6 +25,7 @@ #undef __copysign #include #include "init-arch.h" +#include extern __typeof (__redirect_copysign) __copysign_ppc64 attribute_hidden; extern __typeof (__redirect_copysign) __copysign_power6 attribute_hidden; @@ -36,16 +37,8 @@ libc_ifunc (__libm_copysign, : __copysign_ppc64); strong_alias (__libm_copysign, __copysign) -weak_alias (__copysign, copysign) +libm_alias_double (__copysign, copysign) -#ifdef NO_LONG_DOUBLE -weak_alias (__copysign,copysignl) -strong_alias(__copysign,__copysignl) -#endif -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __copysign, copysignl, GLIBC_2_0); -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, __copysign, copysignl, GLIBC_2_0); #endif diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c index 8db494cfde..6c6e9ea0c9 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c @@ -27,6 +27,7 @@ #undef __lrint #include #include "init-arch.h" +#include extern __typeof (__llrint) __llrint_ppc64 attribute_hidden; extern __typeof (__llrint) __llrint_power6x attribute_hidden; @@ -39,22 +40,8 @@ libc_ifunc (__llrint, ? __llrint_power6x : __llrint_ppc64); -weak_alias (__llrint, llrint) -#ifdef NO_LONG_DOUBLE -strong_alias (__llrint, __llrintl) -weak_alias (__llrint, llrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llrint, llrintl, GLIBC_2_1); -#endif +libm_alias_double (__llrint, llrint) /* long has the same width as long long on PowerPC64. */ strong_alias (__llrint, __lrint) -weak_alias (__lrint, lrint) -#ifdef NO_LONG_DOUBLE -strong_alias (__lrint, __lrintl) -weak_alias (__lrint, lrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lrint, lrintl, GLIBC_2_1); -#endif +libm_alias_double (__lrint, lrint) diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c index b6c70c20ab..7d55d1bae7 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c @@ -23,6 +23,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__llround) __llround_ppc64 attribute_hidden; extern __typeof (__llround) __llround_power5plus attribute_hidden; @@ -38,25 +39,10 @@ libc_ifunc (__llround, ? __llround_power5plus : __llround_ppc64); -weak_alias (__llround, llround) - -#ifdef NO_LONG_DOUBLE -weak_alias (__llround, llroundl) -strong_alias (__llround, __llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llround, llroundl, GLIBC_2_1); -#endif +libm_alias_double (__llround, llround) /* long has the same width as long long on PPC64. */ #undef lround #undef __lround strong_alias (__llround, __lround) -weak_alias (__llround, lround) -#ifdef NO_LONG_DOUBLE -strong_alias (__llround, __llroundl) -weak_alias (__llround, llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lround, lroundl, GLIBC_2_1); -#endif +libm_alias_double (__lround, lround) diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c index c2e9f4d3ce..7c23a3cf10 100644 --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c @@ -20,6 +20,7 @@ #include #include #include "init-arch.h" +#include extern __typeof (__logb) __logb_ppc64 attribute_hidden; extern __typeof (__logb) __logb_power7 attribute_hidden; @@ -29,13 +30,4 @@ libc_ifunc (__logb, ? __logb_power7 : __logb_ppc64); -weak_alias (__logb, logb) - -#ifdef NO_LONG_DOUBLE -strong_alias (__logb, __logbl) -weak_alias (__logb, logbl) -#endif - -#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0) -compat_symbol (libm, __logb, logbl, GLIBC_2_0); -#endif +libm_alias_double (__logb, logb) -- cgit 1.4.1