Permalink
Browse files

Fix POPCNT support on mingw 64

When using asm 'popcnt' instruction the given
operand registers must be of the same type.

No functional change.
  • Loading branch information...
1 parent d777c4d commit 954fc950d97c0d484b29ba50b703273bfb33f859 @mcostalba committed Oct 6, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/bitcount.h
View
@@ -96,9 +96,8 @@ inline int popcount<CNT_HW_POPCNT>(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
}

0 comments on commit 954fc95

Please sign in to comment.