Move prefetch() out of TT

This code is platform specific and has nothing to
do with TT class, so move to misc.cpp

This patch is a prerequisite to use extend prefetch use
also to other hash tables apart from Transposition Table.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-06-19 11:10:54 +01:00
parent 221f41c2df
commit 47ee6d9fa4
5 changed files with 40 additions and 43 deletions

View File

@@ -772,7 +772,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
}
// Prefetch TT access as soon as we know key is updated
TT.prefetch(key);
prefetch((char*)TT.first_entry(key));
// Move the piece
Bitboard move_bb = make_move_bb(from, to);
@@ -1250,7 +1250,7 @@ void Position::do_null_move(StateInfo& backupSt) {
st->key ^= zobEp[st->epSquare];
st->key ^= zobSideToMove;
TT.prefetch(st->key);
prefetch((char*)TT.first_entry(st->key));
sideToMove = opposite_color(sideToMove);
st->epSquare = SQ_NONE;