[compiler-rt] [compiler-rt] Don't provide `__arm_sme_state` for baremetal targets (PR #191434)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 08:56:06 PDT 2026


================
@@ -1,19 +1,21 @@
 // For baremetal platforms, we don't really initialise '__aarch64_cpu_features',
-// with exception of FEAT_SME that we can get from '__aarch64_sme_accessible'.
-
-#if defined(COMPILER_RT_SHARED_LIB)
-__attribute__((weak))
-#endif
-extern _Bool
-__aarch64_sme_accessible(void);
-
-static _Bool has_sme(void) {
-#if defined(COMPILER_RT_SHARED_LIB)
-  if (!__aarch64_sme_accessible)
-    return 0;
-#endif
-  return __aarch64_sme_accessible();
-}
+// with exception of FEAT_SME that we can get from '__arm_sme_state'.
+
+#define SME_STATE_X0_HAS_SME (1ULL << 63)
+
+typedef unsigned long long u64;
+_Static_assert(sizeof(u64) == 8, "u64 should be 64-bits");
----------------
MacDue wrote:

Sure. I thought avoiding `stdint.h` was intentional (as we seem to be using `unsigned long long` in a number of places I'd have expected to see `uint64_t`).


https://github.com/llvm/llvm-project/pull/191434


More information about the llvm-commits mailing list