[PATCH] D148819: [compiler-rt] Include system headers before optionally defining HWCAP macros
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 11:35:04 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG16949c5c48ab: [compiler-rt] Include system headers before optionally defining HWCAP macros (authored by dim).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148819/new/
https://reviews.llvm.org/D148819
Files:
compiler-rt/lib/builtins/cpu_model.c
Index: compiler-rt/lib/builtins/cpu_model.c
===================================================================
--- compiler-rt/lib/builtins/cpu_model.c
+++ compiler-rt/lib/builtins/cpu_model.c
@@ -839,6 +839,25 @@
}
#elif defined(__aarch64__)
+// LSE support detection for out-of-line atomics
+// using HWCAP and Auxiliary vector
+_Bool __aarch64_have_lse_atomics
+ __attribute__((visibility("hidden"), nocommon));
+
+#if defined(__has_include)
+#if __has_include(<sys/auxv.h>)
+#include <sys/auxv.h>
+#if __has_include(<asm/hwcap.h>)
+#include <asm/hwcap.h>
+
+#if defined(__ANDROID__)
+#include <string.h>
+#include <sys/system_properties.h>
+#elif defined(__Fuchsia__)
+#include <zircon/features.h>
+#include <zircon/syscalls.h>
+#endif
+
#ifndef AT_HWCAP
#define AT_HWCAP 16
#endif
@@ -1009,25 +1028,6 @@
#define HWCAP2_SVE_EBF16 (1UL << 33)
#endif
-// LSE support detection for out-of-line atomics
-// using HWCAP and Auxiliary vector
-_Bool __aarch64_have_lse_atomics
- __attribute__((visibility("hidden"), nocommon));
-
-#if defined(__has_include)
-#if __has_include(<sys/auxv.h>)
-#include <sys/auxv.h>
-#if __has_include(<asm/hwcap.h>)
-#include <asm/hwcap.h>
-
-#if defined(__ANDROID__)
-#include <string.h>
-#include <sys/system_properties.h>
-#elif defined(__Fuchsia__)
-#include <zircon/features.h>
-#include <zircon/syscalls.h>
-#endif
-
// Detect Exynos 9810 CPU
#define IF_EXYNOS9810 \
char arch[PROP_VALUE_MAX]; \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148819.515410.patch
Type: text/x-patch
Size: 1561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230420/488a5f9f/attachment.bin>
More information about the llvm-commits
mailing list