summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-12-06 15:28:25 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-12-06 15:32:17 +0000
commit01ed58d52d878ea51e7d5dd66f812b8e17f33cb8 (patch)
tree22be14379f4001a0002c2f9da77f4883c940d810 /src/lib/evas
parent66309bab3d9899d477918b3a5d06540d8244b424 (diff)
evas - cpu - fix sve check when neon is disabled...
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/common/evas_cpu.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/lib/evas/common/evas_cpu.c b/src/lib/evas/common/evas_cpu.c
index d9215e1140..d9f5c015ee 100644
--- a/src/lib/evas/common/evas_cpu.c
+++ b/src/lib/evas/common/evas_cpu.c
@@ -91,15 +91,6 @@ evas_common_cpu_neon_test(void)
91} 91}
92 92
93void 93void
94evas_common_cpu_sve_test(void)
95{
96#if defined(__aarch64__)
97 volatile int result = 123;
98 asm("movz %w[res], #10" : [res] "=r" (result));
99#endif
100}
101
102void
103evas_common_cpu_vis_test(void) 94evas_common_cpu_vis_test(void)
104{ 95{
105# ifdef __SPARC__ 96# ifdef __SPARC__
@@ -130,6 +121,15 @@ _cpu_check(Eina_Cpu_Features f)
130} 121}
131#endif 122#endif
132 123
124#if defined(__aarch64__)
125void
126evas_common_cpu_sve_test(void)
127{
128 volatile int result = 123;
129 asm("movz %w[res], #10" : [res] "=r" (result));
130}
131#endif
132
133#ifdef NEED_FEATURE_TEST 133#ifdef NEED_FEATURE_TEST
134int 134int
135evas_common_cpu_feature_test(void (*feature)(void)) 135evas_common_cpu_feature_test(void (*feature)(void))
@@ -274,15 +274,14 @@ evas_common_cpu_init(void)
274 cpu_feature_mask &= ~CPU_FEATURE_SVE; 274 cpu_feature_mask &= ~CPU_FEATURE_SVE;
275 else 275 else
276 { 276 {
277# if defined(HAVE_SYS_AUXV_H) && defined(HAVE_ASM_HWCAP_H) && defined(__arm__) && defined(__linux__) 277# if defined(HAVE_SYS_AUXV_H) && defined(HAVE_ASM_HWCAP_H) && defined(__arm__) && defined(__linux__)
278#error "xx"
279 cpu_feature_mask |= CPU_FEATURE_SVE * 278 cpu_feature_mask |= CPU_FEATURE_SVE *
280 !!(eina_cpu_features_get() & EINA_CPU_SVE); 279 !!(eina_cpu_features_get() & EINA_CPU_SVE);
281# else 280# else
282 cpu_feature_mask |= CPU_FEATURE_SVE * 281 cpu_feature_mask |= CPU_FEATURE_SVE *
283 evas_common_cpu_feature_test(evas_common_cpu_sve_test); 282 evas_common_cpu_feature_test(evas_common_cpu_sve_test);
284 evas_common_cpu_end_opt(); 283 evas_common_cpu_end_opt();
285# endif 284# endif
286 } 285 }
287#endif 286#endif
288} 287}