about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-10-08 15:59:32 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-10-08 15:59:32 +0000
commit1b12cd7f4d210a743155d779b2225a0c18c416ff (patch)
tree4a85ee7dea2484b6341526ba7e46cfbf788a4558 /sysdeps/x86_64/fpu
parent104ff17183ddf2c5f2e264df080eed2d4f51f2c6 (diff)
downloadglibc-1b12cd7f4d210a743155d779b2225a0c18c416ff.tar.gz
glibc-1b12cd7f4d210a743155d779b2225a0c18c416ff.tar.xz
glibc-1b12cd7f4d210a743155d779b2225a0c18c416ff.zip
Remove configure tests for AVX support.
GCC added support for -mavx and -msse2avx in version 4.4.  Thus the
configure tests for this support are obsolete, and this patch removes
them.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by this patch).

	* sysdeps/i386/configure.ac (libc_cv_cc_avx): Remove configure
	test.
	(libc_cv_cc_sse2avx): Likewise.
	* sysdeps/i386/configure: Regenerated.
	* sysdeps/i386/i686/multiarch/Makefile
	[$(subdir)$(config-cflags-avx) = mathyes]: Change conditional to
	[$(subdir) = math].
	* sysdeps/i386/i686/multiarch/s_fma-fma.c [HAVE_AVX_SUPPORT]: Make
	code unconditional.
	* sysdeps/i386/i686/multiarch/s_fma.c [HAVE_AVX_SUPPORT]:
	Likewise.
	* sysdeps/i386/i686/multiarch/s_fmaf-fma.c [HAVE_AVX_SUPPORT]:
	Likewise.
	* sysdeps/i386/i686/multiarch/s_fmaf.c [HAVE_AVX_SUPPORT]:
	Likewise.
	* sysdeps/x86_64/configure.ac (libc_cv_cc_avx): Remove configure
	test.
	(libc_cv_cc_sse2avx): Likewise.
	* sysdeps/x86_64/configure: Regenerated.
	* sysdeps/x86_64/Makefile [$(config-cflags-avx) = yes]: Make code
	unconditional.
	* sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile)
	[HAVE_AVX_SUPPORT || HAVE_AVX512_ASM_SUPPORT]: Make code
	unconditional.
	(_dl_runtime_profile)
	[!(HAVE_AVX_SUPPORT || HAVE_AVX512_ASM_SUPPORT)]: Remove
	conditional code.
	* sysdeps/x86_64/fpu/multiarch/Makefile
	[$(config-cflags-sse2avx) = yes]: Make code unconditional.
	* sysdeps/x86_64/fpu/multiarch/e_atan2.c
	[HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise.
	* sysdeps/x86_64/fpu/multiarch/e_exp.c
	[HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise.
	* sysdeps/x86_64/fpu/multiarch/e_log.c
	[HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_atan.c
	[HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_fma.c [HAVE_AVX_SUPPORT]:
	Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_fmaf.c [HAVE_AVX_SUPPORT]:
	Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_sin.c
	[HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise.
	* sysdeps/x86_64/fpu/multiarch/s_tan.c
	[HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise.
	* sysdeps/x86_64/multiarch/strcmp.S [HAVE_AVX_SUPPORT]: Likewise.
	* config.h.in (HAVE_AVX_SUPPORT): Remove #undef.
	(HAVE_SSE2AVX_SUPPORT): Likewise.
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_atan2.c22
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_exp.c22
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log.c22
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan.c20
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fma.c17
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fmaf.c17
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin.c26
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan.c20
9 files changed, 74 insertions, 94 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 631534a5ce..ad7bbf0aec 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -33,7 +33,6 @@ CFLAGS-s_sin-fma4.c = -mfma4
 CFLAGS-s_tan-fma4.c = -mfma4
 endif
 
-ifeq ($(config-cflags-sse2avx),yes)
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			mplog-avx mpa-avx slowexp-avx \
@@ -50,7 +49,6 @@ CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-slowexp-avx.c = -msse2avx -DSSE2AVX
 CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
 endif
-endif
 
 ifeq ($(subdir),mathvec)
 libmvec-sysdep_routines += svml_d_cos2_core_sse4 svml_d_cos4_core_avx2 \
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
index 269dcc9165..8edb8b635b 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
@@ -1,17 +1,16 @@
-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
-# include <init-arch.h>
-# include <math.h>
-# include <math_private.h>
+#include <init-arch.h>
+#include <math.h>
+#include <math_private.h>
 
 extern double __ieee754_atan2_sse2 (double, double);
 extern double __ieee754_atan2_avx (double, double);
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 extern double __ieee754_atan2_fma4 (double, double);
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __ieee754_atan2_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __ieee754_atan2_fma4 ((void *) 0)
+#endif
 
 libm_ifunc (__ieee754_atan2,
 	    HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_atan2_fma4
@@ -19,8 +18,7 @@ libm_ifunc (__ieee754_atan2,
 	       ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
 strong_alias (__ieee754_atan2, __atan2_finite)
 
-# define __ieee754_atan2 __ieee754_atan2_sse2
-#endif
+#define __ieee754_atan2 __ieee754_atan2_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/e_atan2.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c
index 9c124ca11a..84e62a0491 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_exp.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c
@@ -1,17 +1,16 @@
-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
-# include <init-arch.h>
-# include <math.h>
-# include <math_private.h>
+#include <init-arch.h>
+#include <math.h>
+#include <math_private.h>
 
 extern double __ieee754_exp_sse2 (double);
 extern double __ieee754_exp_avx (double);
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 extern double __ieee754_exp_fma4 (double);
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __ieee754_exp_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __ieee754_exp_fma4 ((void *) 0)
+#endif
 
 libm_ifunc (__ieee754_exp,
 	    HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_exp_fma4
@@ -19,8 +18,7 @@ libm_ifunc (__ieee754_exp,
 	       ? __ieee754_exp_avx : __ieee754_exp_sse2));
 strong_alias (__ieee754_exp, __exp_finite)
 
-# define __ieee754_exp __ieee754_exp_sse2
-#endif
+#define __ieee754_exp __ieee754_exp_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/e_exp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c
index 04e9ac553b..90e21ec1ec 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log.c
@@ -1,17 +1,16 @@
-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
-# include <init-arch.h>
-# include <math.h>
-# include <math_private.h>
+#include <init-arch.h>
+#include <math.h>
+#include <math_private.h>
 
 extern double __ieee754_log_sse2 (double);
 extern double __ieee754_log_avx (double);
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 extern double __ieee754_log_fma4 (double);
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __ieee754_log_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __ieee754_log_fma4 ((void *) 0)
+#endif
 
 libm_ifunc (__ieee754_log,
 	    HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_log_fma4
@@ -19,8 +18,7 @@ libm_ifunc (__ieee754_log,
 	       ? __ieee754_log_avx : __ieee754_log_sse2));
 strong_alias (__ieee754_log, __log_finite)
 
-# define __ieee754_log __ieee754_log_sse2
-#endif
+#define __ieee754_log __ieee754_log_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/e_log.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
index 57b5c65f67..8d2b004522 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
@@ -1,23 +1,21 @@
-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
-# include <init-arch.h>
-# include <math.h>
+#include <init-arch.h>
+#include <math.h>
 
 extern double __atan_sse2 (double);
 extern double __atan_avx (double);
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 extern double __atan_fma4 (double);
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __atan_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __atan_fma4 ((void *) 0)
+#endif
 
 libm_ifunc (atan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __atan_fma4 :
 		   HAS_ARCH_FEATURE (AVX_Usable)
 		   ? __atan_avx : __atan_sse2));
 
-# define atan __atan_sse2
-#endif
+#define atan __atan_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/s_atan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_fma.c b/sysdeps/x86_64/fpu/multiarch/s_fma.c
index 78e7732245..630c99c3ce 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fma.c
@@ -21,8 +21,6 @@
 #include <math.h>
 #include <init-arch.h>
 
-#ifdef HAVE_AVX_SUPPORT
-
 extern double __fma_sse2 (double x, double y, double z) attribute_hidden;
 
 
@@ -34,18 +32,18 @@ __fma_fma3 (double x, double y, double z)
 }
 
 
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 static double
 __fma_fma4 (double x, double y, double z)
 {
   asm ("vfmaddsd %3, %2, %1, %0" : "=x" (x) : "x" (x), "x" (y), "x" (z));
   return x;
 }
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __fma_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __fma_fma4 ((void *) 0)
+#endif
 
 
 libm_ifunc (__fma, HAS_ARCH_FEATURE (FMA_Usable)
@@ -53,7 +51,6 @@ libm_ifunc (__fma, HAS_ARCH_FEATURE (FMA_Usable)
 			    ? __fma_fma4 : __fma_sse2));
 weak_alias (__fma, fma)
 
-# define __fma __fma_sse2
-#endif
+#define __fma __fma_sse2
 
 #include <sysdeps/ieee754/dbl-64/s_fma.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_fmaf.c b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
index bebd3ee431..eb7d30efca 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
@@ -20,8 +20,6 @@
 #include <math.h>
 #include <init-arch.h>
 
-#ifdef HAVE_AVX_SUPPORT
-
 extern float __fmaf_sse2 (float x, float y, float z) attribute_hidden;
 
 
@@ -33,18 +31,18 @@ __fmaf_fma3 (float x, float y, float z)
 }
 
 
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 static float
 __fmaf_fma4 (float x, float y, float z)
 {
   asm ("vfmaddss %3, %2, %1, %0" : "=x" (x) : "x" (x), "x" (y), "x" (z));
   return x;
 }
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __fmaf_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __fmaf_fma4 ((void *) 0)
+#endif
 
 
 libm_ifunc (__fmaf, HAS_ARCH_FEATURE (FMA_Usable)
@@ -52,7 +50,6 @@ libm_ifunc (__fmaf, HAS_ARCH_FEATURE (FMA_Usable)
 			     ? __fmaf_fma4 : __fmaf_sse2));
 weak_alias (__fmaf, fmaf)
 
-# define __fmaf __fmaf_sse2
-#endif
+#define __fmaf __fmaf_sse2
 
 #include <sysdeps/ieee754/dbl-64/s_fmaf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
index 3bc73306dc..c36ea2577e 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
@@ -1,21 +1,20 @@
-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
-# include <init-arch.h>
-# include <math.h>
-# undef NAN
+#include <init-arch.h>
+#include <math.h>
+#undef NAN
 
 extern double __cos_sse2 (double);
 extern double __sin_sse2 (double);
 extern double __cos_avx (double);
 extern double __sin_avx (double);
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 extern double __cos_fma4 (double);
 extern double __sin_fma4 (double);
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __cos_fma4 ((void *) 0)
-#  define __sin_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __cos_fma4 ((void *) 0)
+# define __sin_fma4 ((void *) 0)
+#endif
 
 libm_ifunc (__cos, (HAS_ARCH_FEATURE (FMA4_Usable) ? __cos_fma4 :
 		    HAS_ARCH_FEATURE (AVX_Usable)
@@ -27,9 +26,8 @@ libm_ifunc (__sin, (HAS_ARCH_FEATURE (FMA4_Usable) ? __sin_fma4 :
 		    ? __sin_avx : __sin_sse2));
 weak_alias (__sin, sin)
 
-# define __cos __cos_sse2
-# define __sin __sin_sse2
-#endif
+#define __cos __cos_sse2
+#define __sin __sin_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/s_sin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
index d99d9db3d5..48848b2c40 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c
@@ -1,23 +1,21 @@
-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
-# include <init-arch.h>
-# include <math.h>
+#include <init-arch.h>
+#include <math.h>
 
 extern double __tan_sse2 (double);
 extern double __tan_avx (double);
-# ifdef HAVE_FMA4_SUPPORT
+#ifdef HAVE_FMA4_SUPPORT
 extern double __tan_fma4 (double);
-# else
-#  undef HAS_ARCH_FEATURE
-#  define HAS_ARCH_FEATURE(feature) 0
-#  define __tan_fma4 ((void *) 0)
-# endif
+#else
+# undef HAS_ARCH_FEATURE
+# define HAS_ARCH_FEATURE(feature) 0
+# define __tan_fma4 ((void *) 0)
+#endif
 
 libm_ifunc (tan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __tan_fma4 :
 		  HAS_ARCH_FEATURE (AVX_Usable)
 		  ? __tan_avx : __tan_sse2));
 
-# define tan __tan_sse2
-#endif
+#define tan __tan_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/s_tan.c>