* lib/cpu-supports.h (gcc_feature_to_glibc_hwcap): Define the
map for all architectures, because for example one can build
and detect and run x86_64 intrinsics in code built with -m32.
This should not add runtime overhead, as mentioned previously
the map resolves at compile time with standard optimizations.
+2025-09-17 Pádraig Brady <P@draigBrady.com>
+
+ cpu-supports: support checks on any architecture
+ * lib/cpu-supports.h (gcc_feature_to_glibc_hwcap): Define the
+ map for all architectures, because for example one can build
+ and detect and run x86_64 intrinsics in code built with -m32.
+ This should not add runtime overhead, as mentioned previously
+ the map resolves at compile time with standard optimizations.
+
2025-09-17 Pádraig Brady <P@draigBrady.com>
tests: support -ftrivial-auto-var-init
{
char const *hwcap = NULL;
- if (0)
- ;
-# if defined __x86_64__
+ if (0) {}
+ /* x64_64 */
else if (streq (feature, "avx")) hwcap = "-AVX";
else if (streq (feature, "avx2")) hwcap = "-AVX2";
else if (streq (feature, "avx512bw")) hwcap = "-AVX512BW";
else if (streq (feature, "avx512f")) hwcap = "-AVX512F";
else if (streq (feature, "pclmul")) hwcap = "-PCLMULQDQ";
else if (streq (feature, "vpclmulqdq")) hwcap = "-VPCLMULQDQ";
-# elif defined __aarch64__
+ /* aarch64 */
else if (streq (feature, "pmull")) hwcap = "-PMULL";
-# endif
return hwcap;
}