summaryrefslogtreecommitdiff
path: root/libitm/configure
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-10 00:29:38 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-10 00:29:38 +0000
commit36a0e17acc81581d2507c5a09a07a3f81d2360ec (patch)
treec7c77fdbc7b50f224cc4d0500b462b578274d47f /libitm/configure
parent61779158bc0956cb54d1dd63d4067a2669b41777 (diff)
downloadgcc-36a0e17acc81581d2507c5a09a07a3f81d2360ec.tar.gz
libitm: Work around assembler missing AVX insns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181246 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm/configure')
-rw-r--r--libitm/configure37
1 files changed, 37 insertions, 0 deletions
diff --git a/libitm/configure b/libitm/configure
index 0f0ec1fc77a..b30ced11548 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