From 954fc950d97c0d484b29ba50b703273bfb33f859 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 6 Oct 2012 12:53:41 +0200 Subject: [PATCH] Fix POPCNT support on mingw 64 When using asm 'popcnt' instruction the given operand registers must be of the same type. No functional change. --- src/bitcount.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 } -- 2.39.2