31 # if defined (__i386__) || defined (__x86_64__) 33 # define VLC_CPU_MMX 0x00000008 34 # define VLC_CPU_3dNOW 0x00000010 35 # define VLC_CPU_MMXEXT 0x00000020 36 # define VLC_CPU_SSE 0x00000040 37 # define VLC_CPU_SSE2 0x00000080 38 # define VLC_CPU_SSE3 0x00000100 39 # define VLC_CPU_SSSE3 0x00000200 40 # define VLC_CPU_SSE4_1 0x00000400 41 # define VLC_CPU_SSE4_2 0x00000800 42 # define VLC_CPU_SSE4A 0x00001000 43 # define VLC_CPU_AVX 0x00002000 44 # define VLC_CPU_AVX2 0x00004000 45 # define VLC_CPU_XOP 0x00008000 46 # define VLC_CPU_FMA4 0x00010000 48 # if defined (__MMX__) 49 # define vlc_CPU_MMX() (1) 52 # define vlc_CPU_MMX() ((vlc_CPU() & VLC_CPU_MMX) != 0) 53 # define VLC_MMX __attribute__ ((__target__ ("mmx"))) 56 # if defined (__SSE__) 57 # define vlc_CPU_MMXEXT() (1) 58 # define vlc_CPU_SSE() (1) 61 # define vlc_CPU_MMXEXT() ((vlc_CPU() & VLC_CPU_MMXEXT) != 0) 62 # define vlc_CPU_SSE() ((vlc_CPU() & VLC_CPU_SSE) != 0) 63 # define VLC_SSE __attribute__ ((__target__ ("sse"))) 67 # define vlc_CPU_SSE2() (1) 69 # define vlc_CPU_SSE2() ((vlc_CPU() & VLC_CPU_SSE2) != 0) 73 # define vlc_CPU_SSE3() (1) 75 # define vlc_CPU_SSE3() ((vlc_CPU() & VLC_CPU_SSE3) != 0) 79 # define vlc_CPU_SSSE3() (1) 81 # define vlc_CPU_SSSE3() ((vlc_CPU() & VLC_CPU_SSSE3) != 0) 85 # define vlc_CPU_SSE4_1() (1) 87 # define vlc_CPU_SSE4_1() ((vlc_CPU() & VLC_CPU_SSE4_1) != 0) 91 # define vlc_CPU_SSE4_2() (1) 93 # define vlc_CPU_SSE4_2() ((vlc_CPU() & VLC_CPU_SSE4_2) != 0) 97 # define vlc_CPU_SSE4A() (1) 99 # define vlc_CPU_SSE4A() ((vlc_CPU() & VLC_CPU_SSE4A) != 0) 103 # define vlc_CPU_AVX() (1) 105 # define vlc_CPU_AVX() ((vlc_CPU() & VLC_CPU_AVX) != 0) 109 # define vlc_CPU_AVX2() (1) 111 # define vlc_CPU_AVX2() ((vlc_CPU() & VLC_CPU_AVX2) != 0) 115 # define vlc_CPU_3dNOW() (1) 117 # define vlc_CPU_3dNOW() ((vlc_CPU() & VLC_CPU_3dNOW) != 0) 121 # define vlc_CPU_XOP() (1) 123 # define vlc_CPU_XOP() ((vlc_CPU() & VLC_CPU_XOP) != 0) 127 # define vlc_CPU_FMA4() (1) 129 # define vlc_CPU_FMA4() ((vlc_CPU() & VLC_CPU_FMA4) != 0) 132 # elif defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__) 134 # define VLC_CPU_ALTIVEC 2 137 # define vlc_CPU_ALTIVEC() (1) 139 # define vlc_CPU_ALTIVEC() ((vlc_CPU() & VLC_CPU_ALTIVEC) != 0) 142 # elif defined (__arm__) 143 # if defined (__VFP_FP__) && !defined (__SOFTFP__) 148 # define VLC_CPU_ARMv6 4 149 # define VLC_CPU_ARM_NEON 2 151 # if defined (__ARM_ARCH_7A__) 152 # define VLC_CPU_ARM_ARCH 7 153 # elif defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6T2__) 154 # define VLC_CPU_ARM_ARCH 6 156 # define VLC_CPU_ARM_ARCH 4 159 # if (VLC_CPU_ARM_ARCH >= 6) 160 # define vlc_CPU_ARMv6() (1) 162 # define vlc_CPU_ARMv6() ((vlc_CPU() & VLC_CPU_ARMv6) != 0) 166 # define vlc_CPU_ARM_NEON() (1) 168 # define vlc_CPU_ARM_NEON() ((vlc_CPU() & VLC_CPU_ARM_NEON) != 0) 171 # elif defined (__aarch64__) 173 # define VLC_CPU_ARM_NEON 0x1 174 # define VLC_CPU_ARM_SVE 0x2 177 # define vlc_CPU_ARM_NEON() (1) 179 # define vlc_CPU_ARM_NEON() ((vlc_CPU() & VLC_CPU_ARM_NEON) != 0) 182 # ifdef __ARM_FEATURE_SVE 183 # define vlc_CPU_ARM_SVE() (1) 185 # define vlc_CPU_ARM_SVE() ((vlc_CPU() & VLC_CPU_ARM_SVE) != 0) 188 # elif defined (__sparc__) 191 # elif defined (__mips_hard_float) unsigned vlc_CPU(void)
Retrieves pre-computed CPU capability flags.
Definition: cpu.c:134
#define VLC_API
Definition: fourcc_gen.c:31