[compiler-rt] [builtins] Refactor cpu_model support to reduce #if nesting. NFCI (PR #75635)

Jon Roelofs via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 10:17:52 PST 2023


================
@@ -0,0 +1,6 @@
+#include <sys/auxv.h>
+
+static void CONSTRUCTOR_ATTRIBUTE init_have_lse_atomics(void) {
+  unsigned long hwcap = getauxval(AT_HWCAP);
+  __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0;
+}
----------------
jroelofs wrote:

- [ ] FIXME: needs EOF newline

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


More information about the llvm-commits mailing list