42 # if defined (__i386__) || defined (__x86_64__) 44 # define VLC_CPU_MMX 0x00000008 45 # define VLC_CPU_3dNOW 0x00000010 46 # define VLC_CPU_MMXEXT 0x00000020 47 # define VLC_CPU_SSE 0x00000040 48 # define VLC_CPU_SSE2 0x00000080 49 # define VLC_CPU_SSE3 0x00000100 50 # define VLC_CPU_SSSE3 0x00000200 51 # define VLC_CPU_SSE4_1 0x00000400 52 # define VLC_CPU_SSE4_2 0x00000800 53 # define VLC_CPU_SSE4A 0x00001000 54 # define VLC_CPU_AVX 0x00002000 55 # define VLC_CPU_AVX2 0x00004000 56 # define VLC_CPU_XOP 0x00008000 57 # define VLC_CPU_FMA4 0x00010000 59 # if defined (__MMX__) 60 # define vlc_CPU_MMX() (1) 63 # define vlc_CPU_MMX() ((vlc_CPU() & VLC_CPU_MMX) != 0) 64 # define VLC_MMX __attribute__ ((__target__ ("mmx"))) 67 # if defined (__SSE__) 68 # define vlc_CPU_MMXEXT() (1) 69 # define vlc_CPU_SSE() (1) 72 # define vlc_CPU_MMXEXT() ((vlc_CPU() & VLC_CPU_MMXEXT) != 0) 73 # define vlc_CPU_SSE() ((vlc_CPU() & VLC_CPU_SSE) != 0) 74 # define VLC_SSE __attribute__ ((__target__ ("sse"))) 78 # define vlc_CPU_SSE2() (1) 80 # define vlc_CPU_SSE2() ((vlc_CPU() & VLC_CPU_SSE2) != 0) 84 # define vlc_CPU_SSE3() (1) 86 # define vlc_CPU_SSE3() ((vlc_CPU() & VLC_CPU_SSE3) != 0) 90 # define vlc_CPU_SSSE3() (1) 92 # define vlc_CPU_SSSE3() ((vlc_CPU() & VLC_CPU_SSSE3) != 0) 96 # define vlc_CPU_SSE4_1() (1) 98 # define vlc_CPU_SSE4_1() ((vlc_CPU() & VLC_CPU_SSE4_1) != 0) 102 # define vlc_CPU_SSE4_2() (1) 104 # define vlc_CPU_SSE4_2() ((vlc_CPU() & VLC_CPU_SSE4_2) != 0) 108 # define vlc_CPU_SSE4A() (1) 110 # define vlc_CPU_SSE4A() ((vlc_CPU() & VLC_CPU_SSE4A) != 0) 114 # define vlc_CPU_AVX() (1) 116 # define vlc_CPU_AVX() ((vlc_CPU() & VLC_CPU_AVX) != 0) 120 # define vlc_CPU_AVX2() (1) 122 # define vlc_CPU_AVX2() ((vlc_CPU() & VLC_CPU_AVX2) != 0) 126 # define vlc_CPU_3dNOW() (1) 128 # define vlc_CPU_3dNOW() ((vlc_CPU() & VLC_CPU_3dNOW) != 0) 132 # define vlc_CPU_XOP() (1) 134 # define vlc_CPU_XOP() ((vlc_CPU() & VLC_CPU_XOP) != 0) 138 # define vlc_CPU_FMA4() (1) 140 # define vlc_CPU_FMA4() ((vlc_CPU() & VLC_CPU_FMA4) != 0) 143 # elif defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__) 145 # define VLC_CPU_ALTIVEC 2 148 # define vlc_CPU_ALTIVEC() (1) 150 # define vlc_CPU_ALTIVEC() ((vlc_CPU() & VLC_CPU_ALTIVEC) != 0) 153 # elif defined (__arm__) 154 # if defined (__VFP_FP__) && !defined (__SOFTFP__) 159 # define VLC_CPU_ARMv6 4 160 # define VLC_CPU_ARM_NEON 2 162 # if defined (__ARM_ARCH_7A__) 163 # define VLC_CPU_ARM_ARCH 7 164 # elif defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6T2__) 165 # define VLC_CPU_ARM_ARCH 6 167 # define VLC_CPU_ARM_ARCH 4 170 # if (VLC_CPU_ARM_ARCH >= 6) 171 # define vlc_CPU_ARMv6() (1) 173 # define vlc_CPU_ARMv6() ((vlc_CPU() & VLC_CPU_ARMv6) != 0) 177 # define vlc_CPU_ARM_NEON() (1) 179 # define vlc_CPU_ARM_NEON() ((vlc_CPU() & VLC_CPU_ARM_NEON) != 0) 182 # elif defined (__aarch64__) 184 # define VLC_CPU_ARM_NEON 0x1 185 # define VLC_CPU_ARM_SVE 0x2 188 # define vlc_CPU_ARM_NEON() (1) 190 # define vlc_CPU_ARM_NEON() ((vlc_CPU() & VLC_CPU_ARM_NEON) != 0) 193 # ifdef __ARM_FEATURE_SVE 194 # define vlc_CPU_ARM_SVE() (1) 196 # define vlc_CPU_ARM_SVE() ((vlc_CPU() & VLC_CPU_ARM_SVE) != 0) 199 # elif defined (__sparc__) 202 # elif defined (__mips_hard_float) unsigned vlc_CPU_raw(void)
Computes CPU capability flags.
Definition: cpu.c:118
unsigned vlc_CPU(void)
Retrieves CPU capability flags.
Definition: cpu.c:252
#define VLC_API
Definition: fourcc_gen.c:31