about summary refs log tree commit diff
path: root/sysdeps/aarch64/configure.ac
diff options
context:
space:
mode:
authorNaohiro Tamura <naohirot@jp.fujitsu.com>2021-05-12 09:26:40 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-05-26 12:01:06 +0100
commit77d175e14e5f4cf24e9579c03eef5d006a286316 (patch)
treea7d8a3778d938f830137f537796cd9a06e53d4e5 /sysdeps/aarch64/configure.ac
parentbfbdfe4eabb7514d7c44f3bc161fa8ef4e2ee364 (diff)
downloadglibc-77d175e14e5f4cf24e9579c03eef5d006a286316.tar.gz
glibc-77d175e14e5f4cf24e9579c03eef5d006a286316.tar.xz
glibc-77d175e14e5f4cf24e9579c03eef5d006a286316.zip
config: Added HAVE_AARCH64_SVE_ASM for aarch64
This patch checks if assembler supports '-march=armv8.2-a+sve' to
generate SVE code or not, and then define HAVE_AARCH64_SVE_ASM macro.
Diffstat (limited to 'sysdeps/aarch64/configure.ac')
-rw-r--r--sysdeps/aarch64/configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
index 66f755078a..3347c13fa1 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -90,3 +90,18 @@ EOF
   fi
   rm -rf conftest.*])
 LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs])
+
+# Check if asm support armv8.2-a+sve
+AC_CACHE_CHECK(for SVE support in assembler, libc_cv_asm_sve, [dnl
+cat > conftest.s <<\EOF
+        ptrue p0.b
+EOF
+if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then
+  libc_cv_aarch64_sve_asm=yes
+else
+  libc_cv_aarch64_sve_asm=no
+fi
+rm -f conftest*])
+if test $libc_cv_aarch64_sve_asm = yes; then
+  AC_DEFINE(HAVE_AARCH64_SVE_ASM)
+fi