]> git.sesse.net Git - stockfish/commitdiff
Merge hardware POPCNT detection and use
authorMarco Costalba <mcostalba@gmail.com>
Mon, 25 May 2009 06:52:59 +0000 (07:52 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 25 May 2009 06:56:26 +0000 (07:56 +0100)
Tests on Joona luxury iCore7 QUAD show that speed increase
against standrd 64bit routine is between 3% and 4%.

So it seems a good thing to have. Also the user feedback at
startup regarding the compile and the hardware detection can
be an useful debug tool.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
1  2 
src/movegen.cpp

diff --combined src/movegen.cpp
index 3845cd978cab815b5d9e83eb27de9ba536d58437,1135c21976f416a9bf0116f0936972dc9bde2afe..995f54f06c97b1f352b4cbb2ecfa8f2831070b9d
@@@ -24,6 -24,7 +24,7 @@@
  
  #include <cassert>
  
+ #include "bitcount.h"
  #include "movegen.h"
  
  // Simple macro to wrap a very common while loop, no facny, no flexibility,
@@@ -392,6 -393,7 +393,6 @@@ bool move_is_legal(const Position& pos
    assert(pinned == pos.pinned_pieces(pos.side_to_move()));
  
    Color us = pos.side_to_move();
 -  Color them = opposite_color(us);
    Square from = move_from(m);
    Piece pc = pos.piece_on(from);
  
    if (color_of_piece(pc) != us)
        return false;
  
 +  Color them = opposite_color(us);
    Square to = move_to(m);
  
    // En passant moves