From: Marco Costalba Date: Sat, 6 Oct 2012 10:53:41 +0000 (+0200) Subject: Fix POPCNT support on mingw 64 X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=954fc950d97c0d484b29ba50b703273bfb33f859 Fix POPCNT support on mingw 64 When using asm 'popcnt' instruction the given operand registers must be of the same type. No functional change. --- diff --git a/src/bitcount.h b/src/bitcount.h index a69ad8e8..8843aba7 100644 --- a/src/bitcount.h +++ b/src/bitcount.h @@ -96,9 +96,8 @@ inline int popcount(Bitboard b) { #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 }