summaryrefslogtreecommitdiff
path: root/libitm/acinclude.m4
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/acinclude.m4
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/acinclude.m4')
-rw-r--r--libitm/acinclude.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/libitm/acinclude.m4 b/libitm/acinclude.m4
index 8fcde4b57ad..58fbf424c60 100644
--- a/libitm/acinclude.m4
+++ b/libitm/acinclude.m4
@@ -95,6 +95,20 @@ AC_DEFUN([LIBITM_CHECK_SIZE_T_MANGLING], [
[Define to the letter to which size_t is mangled.])
])
+dnl Check if as supports AVX instructions.
+AC_DEFUN([LIBITM_CHECK_AS_AVX], [
+case "${target_cpu}" in
+i[3456]86 | x86_64)
+ AC_CACHE_CHECK([if the assembler supports AVX], libitm_cv_as_avx, [
+ AC_TRY_COMPILE([], [asm("vzeroupper");],
+ [libitm_cv_as_avx=yes], [libitm_cv_as_avx=no])
+ ])
+ if test x$libitm_cv_as_avx = xyes; then
+ AC_DEFINE(HAVE_AS_AVX, 1, [Define to 1 if the assembler supports AVX.])
+ fi
+ ;;
+esac])
+
sinclude(../libtool.m4)
dnl The lines below arrange for aclocal not to bring an installed
dnl libtool.m4 into aclocal.m4, while still arranging for automake to