From 56f6f6a2403cfa7267cad722597113be35ecf70d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Jan 2012 14:48:46 -0500 Subject: Use -msse2avx option for x86-64 libm functions --- sysdeps/i386/configure | 23 +++++++++++++++++++++++ sysdeps/i386/configure.in | 11 +++++++++++ 2 files changed, 34 insertions(+) (limited to 'sysdeps/i386') diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index ae494e2712..bc7900ee2e 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -756,6 +756,29 @@ if test $libc_cv_cc_avx = yes; then fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5 +$as_echo_n "checking for AVX encoding of SSE instructions... " >&6; } +if ${libc_cv_cc_sse2avx+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -msse2avx -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_sse2avx=yes +else + libc_cv_cc_sse2avx=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5 +$as_echo "$libc_cv_cc_sse2avx" >&6; } +if test $libc_cv_cc_sse2avx = yes; then + $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h + +fi + { $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 : diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in index 5a9840e16c..59a4cd6ea1 100644 --- a/sysdeps/i386/configure.in +++ b/sysdeps/i386/configure.in @@ -67,6 +67,17 @@ if test $libc_cv_cc_avx = yes; then AC_DEFINE(HAVE_AVX_SUPPORT) fi +dnl Check if -msse2avx works. +AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl +if AC_TRY_COMMAND([${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null]); then + libc_cv_cc_sse2avx=yes +else + libc_cv_cc_sse2avx=no +fi]) +if test $libc_cv_cc_sse2avx = yes; then + AC_DEFINE(HAVE_SSE2AVX_SUPPORT) +fi + dnl Check if -mfma4 works. AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl if AC_TRY_COMMAND([${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null]); then -- cgit 1.4.1