From 34159e4594e075f4881d5d1a04c03f14a3deecda Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 24 Aug 2020 22:03:28 +0200 Subject: [PATCH] Fix ARM runtime NEON detection --- libs/pbd/fpu.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc index 33a7266a91..3ac5601339 100644 --- a/libs/pbd/fpu.cc +++ b/libs/pbd/fpu.cc @@ -161,16 +161,15 @@ 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); +# ifdef __aarch64__ + /* 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