about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/multiarch/Makefile
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2022-05-31 13:09:38 +0200
committerAndreas Schwab <schwab@suse.de>2022-06-01 10:29:52 +0200
commitdc1e5eeb25c4bcb1cc0c883a2d67cf93eb252478 (patch)
tree4064d9da2fa13bcacbf498fe6de9709bfbd754a7 /sysdeps/x86_64/fpu/multiarch/Makefile
parentd976d44a89ab0e4e8bd077f7063030e2e04975aa (diff)
downloadglibc-dc1e5eeb25c4bcb1cc0c883a2d67cf93eb252478.tar.gz
glibc-dc1e5eeb25c4bcb1cc0c883a2d67cf93eb252478.tar.xz
glibc-dc1e5eeb25c4bcb1cc0c883a2d67cf93eb252478.zip
x86_64: Optimize sincos where sin/cos is optimized (bug 29193)
The compiler may substitute calls to sin or cos with calls to sincos, thus
we should have the same optimized implementations for sincos.  The
optimized implementations may produce results that differ, that also makes
sure that the sincos call aggrees with the sin and cos calls.
Diffstat (limited to 'sysdeps/x86_64/fpu/multiarch/Makefile')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..248162525b 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -10,7 +10,8 @@ libm-sysdep_routines += s_ceil-sse4_1 s_ceilf-sse4_1 s_floor-sse4_1 \
 			s_trunc-sse4_1 s_truncf-sse4_1
 
 libm-sysdep_routines += e_exp-fma e_log-fma e_pow-fma s_atan-fma \
-			e_asin-fma e_atan2-fma s_sin-fma s_tan-fma
+			e_asin-fma e_atan2-fma s_sin-fma s_tan-fma \
+			s_sincos-fma
 
 CFLAGS-e_asin-fma.c = -mfma -mavx2
 CFLAGS-e_atan2-fma.c = -mfma -mavx2
@@ -20,6 +21,7 @@ CFLAGS-e_pow-fma.c = -mfma -mavx2
 CFLAGS-s_atan-fma.c = -mfma -mavx2
 CFLAGS-s_sin-fma.c = -mfma -mavx2
 CFLAGS-s_tan-fma.c = -mfma -mavx2
+CFLAGS-s_sincos-fma.c = -mfma -mavx2
 
 libm-sysdep_routines += s_sinf-sse2 s_cosf-sse2 s_sincosf-sse2
 
@@ -36,7 +38,8 @@ CFLAGS-s_cosf-fma.c = -mfma -mavx2
 CFLAGS-s_sincosf-fma.c = -mfma -mavx2
 
 libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
-			e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4
+			e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
+			s_sincos-fma4
 
 CFLAGS-e_asin-fma4.c = -mfma4
 CFLAGS-e_atan2-fma4.c = -mfma4
@@ -46,9 +49,11 @@ CFLAGS-e_pow-fma4.c = -mfma4
 CFLAGS-s_atan-fma4.c = -mfma4
 CFLAGS-s_sin-fma4.c = -mfma4
 CFLAGS-s_tan-fma4.c = -mfma4
+CFLAGS-s_sincos-fma4.c = -mfma4
 
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
-			e_atan2-avx s_sin-avx s_tan-avx
+			e_atan2-avx s_sin-avx s_tan-avx \
+			s_sincos-avx
 
 CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
@@ -56,6 +61,7 @@ CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)