powerpc: copysign cleanup
commite41d66e41ae0626156b3eace8e15aecff3044695
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 8 Mar 2019 16:55:52 +0000 (8 16:55 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 12 Jun 2019 14:46:26 +0000 (12 11:46 -0300)
tree870f599d3daea03e6de16399c7b4a270332ee738
parent21bd039bb41a59cdbd6c93670433e3b473720653
powerpc: copysign cleanup

GCC always expand copysign{f} for all possible cpus, so calling the libm
is only done if user explicitly states to disable the builtin (which is
done usually not for performance reason).  So to provide ifunc variant
for copysign is just unrequired complexity, since libm will be called
on non-performance critical code.

This patch removes both powerpc32 and powerpc64 ifunc variants and
consolidates the powerpc implementation on
sysdeps/powerpc/fpu/s_copysign{f}.c using compiler builtins.

Checked on powerpc-linux-gnu (built without --with-cpu, with
--with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch),
powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+
and --disable-multi-arch).

* sysdeps/powerpc/fpu/s_copysign.c: New file.
* sysdeps/powerpc/fpu/s_copysignf.c: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Remove file.
* sysdeps/powerpc/powerpc32/fpu/s_copysignf.S: Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
(sysdep_routines, libm-sysdep_routines): Remove s_copysign-power6 and
s_copysign-ppc32.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-power6.S:
Remove file.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c:
Likewise.
* sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: Likewise.
* sysdeps/powerpc/powerpc32/power6/fpu/s_copysignf.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile (sysdeps_calls):
Remove s_copysign-power6 s_copysign-ppc64.
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S:
Remove file.
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S:
Likewise.
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c: Likewise.
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise.
* sysdeps/powerpc/powerpc64/fpu/s_copysignf.S: Likewise.
* sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise.
* sysdeps/powerpc/powerpc64/power6/fpu/s_copysignf.S: Likewise.

Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
21 files changed:
ChangeLog
sysdeps/powerpc/fpu/s_copysign.c [new file with mode: 0644]
sysdeps/powerpc/fpu/s_copysignf.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/fpu/s_copysign.S [deleted file]
sysdeps/powerpc/powerpc32/fpu/s_copysignf.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-power6.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c [deleted file]
sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S [deleted file]
sysdeps/powerpc/powerpc32/power6/fpu/s_copysignf.S [deleted file]
sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S [deleted file]
sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S [deleted file]
sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c [deleted file]
sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c [deleted file]
sysdeps/powerpc/powerpc64/fpu/s_copysign.S [deleted file]
sysdeps/powerpc/powerpc64/fpu/s_copysignf.S [deleted file]
sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S [deleted file]
sysdeps/powerpc/powerpc64/power6/fpu/s_copysignf.S [deleted file]