summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beich <[email protected]>2019-09-16 11:26:24 +0000
committerMatt Turner <[email protected]>2019-10-09 12:55:00 -0700
commit7d5ad8e77e4e085d30debc832d401d1cd78fb8c3 (patch)
treed0a106db239f50d91bfd52ef958bca907dfc8537
parent5218c3b27e41aefa9f4424a25a22b13895bd2d6f (diff)
util: skip NEON detection if built with -mfpu=neon
Helps platforms where runtime detection isn't implemented. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Jan Beich <[email protected]>
-rw-r--r--src/util/u_cpu_detect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c
index abfea65b24d..387003d6cba 100644
--- a/src/util/u_cpu_detect.c
+++ b/src/util/u_cpu_detect.c
@@ -360,7 +360,9 @@ check_os_arm_support(void)
* used. Because of this we cannot use PIPE_OS_ANDROID here, but rather
* have a separate macro that only gets enabled from respective Android.mk.
*/
-#if defined(HAS_ANDROID_CPUFEATURES)
+#if defined(__ARM_NEON) || defined(__ARM_NEON__)
+ util_cpu_caps.has_neon = 1;
+#elif defined(HAS_ANDROID_CPUFEATURES)
AndroidCpuFamily cpu_family = android_getCpuFamily();
uint64_t cpu_features = android_getCpuFeatures();