vlc_cpu.h
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<<10)
00038 # else
00039 # define CPU_CAPABILITY_MMX (0)
00040 # define CPU_CAPABILITY_3DNOW (0)
00041 # define CPU_CAPABILITY_MMXEXT (0)
00042 # define CPU_CAPABILITY_SSE (0)
00043 # define CPU_CAPABILITY_SSE2 (0)
00044 # define CPU_CAPABILITY_SSE3 (0)
00045 # define CPU_CAPABILITY_SSSE3 (0)
00046 # define CPU_CAPABILITY_SSE4 (0)
00047 # endif
00048
00049 # if defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__)
00050 # define CPU_CAPABILITY_ALTIVEC (1<<16)
00051 # else
00052 # define CPU_CAPABILITY_ALTIVEC (0)
00053 # endif
00054
00055 # if defined (__arm__)
00056 # define CPU_CAPABILITY_NEON (1<<24)
00057 # else
00058 # define CPU_CAPABILITY_NEON (0)
00059 # endif
00060
00061 VLC_EXPORT( unsigned, vlc_CPU, ( void ) );
00062
00063
00064
00065
00066 # if defined (__i386__) || defined (__x86_64__)
00067 # define HAVE_FPU 1
00068
00069 # elif defined (__powerpc__) || defined (__ppc__) || defined (__pc64__)
00070 # define HAVE_FPU 1
00071
00072 # elif defined (__arm__)
00073 # define HAVE_FPU 0
00074
00075 # elif defined (__sparc__)
00076 # define HAVE_FPU 1
00077
00078 # else
00079 # define HAVE_FPU 0
00080
00081 # endif
00082
00083 typedef void *(*vlc_memcpy_t) (void *tgt, const void *src, size_t n);
00084 typedef void *(*vlc_memset_t) (void *tgt, int c, size_t n);
00085
00086 VLC_EXPORT( void, vlc_fastmem_register, (vlc_memcpy_t cpy, vlc_memset_t set) );
00087
00088 #endif
00089