From: Marco Costalba Date: Wed, 24 Sep 2008 21:23:58 +0000 (+0100) Subject: Add auto configuration for 32/64 bits X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=d6618d73258fb3973648d335966ab0f11666e4bb Add auto configuration for 32/64 bits Instead of manually adjust defines in bitboard.h now proper ones are automatically set. It is anyhow possible to still set them manually in case of problems. Signed-off-by: Marco Costalba --- diff --git a/src/bitboard.h b/src/bitboard.h index d9a9bf5d..9fbcbf72 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -25,6 +25,18 @@ //// Defines //// +// Comment following define if you prefer manually adjust +// platform macros defined below +#define AUTO_CONFIGURATION + + +// Check for 64 bits for different compilers: Intel, MSVC and gcc +#if defined(__x86_64) || defined(_WIN64) || (__SIZEOF_INT__ > 4) +#define IS_64BIT +#endif + +#if !defined(AUTO_CONFIGURATION) || defined(IS_64BIT) + //#define USE_COMPACT_ROOK_ATTACKS //#define USE_32BIT_ATTACKS #define USE_FOLDED_BITSCAN @@ -33,7 +45,13 @@ //#define BITCOUNT_SWAR_32 //#define BITCOUNT_LOOP +#else + +#define USE_32BIT_ATTACKS +#define USE_FOLDED_BITSCAN +#define BITCOUNT_SWAR_32 +#endif //// //// Includes