summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_cpu.c')
-rw-r--r--src/lib/eina/eina_cpu.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/eina/eina_cpu.c b/src/lib/eina/eina_cpu.c
index 45b3b9295d..c61297803b 100644
--- a/src/lib/eina/eina_cpu.c
+++ b/src/lib/eina/eina_cpu.c
@@ -130,10 +130,7 @@ void _x86_simd(Eina_Cpu_Features *features)
130static void 130static void
131_arm_cpu_features(Eina_Cpu_Features *features) 131_arm_cpu_features(Eina_Cpu_Features *features)
132{ 132{
133 unsigned long aux; 133 unsigned long aux = getauxval(AT_HWCAP);
134
135 aux = getauxval(AT_HWCAP);
136
137# if defined(__aarch64__) 134# if defined(__aarch64__)
138 *features |= EINA_CPU_NEON; 135 *features |= EINA_CPU_NEON;
139# endif 136# endif
@@ -146,6 +143,17 @@ _arm_cpu_features(Eina_Cpu_Features *features)
146} 143}
147#endif 144#endif
148 145
146#if defined(HAVE_SYS_AUXV_H) && defined(HAVE_ASM_HWCAP_H) && (defined(__POWERPC__) && defined(__VEC__)) && defined(__linux__)
147static void
148_ppc_cpu_features(Eina_Cpu_Features *features)
149{
150# ifdef PPC_FEATURE_HAS_ALTIVEC
151 unsigned long aux = getauxval(AT_HWCAP);
152 if (aux & PPC_FEATURE_HAS_ALTIVEC) *features |= EINA_CPU_ALTIVEC;
153# endif
154}
155#endif
156
149/*============================================================================* 157/*============================================================================*
150* Global * 158* Global *
151*============================================================================*/ 159*============================================================================*/