Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef VLC_CPU_H
00027 # define VLC_CPU_H 1
00028
00029 # if defined (__i386__) || defined (__x86_64__)
00030 # define CPU_CAPABILITY_MMX (1<<3)
00031 # define CPU_CAPABILITY_3DNOW (1<<4)
00032 # define CPU_CAPABILITY_MMXEXT (1<<5)
00033 # define CPU_CAPABILITY_SSE (1<<6)
00034 # define CPU_CAPABILITY_SSE2 (1<<7)
00035 # define CPU_CAPABILITY_SSE3 (1<<8)
00036 # define CPU_CAPABILITY_SSSE3 (1<<9)
00037 # define CPU_CAPABILITY_SSE4_1 (1<<10)
00038 # define CPU_CAPABILITY_SSE4_2 (1<<11)
00039 # define CPU_CAPABILITY_SSE4A (1<<12)
00040
00041 # if defined (__MMX__)
00042 # define VLC_MMX
00043 # elif VLC_GCC_VERSION(4, 4)
00044 # define VLC_MMX __attribute__ ((__target__ ("mmx")))
00045 # else
00046 # define VLC_MMX VLC_MMX_is_not_implemented_on_this_compiler
00047 # endif
00048
00049 # if defined (__SSE__)
00050 # define VLC_SSE
00051 # elif VLC_GCC_VERSION(4, 4)
00052 # define VLC_SSE __attribute__ ((__target__ ("sse")))
00053 # else
00054 # define VLC_SSE VLC_SSE_is_not_implemented_on_this_compiler
00055 # endif
00056
00057 # else
00058 # define CPU_CAPABILITY_MMX (0)
00059 # define CPU_CAPABILITY_3DNOW (0)
00060 # define CPU_CAPABILITY_MMXEXT (0)
00061 # define CPU_CAPABILITY_SSE (0)
00062 # define CPU_CAPABILITY_SSE2 (0)
00063 # define CPU_CAPABILITY_SSE3 (0)
00064 # define CPU_CAPABILITY_SSSE3 (0)
00065 # define CPU_CAPABILITY_SSE4_1 (0)
00066 # define CPU_CAPABILITY_SSE4_2 (0)
00067 # define CPU_CAPABILITY_SSE4A (0)
00068 # endif
00069
00070 # if defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__)
00071 # define CPU_CAPABILITY_ALTIVEC (1<<16)
00072 # else
00073 # define CPU_CAPABILITY_ALTIVEC (0)
00074 # endif
00075
00076 # if defined (__arm__)
00077 # define CPU_CAPABILITY_NEON (1<<24)
00078 # else
00079 # define CPU_CAPABILITY_NEON (0)
00080 # endif
00081
00082 VLC_API unsigned vlc_CPU( void );
00083
00084
00085
00086
00087 # if defined (__i386__) || defined (__x86_64__)
00088 # define HAVE_FPU 1
00089
00090 # elif defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__)
00091 # define HAVE_FPU 1
00092
00093 # elif defined (__arm__)
00094 # if defined (__VFP_FP__) && !defined (__SOFTFP__)
00095 # define HAVE_FPU 1
00096 # else
00097 # define HAVE_FPU 0
00098 # endif
00099
00100 # elif defined (__sparc__)
00101 # define HAVE_FPU 1
00102
00103 # else
00104 # define HAVE_FPU 0
00105
00106 # endif
00107
00108 typedef void *(*vlc_memcpy_t) (void *tgt, const void *src, size_t n);
00109
00110 VLC_API void vlc_fastmem_register(vlc_memcpy_t cpy);
00111
00112 #endif
00113