X-Git-Url: http://git.nguyen.vg/gitweb/?p=SXSI%2Flibbp.git;a=blobdiff_plain;f=bp-utils.h;fp=bp-utils.h;h=2397d6f662f0def0ef58a9422b18dda49684419f;hp=56f2d736fca9232160e27039ffbf59d755a66069;hb=332345c5dda9f16e549803f6155c81c9e4fb904b;hpb=c6a99c1234da55afed4675d2db035176f229abd4 diff --git a/bp-utils.h b/bp-utils.h index 56f2d73..2397d6f 100644 --- a/bp-utils.h +++ b/bp-utils.h @@ -28,8 +28,7 @@ extern "C" { #ifdef HAS_NATIVE_POPCOUNT static inline UNUSED unsigned int popcount(unsigned int n){ - asm ("popcnt %1, %0" : "=r" (n) : "0" (n)); - return n; + return __builtin_popcount(n); } static inline UNUSED unsigned int popcount8(unsigned int n) {