aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-02-28 16:38:53 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-02-28 18:07:53 -0600
commit9111811b83cc1b3bb0e73f837497882d2e06a0ce (patch)
tree40d71de154bb8ac5ed48d61b487b97e3a4056a2c
parenteet: add doc note for EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY_STRING (diff)
downloadefl-9111811b83cc1b3bb0e73f837497882d2e06a0ce.tar.gz
evas: Check for NEON via eina_cpu_features if possible
On linux we can do this test without firing a SIGILL and trapping it, if getauxval() is present. ref https://phab.enlightenment.org/T6711
-rw-r--r--src/lib/evas/common/evas_cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_cpu.c b/src/lib/evas/common/evas_cpu.c
index 2adf1d16d7..ce01eec76f 100644
--- a/src/lib/evas/common/evas_cpu.c
+++ b/src/lib/evas/common/evas_cpu.c
@@ -237,9 +237,15 @@ evas_common_cpu_init(void)
cpu_feature_mask &= ~CPU_FEATURE_NEON;
else
{
+ /* On linux eina_cpu sets this up with getauxval() */
+#if defined(HAVE_SYS_AUXV_H) && defined(HAVE_ASM_HWCAP_H) && defined(__arm__) && defined(__linux__)
+ cpu_feature_mask |= CPU_FEATURE_NEON *
+ !!(eina_cpu_features_get() & EINA_CPU_NEON);
+#else
cpu_feature_mask |= CPU_FEATURE_NEON *
evas_common_cpu_feature_test(evas_common_cpu_neon_test);
evas_common_cpu_end_opt();
+#endif
}
# endif
#endif