about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/multiarch/s_atan.c
diff options
context:
space:
mode:
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