X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.cpp;h=0bdb9d3ae627bf1793d5cf450fb814f50360b5bd;hp=ba03d66ef85669cfe4d9f3c8ddf3fa19e272d99c;hb=a87ea9846d4adc8d2ed8107c072c43b5ef53e4fe;hpb=063e2441b17b8260de443b3d580f49b3d65d03c7 diff --git a/src/bitboard.cpp b/src/bitboard.cpp index ba03d66e..0bdb9d3a 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -161,7 +161,7 @@ const int RShift[64] = { 21, 22, 22, 22, 22, 22, 22, 21, 20, 21, 21, 21, 21, 21, 21, 20 }; -#endif +#endif // defined(IS_64BIT) Bitboard RMask[64]; @@ -245,16 +245,16 @@ void init_bitboards() { /// pop_1st_bit() finds and clears the least significant nonzero bit in a /// nonzero bitboard. -#if defined(IS_64BIT) +#if defined(IS_64BIT) && !defined(USE_BSFQ) -Square pop_1st_bit(Bitboard *b) { +Square pop_1st_bit(Bitboard* b) { Bitboard bb = *b ^ (*b - 1); uint32_t fold = int(bb) ^ int(bb >> 32); *b &= (*b - 1); return Square(BitTable[(fold * 0x783a9b23) >> 26]); } -#else +#elif !defined(USE_BSFQ) // Use type-punning union b_union { @@ -267,7 +267,7 @@ union b_union { }; // WARNING: Needs -fno-strict-aliasing compiler option -Square pop_1st_bit(Bitboard *bb) { +Square pop_1st_bit(Bitboard* bb) { b_union u; uint32_t b;