diff options
author | Richard Henderson <rth@redhat.com> | 2011-11-09 16:29:38 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-11-09 16:29:38 -0800 |
commit | 430616e7a7a321e216aeaeccc3da35aa23c0080f (patch) | |
tree | c7c77fdbc7b50f224cc4d0500b462b578274d47f /libitm/configure | |
parent | 41582ffe43fa994c13d0e5225f96a02cb0995c99 (diff) | |
download | gcc-430616e7a7a321e216aeaeccc3da35aa23c0080f.zip gcc-430616e7a7a321e216aeaeccc3da35aa23c0080f.tar.gz gcc-430616e7a7a321e216aeaeccc3da35aa23c0080f.tar.bz2 |
libitm: Work around assembler missing AVX insns.
From-SVN: r181246
Diffstat (limited to 'libitm/configure')
-rw-r--r-- | libitm/configure | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libitm/configure b/libitm/configure index 0f0ec1f..b30ced1 100644 --- a/libitm/configure +++ b/libitm/configure @@ -17115,6 +17115,43 @@ $as_echo "#define HAVE_64BIT_SYNC_BUILTINS 1" >>confdefs.h fi +case "${target_cpu}" in +i345686 | x86_64) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler supports AVX" >&5 +$as_echo_n "checking if the assembler supports AVX... " >&6; } +if test "${libitm_cv_as_avx+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +asm("vzeroupper"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libitm_cv_as_avx=yes +else + libitm_cv_as_avx=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libitm_cv_as_avx" >&5 +$as_echo "$libitm_cv_as_avx" >&6; } + if test x$libitm_cv_as_avx = xyes; then + +$as_echo "#define HAVE_AS_AVX 1" >>confdefs.h + + fi + ;; +esac + # Cleanup and exit. CFLAGS="$save_CFLAGS" cat >confcache <<\_ACEOF |