forked from enlightenment/efl
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
This commit is contained in:
parent
977b2731ee
commit
9111811b83
|
@ -237,9 +237,15 @@ evas_common_cpu_init(void)
|
||||||
cpu_feature_mask &= ~CPU_FEATURE_NEON;
|
cpu_feature_mask &= ~CPU_FEATURE_NEON;
|
||||||
else
|
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 *
|
cpu_feature_mask |= CPU_FEATURE_NEON *
|
||||||
evas_common_cpu_feature_test(evas_common_cpu_neon_test);
|
evas_common_cpu_feature_test(evas_common_cpu_neon_test);
|
||||||
evas_common_cpu_end_opt();
|
evas_common_cpu_end_opt();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue