[compiler-rt] [AArch64][compiler-rt] Guard sme-abi-vg.c with !defined(DISABLE_AARCH64_FMV) (PR #94973)
Kerry McLaughlin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 08:27:56 PDT 2024
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/94973
>From f946f33d98b721263ce8fcffa2e32bc5f2094b88 Mon Sep 17 00:00:00 2001
From: Kerry McLaughlin <kerry.mclaughlin at arm.com>
Date: Mon, 10 Jun 2024 12:27:29 +0000
Subject: [PATCH 1/2] [AArch64][compiler-rt] Guard sme-abi-vg.c with
!defined(DISABLE_AARCH64_FMV)
---
compiler-rt/lib/builtins/aarch64/sme-abi-vg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c b/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c
index e384ab7f87c46..273f49020079d 100644
--- a/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c
+++ b/compiler-rt/lib/builtins/aarch64/sme-abi-vg.c
@@ -4,6 +4,8 @@
#include "../cpu_model/aarch64.h"
+#if !defined(DISABLE_AARCH64_FMV)
+
struct FEATURES {
long long features;
};
@@ -43,3 +45,5 @@ __arm_get_current_vg(void) __arm_streaming_compatible {
return 0;
}
+
+#endif // !defined(DISABLE_AARCH64_FMV)
>From d952a83903e733785ad7f358befd07fa192bc4a9 Mon Sep 17 00:00:00 2001
From: Kerry McLaughlin <kerry.mclaughlin at arm.com>
Date: Mon, 10 Jun 2024 15:17:21 +0000
Subject: [PATCH 2/2] - Add a cmake warning for enabling SME without FMV
support.
---
compiler-rt/lib/builtins/CMakeLists.txt | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 0b9e9bd7a2956..b52125a52c1c3 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -562,9 +562,13 @@ set(aarch64_SOURCES
)
if(COMPILER_RT_HAS_AARCH64_SME AND COMPILER_RT_HAS_FNO_BUILTIN_FLAG AND (COMPILER_RT_HAS_AUXV OR COMPILER_RT_BAREMETAL_BUILD))
- list(APPEND aarch64_SOURCES aarch64/sme-abi.S aarch64/sme-abi-init.c aarch64/sme-abi-vg.c aarch64/sme-libc-routines.c)
- message(STATUS "AArch64 SME ABI routines enabled")
- set_source_files_properties(aarch64/sme-libc-routines.c PROPERTIES COMPILE_FLAGS "-fno-builtin")
+ if(COMPILER_RT_DISABLE_AARCH64_FMV)
+ message(WARNING "AArch64 SME ABI routines require function multiversioning support.")
+ else()
+ list(APPEND aarch64_SOURCES aarch64/sme-abi.S aarch64/sme-abi-init.c aarch64/sme-abi-vg.c aarch64/sme-libc-routines.c)
+ message(STATUS "AArch64 SME ABI routines enabled")
+ set_source_files_properties(aarch64/sme-libc-routines.c PROPERTIES COMPILE_FLAGS "-fno-builtin")
+ endif()
else()
message(STATUS "AArch64 SME ABI routines disabled")
endif()
More information about the llvm-commits
mailing list