]> git.sesse.net Git - stockfish/blobdiff - src/bitcount.h
Use compiler intrinsic instead of assembly for popcnt
[stockfish] / src / bitcount.h
index f84c51cb8596caf76e658d126330c898dafde7f8..9feed19f9755a94be0022f3e9cf5c891972589d0 100644 (file)
@@ -96,8 +96,7 @@ inline int popcount<CNT_HW_POPCNT>(Bitboard b) {
 
 #else
 
 
 #else
 
-  __asm__("popcnt %1, %0" : "=r" (b) : "r" (b));
-  return b;
+  return __builtin_popcountll(b);
 
 #endif
 }
 
 #endif
 }