[vlc-commits] Add ARMv6 CPU capability
Rémi Denis-Courmont
git at videolan.org
Sat Aug 4 17:35:58 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 4 18:35:19 2012 +0300| [1d2a483eeadf44be568c7f24c0b9ba58925b7d7d] | committer: Rémi Denis-Courmont
Add ARMv6 CPU capability
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1d2a483eeadf44be568c7f24c0b9ba58925b7d7d
---
include/vlc_cpu.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/vlc_cpu.h b/include/vlc_cpu.h
index ec2a816..5b108fc 100644
--- a/include/vlc_cpu.h
+++ b/include/vlc_cpu.h
@@ -153,8 +153,23 @@ VLC_API unsigned vlc_CPU(void);
# else
# define HAVE_FPU 0
# endif
+# define VLC_CPU_ARMv6 4
# define VLC_CPU_ARM_NEON 2
+# if defined (__ARM_ARCH_7A__)
+# define VLC_CPU_ARM_ARCH 7
+# elif defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6T2__)
+# define VLC_CPU_ARM_ARCH 6
+# else
+# define VLC_CPU_ARM_ARCH 4
+# endif
+
+# if (VLC_CPU_ARM_ARCH >= 6)
+# define vlc_CPU_ARMv6() (1)
+# else
+# define vlc_CPU_ARMv6() ((vlc_CPU() & VLC_CPU_ARMv6) != 0)
+# endif
+
# ifdef __ARM_NEON__
# define vlc_CPU_ARM_NEON() (1)
# else
More information about the vlc-commits
mailing list