summary refs log tree commit diff
path: root/sysdeps/x86_64/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/configure.ac')
-rw-r--r--sysdeps/x86_64/configure.ac24
1 files changed, 24 insertions, 0 deletions
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index c682f93c3e..5e5d61b317 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -23,6 +23,30 @@ if test $libc_cv_cc_avx = yes; then
 fi
 LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx])
 
+dnl Check if -mavx512f works.
+AC_CACHE_CHECK(for AVX512 support, libc_cv_cc_avx512, [dnl
+LIBC_TRY_CC_OPTION([-mavx512f], [libc_cv_cc_avx512=yes], [libc_cv_cc_avx512=no])
+])
+if test $libc_cv_cc_avx512 = yes; then
+  AC_DEFINE(HAVE_AVX512_SUPPORT)
+fi
+LIBC_CONFIG_VAR([config-cflags-avx512], [$libc_cv_cc_avx512])
+
+dnl Check if asm supports AVX512.
+AC_CACHE_CHECK(for AVX512 support in assembler, libc_cv_asm_avx512, [dnl
+cat > conftest.s <<\EOF
+        vmovdqu64 %zmm0, (%rsp)
+EOF
+if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+  libc_cv_asm_avx512=yes
+else
+  libc_cv_asm_avx512=no
+fi
+rm -f conftest*])
+if test $libc_cv_asm_avx512 == yes; then
+  AC_DEFINE(HAVE_AVX512_ASM_SUPPORT)
+fi
+
 dnl Check if -msse2avx works.
 AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
 LIBC_TRY_CC_OPTION([-msse2avx],