aboutsummaryrefslogtreecommitdiff
path: root/libgcc/configure.ac
diff options
context:
space:
mode:
authorDaniel Santos <daniel.santos@pobox.com>2017-09-23 11:02:54 +0000
committerDaniel Santos <dansan@gcc.gnu.org>2017-09-23 11:02:54 +0000
commit89762a83cdc24a5a9471acdc4676d150d3c71a11 (patch)
tree972910d2ae215207d55ad79f76530d5903fe914b /libgcc/configure.ac
parent099666b3fff6c1f81bc1e70bd17fba83c3f9c149 (diff)
downloadgcc-89762a83cdc24a5a9471acdc4676d150d3c71a11.zip
gcc-89762a83cdc24a5a9471acdc4676d150d3c71a11.tar.gz
gcc-89762a83cdc24a5a9471acdc4676d150d3c71a11.tar.bz2
PR target/82196 addendum: Fix Darwin build breakage and test FAILS on Solaris
gcc/testsuite: * gcc.target/i386/pr82196-1.c: (b): Remove volatile asm. * gcc.target/i386/pr82196-2.c: (b): Likewise. libgcc: * configure.ac: Add Check for HAVE_AS_AVX. * config.in: Regenerate. * configure: Likewise. * config/i386/i386-asm.h: Include auto-target.h from libgcc. (SSE_SAVE, SSE_RESTORE): Emit .byte sequence for !HAVE_AS_AVX. Correct out-of-date comments. From-SVN: r253116
Diffstat (limited to 'libgcc/configure.ac')
-rw-r--r--libgcc/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index da49971..dd60b01 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -506,6 +506,22 @@ if test "$enable_tls $gcc_cv_use_emutls" = "yes yes"; then
fi
AC_SUBST(set_use_emutls)
+dnl Check if as supports AVX instructions.
+AC_DEFUN([LIBGCC_CHECK_AS_AVX], [
+case "${target}" in
+i[[34567]]86-*-* | x86_64-*-*)
+ AC_CACHE_CHECK([if the assembler supports AVX], libgcc_cv_as_avx, [
+ AC_TRY_COMPILE([], [asm("vzeroupper");],
+ [libgcc_cv_as_avx=yes], [libgcc_cv_as_avx=no])
+ ])
+ if test x$libgcc_cv_as_avx = xyes; then
+ AC_DEFINE(HAVE_AS_AVX, 1, [Define to 1 if the assembler supports AVX.])
+ fi
+ ;;
+esac])
+LIBGCC_CHECK_AS_AVX
+
+dnl Check if as supports RTM instructions.
AC_CACHE_CHECK(for init priority support, libgcc_cv_init_priority, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
[[void ip (void) __attribute__ ((constructor (1)));]])],