diff options
-rw-r--r-- | ChangeLog | 38 | ||||
-rw-r--r-- | config.h.in | 3 | ||||
-rw-r--r-- | sysdeps/i386/configure | 26 | ||||
-rw-r--r-- | sysdeps/i386/configure.ac | 9 | ||||
-rw-r--r-- | sysdeps/x86_64/configure | 26 | ||||
-rw-r--r-- | sysdeps/x86_64/configure.ac | 9 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/e_asin.c | 12 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/e_atan2.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/e_exp.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/e_log.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/e_pow.c | 10 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_atan.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_fma.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_fmaf.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_sin.c | 7 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/s_tan.c | 6 |
17 files changed, 47 insertions, 137 deletions
diff --git a/ChangeLog b/ChangeLog index 1ceae346df..222cf97856 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,43 @@ 2015-10-09 Joseph Myers <joseph@codesourcery.com> + * 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. + [BZ #19095] * sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Cast low part of mantissa to long int before shifting left. diff --git a/config.h.in b/config.h.in index d9aba90d30..7c851c97fe 100644 --- a/config.h.in +++ b/config.h.in @@ -88,9 +88,6 @@ /* Define if assembler supports Intel MPX. */ #undef HAVE_MPX_SUPPORT -/* Define if gcc supports FMA4. */ -#undef HAVE_FMA4_SUPPORT - /* Define if gcc supports AVX2. */ #undef HAVE_AVX2_SUPPORT diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index 1b39cbae08..bc22864946 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -114,32 +114,6 @@ $as_echo "$libc_cv_as_i686" >&6; } config_vars="$config_vars config-asflags-i686 = $libc_cv_as_i686" -{ $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/i386/configure.ac b/sysdeps/i386/configure.ac index 965fa73489..c51530a943 100644 --- a/sysdeps/i386/configure.ac +++ b/sysdeps/i386/configure.ac @@ -42,15 +42,6 @@ LIBC_TRY_CC_OPTION([-Wa,-mtune=i686], ]) LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686]) -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/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) |