* 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.
---
lib/cpu-supports.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/cpu-supports.h b/lib/cpu-supports.h
index 8905680d09..c0ad83866f 100644
--- a/lib/cpu-supports.h
+++ b/lib/cpu-supports.h
@@ -61,18 +61,16 @@ gcc_feature_to_glibc_hwcap (char const *feature)
{
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;
}
--
2.50.1