Skip to content

Commit 78e116b

Browse files
committed
Minor middle-of-release fix
This change to make_move.c has no impact on the specialized compiles released so far. It makes sure that prefetch is used only if HasPreFetch is set. Relevant for making generic profiles.
1 parent a51b64b commit 78e116b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/make_move.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,11 @@ void MakeWhite(typePos *Position, uint32 move)
245245
}
246246
}
247247
Position->Stack[++(Position->StackHeight)] = Position->Dyn->Hash;
248+
#ifdef HasPreFetch
248249
if(Position->Dyn->PawnHash != (Position->Dyn - 1)->PawnHash) // Code by Quoc Vuong
249250
prefetch(PawnHash + (Position->Dyn->PawnHash & ((uint64)(CurrentPHashSize - 1))));
250251
prefetch(HashTable + (Position->Dyn->Hash & HashMask));
252+
#endif
251253
}
252254
void MakeBlack(typePos *Position, uint32 move)
253255
{
@@ -357,9 +359,11 @@ void MakeBlack(typePos *Position, uint32 move)
357359
}
358360
}
359361
Position->Stack[++(Position->StackHeight)] = Position->Dyn->Hash;
362+
#ifdef HasPreFetch
360363
if(Position->Dyn->PawnHash != (Position->Dyn - 1)->PawnHash) // Code by Quoc Vuong
361364
prefetch(PawnHash + (Position->Dyn->PawnHash & ((uint64)(CurrentPHashSize - 1))));
362365
prefetch(HashTable + (Position->Dyn->Hash & HashMask));
366+
#endif
363367
}
364368
void Make(typePos *Position, uint32 move)
365369
{

0 commit comments

Comments
 (0)