Rewrite bsfq management

Use compiler intrinsics when possible to
avoid writing platform specific asm code.

Tested on Windows 7 with MSVC 2013 and mingw 4.8.3 (32 and 64 bit)
and on Linux Mint with g++ 4.8.4 and clang 3.4 (32 and 64 bit).

No functional change

Resolves #609
This commit is contained in:
Marco Costalba
2016-03-28 10:08:06 +02:00
committed by Joona Kiiski
parent 24dac5ccd3
commit db4b0d8b7d
4 changed files with 11 additions and 52 deletions

View File

@@ -76,7 +76,7 @@ namespace {
}
}
#ifndef USE_BSFQ
#ifdef NO_BSF
/// Software fall-back of lsb() and msb() for CPU lacking hardware support
@@ -112,7 +112,7 @@ Square msb(Bitboard b) {
return Square(result + MSBTable[b32]);
}
#endif // ifndef USE_BSFQ
#endif // ifdef NO_BSF
/// Bitboards::pretty() returns an ASCII representation of a bitboard suitable