about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/multiarch/s_atan.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-25 21:34:55 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-25 21:34:55 -0400
commite0016b11d6186a7003d7204cb100acab9bbcd940 (patch)
tree8c702a330664d113edbdaff9ba4ec67e266bbb80 /sysdeps/x86_64/fpu/multiarch/s_atan.c
parentffb124cc518c182e238c20abb0ff8bdeaefefd66 (diff)
downloadglibc-e0016b11d6186a7003d7204cb100acab9bbcd940.tar.gz
glibc-e0016b11d6186a7003d7204cb100acab9bbcd940.tar.xz
glibc-e0016b11d6186a7003d7204cb100acab9bbcd940.zip
Add AVX optimized versions for some x86-64 math functions
Diffstat (limited to 'sysdeps/x86_64/fpu/multiarch/s_atan.c')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
index ffc4a56fa8..3160201c17 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
@@ -1,11 +1,18 @@
-#ifdef HAVE_FMA4_SUPPORT
+#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
 # include <init-arch.h>
 # include <math.h>
 
 extern double __atan_sse2 (double);
+extern double __atan_avx (double);
+# ifdef HAVE_FMA4_SUPPORT
 extern double __atan_fma4 (double);
+# else
+#  undef HAS_FMA4
+#  define HAS_FMA4 0
+#  define __atan_fma4 ((void *) 0)
+# endif
 
-libm_ifunc (atan, HAS_FMA4 ? __atan_fma4 : __atan_sse2);
+libm_ifunc (atan, HAS_FMA4 ? __atan_fma4 : HAS_AVX ? __atan_avx : __atan_sse2);
 
 # define atan __atan_sse2
 #endif