about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/multiarch/Makefile
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-16 08:43:35 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-16 08:43:48 -0700
commit24a2e6588d2e0c91b4003878b0625d4a9360e8f3 (patch)
tree11b91098943a676d40fdec100ac8cd3f1ada8a11 /sysdeps/x86_64/fpu/multiarch/Makefile
parent403143e1df85dadd374f304bd891be0cd7573e3b (diff)
downloadglibc-24a2e6588d2e0c91b4003878b0625d4a9360e8f3.tar.gz
glibc-24a2e6588d2e0c91b4003878b0625d4a9360e8f3.tar.xz
glibc-24a2e6588d2e0c91b4003878b0625d4a9360e8f3.zip
x86-64: Optimize e_expf with FMA [BZ #21912]
FMA optimized e_expf improves performance by more than 50% on Skylake.

	[BZ #21912]
	* sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
	Add e_expf-fma.
	* sysdeps/x86_64/fpu/multiarch/e_expf-fma.S: New file.
	* sysdeps/x86_64/fpu/multiarch/e_expf.c: Likewise.
	* sysdeps/x86_64/fpu/multiarch/ifunc-fma.h: Likewise.
Diffstat (limited to 'sysdeps/x86_64/fpu/multiarch/Makefile')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 9daf2cf205..1b61795aff 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -35,6 +35,9 @@ CFLAGS-slowpow-fma.c = -mfma -mavx2
 CFLAGS-s_sin-fma.c = -mfma -mavx2
 CFLAGS-s_tan-fma.c = -mfma -mavx2
 
+# e_expf-fma.S implements both FMA and SSE2 versions of e_expf.
+libm-sysdep_routines += e_expf-fma
+
 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 \
 			mplog-fma4 mpa-fma4 slowexp-fma4 slowpow-fma4 \