Manually align arrays on the stack

as a workaround to issues with overaligned alignas() on stack variables in gcc < 9.3 on windows.

closes https://github.com/official-stockfish/Stockfish/pull/3217

fixes #3216

No functional change
This commit is contained in:
Tomasz Sobczyk
2020-11-03 11:23:35 +01:00
committed by Joost VandeVondele
parent a260c9a8a2
commit 3f6451eff7
8 changed files with 64 additions and 38 deletions
+8
View File
@@ -164,6 +164,8 @@ namespace {
uint64_t perft(Position& pos, Depth depth) {
StateInfo st;
ASSERT_ALIGNED(&st, Eval::NNUE::kCacheLineSize);
uint64_t cnt, nodes = 0;
const bool leaf = (depth == 2);
@@ -590,6 +592,8 @@ namespace {
Move pv[MAX_PLY+1], capturesSearched[32], quietsSearched[64];
StateInfo st;
ASSERT_ALIGNED(&st, Eval::NNUE::kCacheLineSize);
TTEntry* tte;
Key posKey;
Move ttMove, move, excludedMove, bestMove;
@@ -1403,6 +1407,8 @@ moves_loop: // When in check, search starts from here
Move pv[MAX_PLY+1];
StateInfo st;
ASSERT_ALIGNED(&st, Eval::NNUE::kCacheLineSize);
TTEntry* tte;
Key posKey;
Move ttMove, move, bestMove;
@@ -1898,6 +1904,8 @@ string UCI::pv(const Position& pos, Depth depth, Value alpha, Value beta) {
bool RootMove::extract_ponder_from_tt(Position& pos) {
StateInfo st;
ASSERT_ALIGNED(&st, Eval::NNUE::kCacheLineSize);
bool ttHit;
assert(pv.size() == 1);