]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Remove intermediate re-search in LMR
[stockfish] / src / types.h
index 5c9b9366500fca756c797636ad067c6c4ab0eb08..a0a61600766d4e9873d7a55858d0652c5b787593 100644 (file)
@@ -33,6 +33,9 @@
 ///
 /// -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 <cassert>
 #include <cctype>
 
 #if defined(USE_PEXT)
 #  include <immintrin.h> // Header for _pext_u64() intrinsic
+#  define pext(b, m) _pext_u64(b, m)
 #else
-#  define _pext_u64(b, m) (0)
-#endif
-
-#ifdef _MSC_VER
-#  define FORCE_INLINE  __forceinline
-#elif defined(__GNUC__)
-#  define FORCE_INLINE  inline __attribute__((always_inline))
-#else
-#  define FORCE_INLINE  inline
+#  define pext(b, m) (0)
 #endif
 
 #ifdef USE_POPCNT
@@ -190,7 +186,7 @@ enum Value : int {
   PawnValueMg   = 198,   PawnValueEg   = 258,
   KnightValueMg = 817,   KnightValueEg = 846,
   BishopValueMg = 836,   BishopValueEg = 857,
-  RookValueMg   = 1270,  RookValueEg   = 1278,
+  RookValueMg   = 1270,  RookValueEg   = 1281,
   QueenValueMg  = 2521,  QueenValueEg  = 2558,
 
   MidgameLimit  = 15581, EndgameLimit  = 3998
@@ -413,7 +409,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) {