]> git.sesse.net Git - vlc/blobdiff - include/vlc_cpu.h
Use var_Inherit* instead of var_CreateGet*.
[vlc] / include / vlc_cpu.h
index 8afe43655b4546b2c5046afb16ea74f518dff1d8..bbc7b5b4687d79778d5dc9f97c39ed351c4464c8 100644 (file)
 #  define CPU_CAPABILITY_SSE2    (1<<7)
 #  define CPU_CAPABILITY_SSE3    (1<<8)
 #  define CPU_CAPABILITY_SSSE3   (1<<9)
-#  define CPU_CAPABILITY_SSE4    (1<<10)
+#  define CPU_CAPABILITY_SSE4_1  (1<<10)
+#  define CPU_CAPABILITY_SSE4_2  (1<<11)
+#  define CPU_CAPABILITY_SSE4A   (1<<12)
+# else
+#  define CPU_CAPABILITY_MMX     (0)
+#  define CPU_CAPABILITY_3DNOW   (0)
+#  define CPU_CAPABILITY_MMXEXT  (0)
+#  define CPU_CAPABILITY_SSE     (0)
+#  define CPU_CAPABILITY_SSE2    (0)
+#  define CPU_CAPABILITY_SSE3    (0)
+#  define CPU_CAPABILITY_SSSE3   (0)
+#  define CPU_CAPABILITY_SSE4_1  (0)
+#  define CPU_CAPABILITY_SSE4_2  (0)
+#  define CPU_CAPABILITY_SSE4A   (0)
+# endif
 
-# elif defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__)
+# if defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__)
 #  define CPU_CAPABILITY_ALTIVEC (1<<16)
+# else
+#  define CPU_CAPABILITY_ALTIVEC (0)
+# endif
 
-# elif defined (__arm__)
+# if defined (__arm__)
 #  define CPU_CAPABILITY_NEON    (1<<24)
-
+# else
+#  define CPU_CAPABILITY_NEON    (0)
 # endif
 
-/** Are floating point oeprations fast?
+VLC_EXPORT( unsigned, vlc_CPU, ( void ) );
+VLC_EXPORT( unsigned, vlc_GetCPUCount, ( void ) );
+
+/** Are floating point operations fast?
  * If this bit is not set, you should try to use fixed-point instead.
  */
-# define CPU_CAPABILITY_FPU     (1<<31)
+# if defined (__i386__) || defined (__x86_64__)
+#  define HAVE_FPU 1
 
-VLC_EXPORT( unsigned, vlc_CPU, ( void ) );
+# elif defined (__powerpc__) || defined (__ppc__) || defined (__pc64__)
+#  define HAVE_FPU 1
+
+# elif defined (__arm__)
+#  define HAVE_FPU 0 /* revisit later? */
+
+# elif defined (__sparc__)
+#  define HAVE_FPU 1
+
+# else
+#  define HAVE_FPU 0
+
+# endif
 
 typedef void *(*vlc_memcpy_t) (void *tgt, const void *src, size_t n);
 typedef void *(*vlc_memset_t) (void *tgt, int c, size_t n);