cpuinfo: disable NEON detection on Android for now.

Will fix this properly soon.
This commit is contained in:
Ryan C. Gordon 2016-11-17 01:34:18 -05:00
parent 5c6b2ebf2d
commit 66a36d5660
1 changed files with 3 additions and 1 deletions

View File

@ -50,9 +50,11 @@
#include <setjmp.h> #include <setjmp.h>
#endif #endif
#if 0 /* !!! FIXME */
#if defined(__ANDROID__) && defined(__ARM_ARCH) #if defined(__ANDROID__) && defined(__ARM_ARCH)
#include <cpu-features.h> #include <cpu-features.h>
#endif #endif
#endif
#if defined(__LINUX__) && defined(__ARM_ARCH) && HAVE_GETAUXVAL #if defined(__LINUX__) && defined(__ARM_ARCH) && HAVE_GETAUXVAL
#include <sys/auxv.h> #include <sys/auxv.h>
@ -312,7 +314,7 @@ CPU_haveNEON(void)
const int error = sysctlbyname("hw.optional.neon", &neon, &length, NULL, 0); const int error = sysctlbyname("hw.optional.neon", &neon, &length, NULL, 0);
if (!error) if (!error)
neon = (neon != 0); neon = (neon != 0);
#elif defined(__ANDROID__) && defined(__ARM_ARCH) #elif 0 && defined(__ANDROID__) && defined(__ARM_ARCH) /* !!! FIXME */
if ( (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM) && if ( (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM) &&
((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0) ) { ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0) ) {
neon = 1; neon = 1;