X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftypes.h;h=c8078546775d20ae49079317cc520b3e9545dc4f;hb=6645115377bd9699ae6785608753d33067b8e036;hp=5c9b9366500fca756c797636ad067c6c4ab0eb08;hpb=f53aea45e3230239d358d4d35357c9ee6bf6fb54;p=stockfish diff --git a/src/types.h b/src/types.h index 5c9b9366..c8078546 100644 --- a/src/types.h +++ b/src/types.h @@ -31,8 +31,14 @@ /// -DNO_PREFETCH | Disable use of prefetch asm-instruction. You may need this to /// | run on some very old machines. /// +/// -DNO_SPINLOCK | Use mutex instead of spinlocks. This is much slower, so you +/// | really don't want to do this in general case. +/// /// -DUSE_POPCNT | Add runtime support for use of popcnt asm-instruction. Works /// | only in 64-bit mode and requires hardware with popcnt support. +/// +/// -DUSE_PEXT | Add runtime support for use of pext asm-instruction. Works +/// | only in 64-bit mode and requires hardware with pext support. #include #include @@ -71,8 +77,9 @@ #if defined(USE_PEXT) # include // Header for _pext_u64() intrinsic +# define pext(b, m) _pext_u64(b, m) #else -# define _pext_u64(b, m) (0) +# define pext(b, m) (0) #endif #ifdef _MSC_VER @@ -413,7 +420,7 @@ inline MoveType type_of(Move m) { } inline PieceType promotion_type(Move m) { - return PieceType(((m >> 12) & 3) + 2); + return PieceType(((m >> 12) & 3) + KNIGHT); } inline Move make_move(Square from, Square to) {