diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2018-02-28 16:38:53 -0600 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2018-04-04 15:47:39 -0500 |
commit | f2563b0be7b32ac126f0ceee5054ded1f850b873 (patch) | |
tree | 3531af7c21e641a9a241e449064b19be8ff3e2ff | |
parent | d8ac6be6661314c5c0d51308fb59dba01d71c327 (diff) | |
download | efl-f2563b0be7b32ac126f0ceee5054ded1f850b873.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 T6711
-rw-r--r-- | src/lib/evas/common/evas_cpu.c | 6 |
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 0f83258806..c066aa7bdd 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 |