21 #ifndef AVUTIL_X86_INTMATH_H
22 #define AVUTIL_X86_INTMATH_H
32 #if defined(__POPCNT__)
33 #define av_popcount __builtin_popcount
35 #define av_popcount64 __builtin_popcountll
42 #if AV_GCC_VERSION_AT_LEAST(5,1)
43 #define av_mod_uintp2 __builtin_ia32_bzhi_si
48 #define av_mod_uintp2 av_mod_uintp2_bmi2
52 return a & ((1 << p) - 1);
55 __asm__ (
"bzhi %2, %1, %0 \n\t" :
"=r"(x) :
"rm"(a),
"r"(p));
#define av_builtin_constant_p