mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Use optimized pop_1st_bit() under Windows 64 with icc
Intel compiler can handle this code even under Windows. So lift the costrain. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
bfd4421f49
commit
f3d0b76feb
2 changed files with 3 additions and 3 deletions
|
@ -323,13 +323,13 @@ inline Bitboard isolated_pawn_mask(Square s) {
|
|||
|
||||
#if defined(USE_BSFQ) // Assembly code by Heinz van Saanen
|
||||
|
||||
inline Square __attribute__((always_inline)) first_1(Bitboard b) {
|
||||
inline Square first_1(Bitboard b) {
|
||||
Bitboard dummy;
|
||||
__asm__("bsfq %1, %0": "=r"(dummy): "rm"(b) );
|
||||
return (Square)(dummy);
|
||||
}
|
||||
|
||||
inline Square __attribute__((always_inline)) pop_1st_bit(Bitboard* b) {
|
||||
inline Square pop_1st_bit(Bitboard* b) {
|
||||
const Square s = first_1(*b);
|
||||
*b &= ~(1ULL<<s);
|
||||
return s;
|
||||
|
|
|
@ -62,7 +62,7 @@ typedef uint64_t Bitboard;
|
|||
#define IS_64BIT
|
||||
#endif
|
||||
|
||||
#if defined(IS_64BIT) && !defined(_WIN64) && (defined(__GNUC__) || defined(__INTEL_COMPILER))
|
||||
#if defined(IS_64BIT) && (defined(__GNUC__) || defined(__INTEL_COMPILER))
|
||||
#define USE_BSFQ
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue