13
0

Fix ARM runtime NEON detection

This commit is contained in:
Robin Gareus 2020-08-24 22:03:28 +02:00
parent 76f465e127
commit 34159e4594
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -161,17 +161,16 @@ FPU::FPU ()
return;
}
#ifdef ARM_NEON_SUPPORT
# ifdef __aarch64__
if (getauxval(AT_HWCAP) & HWCAP_SIMD)
#else
if (getauxval(AT_HWCAP) & HWCAP_NEON)
#endif
{
_flags = Flags(_flags & HasNEON);
/* all armv8+ features NEON used in arm_neon_functions.cc */
_flags = Flags(_flags | HasNEON);
# elif defined __arm__
if (getauxval(AT_HWCAP) & HWCAP_NEON) {
_flags = Flags(_flags | HasNEON);
}
# endif
#endif
#if !( (defined __x86_64__) || (defined __i386__) || (defined _M_X64) || (defined _M_IX86) ) // !ARCH_X86
/* Non-Intel architecture, nothing to do here */