base/dispatch.c: Recognize `CPUFEAT_ARM_NEON' as requesting ARM64 SIMD.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 15 Nov 2019 17:06:46 +0000 (17:06 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 May 2020 13:36:03 +0000 (14:36 +0100)
The original ARMv8 spec describes the advanced SIMD instructions as
mandatory, but there's a feature flag for them, so I guess that there
might be processors which don't support them.

base/dispatch.c

index 42c64ee..f0531ea 100644 (file)
@@ -340,6 +340,7 @@ static unsigned hwcaps = 0;
 #  define WANTAUX(_)                                                   \
        WANT_AT_HWCAP(_)
 #  define CAPMAP(_)                                                    \
+       _(ARM_NEON, "arm:neon")                                         \
        _(ARM_AES, "arm:aes")
 #endif
 
@@ -456,6 +457,7 @@ static void probe_hwcaps(void)
 #  endif
 #endif
 #if CPUFAM_ARM64
+  if (probed.hwcap & HWCAP_ASIMD) hw |= HF_ARM_NEON;
   if (probed.hwcap & HWCAP_AES) hw |= HF_ARM_AES;
 #endif