Remove powerpc32 sqrt wrappers

System Internals / glibc - Joseph Myers [codesourcery.com] - 25 August 2017 07:33 EDT

This patch removes the powerpc32-specific wrappers for sqrt and sqrtf.

These wrappers, by adding architecture-specific uses of _LIB_VERSION and __kernel_standard, unnecessarily complicate cleanups of libm error handling. They also do not serve a useful optimization purpose. GCC knows about sqrt as a built-in function, and can generate direct calls to a hardware square root instruction, either on its own, in the-fno-math-errno case, or together with an inline check for the argument being negative and a call to the out-of-line sqrt function for error handling only in that case (and has been able to do so for a long time). Thus in practice the wrapper will only be called only in the case of negative arguments, which is not a case it is useful to optimize for.

Tested with build-many-glibcs.py for powerpc-linux-gnu-power4.

- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S: Remove file.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S: Likewise.
- sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S: Likewise.
- sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile (libm-sysdep-routines): Remove w_sqrt_compat-power5, w_sqrt_compat-ppc32, w_sqrtf_compat-power5 and w_sqrtf_compat-ppc32.

bba5c93 Remove powerpc32 sqrt wrappers.
ChangeLog | 23 +++++
.../powerpc32/power4/fpu/multiarch/Makefile | 2 -
.../power4/fpu/multiarch/w_sqrt_compat-power5.S | 31 ------
.../power4/fpu/multiarch/w_sqrt_compat-ppc32.S | 31 ------
.../powerpc32/power4/fpu/multiarch/w_sqrt_compat.c | 40 --------
.../power4/fpu/multiarch/w_sqrtf_compat-power5.S | 26 -----
.../power4/fpu/multiarch/w_sqrtf_compat-ppc32.S | 26 -----
.../power4/fpu/multiarch/w_sqrtf_compat.c | 32 ------
.../powerpc/powerpc32/power4/fpu/w_sqrt_compat.S | 109 ---------------------
.../powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S | 101 -------------------
.../powerpc/powerpc32/power5/fpu/w_sqrt_compat.S | 107 --------------------
.../powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S | 99 -------------------
12 files changed, 23 insertions(+), 604 deletions(-)

Upstream: sourceware.org


  • Share