mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Avoid casting to char* in prefetch()
Funny enough, gcc __builtin_prefetch() expects already a void*, instead Windows's _mm_prefetch() requires a char*. The patch allows to remove ugly casts from caller sites. No functional change.
This commit is contained in:
@@ -872,7 +872,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
}
|
||||
|
||||
// Speculative prefetch as early as possible
|
||||
prefetch((char*)TT.first_entry(pos.key_after(move)));
|
||||
prefetch(TT.first_entry(pos.key_after(move)));
|
||||
|
||||
// Check for legality just before making the move
|
||||
if (!RootNode && !SpNode && !pos.legal(move, ci.pinned))
|
||||
@@ -1238,7 +1238,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
continue;
|
||||
|
||||
// Speculative prefetch as early as possible
|
||||
prefetch((char*)TT.first_entry(pos.key_after(move)));
|
||||
prefetch(TT.first_entry(pos.key_after(move)));
|
||||
|
||||
// Check for legality just before making the move
|
||||
if (!pos.legal(move, ci.pinned))
|
||||
|
||||
Reference in New Issue
Block a user