about summary refs log tree commit diff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-10-09 16:02:54 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-10-09 16:02:54 +0000
commitb7848899a591a9de23db6afeb9992668ef8aff88 (patch)
tree91ff0e3888868bf5d586ec0919a83a3d7da55b0e /sysdeps/x86_64
parent0e069029a8bb132876d315242054a312ae106852 (diff)
downloadglibc-b7848899a591a9de23db6afeb9992668ef8aff88.tar.gz
glibc-b7848899a591a9de23db6afeb9992668ef8aff88.tar.xz
glibc-b7848899a591a9de23db6afeb9992668ef8aff88.zip
Remove configure tests for FMA4 support.
GCC added support for -mfma4 in version 4.5.  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_fma4): Remove configure
	test.
	* sysdeps/i386/configure: Regenerated.
	* sysdeps/x86_64/configure.ac (libc_cv_cc_fma4): Remove configure
	test.
	* sysdeps/x86_64/configure: Regenerated.
	* sysdeps/x86_64/fpu/multiarch/Makefile [$(have-mfma4) = yes]:
	Make code unconditional.
	* sysdeps/x86_64/fpu/multiarch/e_asin.c [HAVE_FMA4_SUPPORT]:
	Likewise.
	* sysdeps/x86_64/fpu/multiarch/e_atan2.c [HAVE_FMA4_SUPPORT]:
	Likewise.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* sysdeps/x86_64/fpu/multiarch/e_exp.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* sysdeps/x86_64/fpu/multiarch/e_log.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* sysdeps/x86_64/fpu/multiarch/e_pow.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	* sysdeps/x86_64/fpu/multiarch/s_atan.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* sysdeps/x86_64/fpu/multiarch/s_fma.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* sysdeps/x86_64/fpu/multiarch/s_fmaf.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* sysdeps/x86_64/fpu/multiarch/s_sin.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* sysdeps/x86_64/fpu/multiarch/s_tan.c [HAVE_FMA4_SUPPORT]: Make
	code unconditional.
	[!HAVE_FMA4_SUPPORT]: Remove conditional code.
	* config.h.in (HAVE_FMA4_SUPPORT): Remove #undef.
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/configure26
-rw-r--r--sysdeps/x86_64/configure.ac9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_asin.c12
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_atan2.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_exp.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_pow.c10
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fma.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fmaf.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin.c7
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan.c6
13 files changed, 9 insertions, 99 deletions
diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index ef234d5c50..717692365e 100644
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -97,32 +97,6 @@ fi
 config_vars="$config_vars
 config-cflags-avx512 = $libc_cv_cc_avx512"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
-$as_echo_n "checking for FMA4 support... " >&6; }
-if ${libc_cv_cc_fma4+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  libc_cv_cc_fma4=yes
-else
-  libc_cv_cc_fma4=no
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
-$as_echo "$libc_cv_cc_fma4" >&6; }
-if test $libc_cv_cc_fma4 = yes; then
-  $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
-
-fi
-config_vars="$config_vars
-have-mfma4 = $libc_cv_cc_fma4"
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
 $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
 if ${libc_cv_cc_novzeroupper+:} false; then :
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 76a3265959..965ebc95a1 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -30,15 +30,6 @@ if test $libc_cv_cc_avx512 = yes; then
 fi
 LIBC_CONFIG_VAR([config-cflags-avx512], [$libc_cv_cc_avx512])
 
-dnl Check if -mfma4 works.
-AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
-LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no])
-])
-if test $libc_cv_cc_fma4 = yes; then
-  AC_DEFINE(HAVE_FMA4_SUPPORT)
-fi
-LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4])
-
 dnl Check if -mno-vzeroupper works.
 AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
 LIBC_TRY_CC_OPTION([-mno-vzeroupper],
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ad7bbf0aec..34542155aa 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -2,7 +2,6 @@ ifeq ($(subdir),math)
 libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
 			s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
 
-ifeq ($(have-mfma4),yes)
 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 \
@@ -31,7 +30,6 @@ CFLAGS-slowexp-fma4.c = -mfma4
 CFLAGS-slowpow-fma4.c = -mfma4
 CFLAGS-s_sin-fma4.c = -mfma4
 CFLAGS-s_tan-fma4.c = -mfma4
-endif
 
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin.c b/sysdeps/x86_64/fpu/multiarch/e_asin.c
index a0edb96308..111a5b99bd 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_asin.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_asin.c
@@ -1,7 +1,6 @@
-#ifdef HAVE_FMA4_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_acos_sse2 (double);
 extern double __ieee754_asin_sse2 (double);
@@ -20,9 +19,8 @@ libm_ifunc (__ieee754_asin,
 	    : __ieee754_asin_sse2);
 strong_alias (__ieee754_asin, __asin_finite)
 
-# define __ieee754_acos __ieee754_acos_sse2
-# define __ieee754_asin __ieee754_asin_sse2
-#endif
+#define __ieee754_acos __ieee754_acos_sse2
+#define __ieee754_asin __ieee754_asin_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/e_asin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
index 8edb8b635b..9ca3c02a44 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
@@ -4,13 +4,7 @@
 
 extern double __ieee754_atan2_sse2 (double, double);
 extern double __ieee754_atan2_avx (double, double);
-#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
 
 libm_ifunc (__ieee754_atan2,
 	    HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_atan2_fma4
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c
index 84e62a0491..b7d7b5ff27 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_exp.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c
@@ -4,13 +4,7 @@
 
 extern double __ieee754_exp_sse2 (double);
 extern double __ieee754_exp_avx (double);
-#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
 
 libm_ifunc (__ieee754_exp,
 	    HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_exp_fma4
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c
index 90e21ec1ec..cf9533d6c0 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log.c
@@ -4,13 +4,7 @@
 
 extern double __ieee754_log_sse2 (double);
 extern double __ieee754_log_avx (double);
-#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
 
 libm_ifunc (__ieee754_log,
 	    HAS_ARCH_FEATURE (FMA4_Usable) ? __ieee754_log_fma4
diff --git a/sysdeps/x86_64/fpu/multiarch/e_pow.c b/sysdeps/x86_64/fpu/multiarch/e_pow.c
index 6d422d6b6f..a5c5d89c3e 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_pow.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_pow.c
@@ -1,7 +1,6 @@
-#ifdef HAVE_FMA4_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_pow_sse2 (double, double);
 extern double __ieee754_pow_fma4 (double, double);
@@ -12,8 +11,7 @@ libm_ifunc (__ieee754_pow,
 	    : __ieee754_pow_sse2);
 strong_alias (__ieee754_pow, __pow_finite)
 
-# define __ieee754_pow __ieee754_pow_sse2
-#endif
+#define __ieee754_pow __ieee754_pow_sse2
 
 
 #include <sysdeps/ieee754/dbl-64/e_pow.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
index 8d2b004522..742e95cb96 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
@@ -3,13 +3,7 @@
 
 extern double __atan_sse2 (double);
 extern double __atan_avx (double);
-#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
 
 libm_ifunc (atan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __atan_fma4 :
 		   HAS_ARCH_FEATURE (AVX_Usable)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_fma.c b/sysdeps/x86_64/fpu/multiarch/s_fma.c
index 630c99c3ce..41cb803940 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fma.c
@@ -32,18 +32,12 @@ __fma_fma3 (double x, double y, double z)
 }
 
 
-#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
 
 
 libm_ifunc (__fma, HAS_ARCH_FEATURE (FMA_Usable)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_fmaf.c b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
index eb7d30efca..0c91513fee 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
@@ -31,18 +31,12 @@ __fmaf_fma3 (float x, float y, float z)
 }
 
 
-#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
 
 
 libm_ifunc (__fmaf, HAS_ARCH_FEATURE (FMA_Usable)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
index c36ea2577e..8ffd3e7125 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
@@ -6,15 +6,8 @@ extern double __cos_sse2 (double);
 extern double __sin_sse2 (double);
 extern double __cos_avx (double);
 extern double __sin_avx (double);
-#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
 
 libm_ifunc (__cos, (HAS_ARCH_FEATURE (FMA4_Usable) ? __cos_fma4 :
 		    HAS_ARCH_FEATURE (AVX_Usable)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
index 48848b2c40..25f3bca07e 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c
@@ -3,13 +3,7 @@
 
 extern double __tan_sse2 (double);
 extern double __tan_avx (double);
-#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
 
 libm_ifunc (tan, (HAS_ARCH_FEATURE (FMA4_Usable) ? __tan_fma4 :
 		  HAS_ARCH_FEATURE (AVX_Usable)