/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
- Copyright (C) 2008-2009 Marco Costalba
+ Copyright (C) 2008-2010 Marco Costalba, Joona Kiiski, Tord Romstad
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
extern Bitboard RookPseudoAttacks[64];
extern Bitboard QueenPseudoAttacks[64];
+extern uint8_t BitCount8Bit[256];
+
////
//// Inline functions
#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;
extern void print_bitboard(Bitboard b);
extern void init_bitboards();
+extern int bitScanReverse32(uint32_t b);
#endif // !defined(BITBOARD_H_INCLUDED)