1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

Fix a warning with __popcnt64() intrinsics

Returns an int64_t while we want a simple int.

This occurs only when compiling with MSVC on a 64 bit platform.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2011-01-15 12:05:31 +01:00
parent 877b468e3e
commit 04001f776e

View file

@ -88,7 +88,7 @@ inline int count_1s<CNT_POPCNT>(Bitboard b) {
#elif defined(_MSC_VER) && defined(__INTEL_COMPILER) #elif defined(_MSC_VER) && defined(__INTEL_COMPILER)
return _mm_popcnt_u64(b); return _mm_popcnt_u64(b);
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
return __popcnt64(b); return (int)__popcnt64(b);
#elif defined(__GNUC__) #elif defined(__GNUC__)
unsigned long ret; unsigned long ret;
__asm__("popcnt %1, %0" : "=r" (ret) : "r" (b)); __asm__("popcnt %1, %0" : "=r" (ret) : "r" (b));