]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc: Add missing arch flags on rounding ifunc variants
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 28 Dec 2023 17:20:16 +0000 (14:20 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 2 Apr 2024 18:49:31 +0000 (15:49 -0300)
The ifunc variants now uses the powerpc implementation which in turn
uses the compiler builtin.  Without the proper -mcpu switch the builtin
does not generate the expected optimization.

Checked on powerpc-linux-gnu.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile

index 64317506c6a55b09ff880858e9e4213238b53db3..2f5c0eded6c0264ff659104ec208584ac0b5b57f 100644 (file)
@@ -34,6 +34,12 @@ CFLAGS-s_modff-power5+.c = -mcpu=power5+
 CFLAGS-s_logbl-power7.c = -mcpu=power7
 CFLAGS-s_logb-power7.c = -mcpu=power7
 CFLAGS-s_logbf-power7.c = -mcpu=power7
+CFLAGS-s_round-power5+.c += -mcpu=power5+
+CFLAGS-s_roundf-power5+.c += -mcpu=power5+
+CFLAGS-s_floor-power5+.c += -mcpu=power5+
+CFLAGS-s_floorf-power5+.c += -mcpu=power5+
+CFLAGS-s_trunc-power5+.c += -mcpu=power5+
+CFLAGS-s_truncf-power5+.c += -mcpu=power5+
 
 # These files quiet sNaNs in a way that is optimized away without
 # -fsignaling-nans.