diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-25 21:34:55 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-25 21:34:55 -0400 |
commit | e0016b11d6186a7003d7204cb100acab9bbcd940 (patch) | |
tree | 8c702a330664d113edbdaff9ba4ec67e266bbb80 /sysdeps/x86_64/fpu/multiarch/s_tan.c | |
parent | ffb124cc518c182e238c20abb0ff8bdeaefefd66 (diff) | |
download | glibc-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_tan.c')
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_tan.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c index cca02b54de..8f6601e17c 100644 --- a/sysdeps/x86_64/fpu/multiarch/s_tan.c +++ b/sysdeps/x86_64/fpu/multiarch/s_tan.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 __tan_sse2 (double); +extern double __tan_avx (double); +# ifdef HAVE_FMA4_SUPPORT extern double __tan_fma4 (double); +# else +# undef HAS_FMA4 +# define HAS_FMA4 0 +# define __tan_fma4 ((void *) 0) +# endif -libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : __tan_sse2); +libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2); # define tan __tan_sse2 #endif |