* lib/cpu-supports.h (gcc_feature_to_glibc_hwcap): Map "asimd" to "-ASIMD". Add a comment on where to find aarch64 hwcaps in glibc. --- ChangeLog | 6 ++++++ lib/cpu-supports.h | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog index 8a8dcf878e..1163413931 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2026-02-18 Collin Funk <[email protected]> + + cpu-supports: Add detection for Advanced SIMD (Neon) instructions. + * lib/cpu-supports.h (gcc_feature_to_glibc_hwcap): Map "asimd" to + "-ASIMD". Add a comment on where to find aarch64 hwcaps in glibc. + 2026-02-16 Pádraig Brady <[email protected]> parse-datetime: avoid false test failure on windows diff --git a/lib/cpu-supports.h b/lib/cpu-supports.h index db441587aa..abbd7e7fc4 100644 --- a/lib/cpu-supports.h +++ b/lib/cpu-supports.h @@ -53,7 +53,9 @@ /* Return the glibc.cpu.hwcaps setting (prepended with "-"), corresponding to the passed gcc _builtin_cpu_supports(FEATURE). Supported hwcaps can be identified from the bit_cpu_* defines - in GLIBC's sysdeps/x86/include/cpu-features.h + in GLIBC's sysdeps/x86/include/cpu-features.h for x86 and + the HWCAP_* defines in sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h + for aarch64. Note this mapping should resolve at compile time. */ ATTRIBUTE_PURE static inline char const * @@ -70,6 +72,7 @@ gcc_feature_to_glibc_hwcap (char const *feature) else if (streq (feature, "pclmul")) hwcap = "-PCLMULQDQ"; else if (streq (feature, "vpclmulqdq")) hwcap = "-VPCLMULQDQ"; /* aarch64 */ + else if (streq (feature, "asimd")) hwcap = "-ASIMD"; else if (streq (feature, "pmull")) hwcap = "-PMULL"; return hwcap; -- 2.53.0
