Small fixes and optimization
[SXSI/libbp.git] / bp-utils.h
index 56f2d73..2397d6f 100644 (file)
@@ -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) {