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 #define av_mod_uintp2 av_mod_uintp2_bmi2
46 return a & ((1 << p) - 1);
49 __asm__ (
"bzhi %2, %1, %0 \n\t" :
"=r"(x) :
"rm"(a),
"r"(p));
#define av_builtin_constant_p