[compiler-rt] [FMV][AArch64] Add initial AT_HWCAP3 / AT_HWCAP4 support (PR #161595)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 07:04:56 PDT 2025


================
@@ -190,3 +190,19 @@
 #ifndef HWCAP2_CSSC
 #define HWCAP2_CSSC (1UL << 34)
 #endif
+
+#ifndef AT_HWCAP3
+#if defined(__linux__) || defined(__ANDROID__)
----------------
enh-google wrote:

> We don't seem to care for non linux/android for other macros like AT_HWCAP and AT_HWCAP2 above.

AT_HWCAP and AT_HWCAP2 are so old that i assume we don't support compiling with a libc that doesn't have them. 3 and 4 require relatively new libcs though.

(it might be worth _saying_ that in a code comment, so a future reader knows they can remove this in 2028 or whenever.)

also: __linux__ is true for __ANDROID__, so there's no need to explicitly mention __ANDROID__ here.

> I couldn't find the values 38 and 39 for AT_HWCAP3/AT_HWCAP4 can you shed some light?

yeah, i'm confused by that... probably worth explicitly saying (in code or #if) if this is for FreeBSD or whatever.

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


More information about the llvm-commits mailing list