about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2012-01-28 14:48:46 -0500
committerUlrich Drepper <drepper@gmail.com>2012-01-28 14:48:46 -0500
commit56f6f6a2403cfa7267cad722597113be35ecf70d (patch)
treedd8bc1d7fe292985484bb91ef7ae9f31a8603081 /sysdeps/i386
parent73139a7628c424c82eb9297ccb5505c0bc5b65aa (diff)
downloadglibc-56f6f6a2403cfa7267cad722597113be35ecf70d.tar.gz
glibc-56f6f6a2403cfa7267cad722597113be35ecf70d.tar.xz
glibc-56f6f6a2403cfa7267cad722597113be35ecf70d.zip
Use -msse2avx option for x86-64 libm functions
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/configure23
-rw-r--r--sysdeps/i386/configure.in11
2 files changed, 34 insertions, 0 deletions
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