]> git.sesse.net Git - stockfish/commitdiff
Fix POPCNT support on mingw 64
authorMarco Costalba <mcostalba@gmail.com>
Sat, 6 Oct 2012 10:53:41 +0000 (12:53 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 6 Oct 2012 11:01:44 +0000 (13:01 +0200)
When using asm 'popcnt' instruction the given
operand registers must be of the same type.

No functional change.

src/bitcount.h

index a69ad8e8418535fbe01645368800815d19491b9f..8843aba742a58f27e78ea7cc0d1e20043059306d 100644 (file)
@@ -96,9 +96,8 @@ inline int popcount<CNT_HW_POPCNT>(Bitboard b) {
 
 #else
 
 
 #else
 
-  unsigned long ret;
-  __asm__("popcnt %1, %0" : "=r" (ret) : "r" (b));
-  return ret;
+  __asm__("popcnt %1, %0" : "=r" (b) : "r" (b));
+  return b;
 
 #endif
 }
 
 #endif
 }