X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_cpu.h;h=932dc681d9f1c885950a8d79200f079940877e67;hb=69b3ac6b1fd1ee3bb047e776cf28f8f24a6b8758;hp=7997770ce0b75df0601a814b7300fb5e7d359c61;hpb=56ed95e8d4fabfe954e1f062bad6281179aa036f;p=vlc diff --git a/include/vlc_cpu.h b/include/vlc_cpu.h index 7997770ce0..932dc681d9 100644 --- a/include/vlc_cpu.h +++ b/include/vlc_cpu.h @@ -34,7 +34,9 @@ # 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) @@ -43,7 +45,9 @@ # define CPU_CAPABILITY_SSE2 (0) # define CPU_CAPABILITY_SSE3 (0) # define CPU_CAPABILITY_SSSE3 (0) -# define CPU_CAPABILITY_SSE4 (0) +# define CPU_CAPABILITY_SSE4_1 (0) +# define CPU_CAPABILITY_SSE4_2 (0) +# define CPU_CAPABILITY_SSE4A (0) # endif # if defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__) @@ -58,17 +62,31 @@ # define CPU_CAPABILITY_NEON (0) # endif -/** Are floating point oeprations fast? +VLC_API unsigned vlc_CPU( 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 + +# elif defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__) +# define HAVE_FPU 1 + +# elif defined (__arm__) +# define HAVE_FPU 0 /* revisit later? */ -VLC_EXPORT( unsigned, vlc_CPU, ( void ) ); +# 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); -VLC_EXPORT( void, vlc_fastmem_register, (vlc_memcpy_t cpy, vlc_memset_t set) ); +VLC_API void vlc_fastmem_register(vlc_memcpy_t cpy); #endif /* !VLC_CPU_H */