Skip to content

Commit e4ceb9b

Browse files
committed
Prefetch Linux compatibility fix by ZirconiumX
_builtin_prefetch is the Linux equivalent of _mm_prefetch. Now Firenzina 2.3.1 xTreme compiles under Windows and Linux.
1 parent b9c94c7 commit e4ceb9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fire.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ uint64 NodeCheck;
234234
#define CheckHalt() { if (Position->stop) { return(0); } }
235235
#define Height(x)((x)->height)
236236
#define Is_Exact(x) (x)
237+
#if defined(__GNUC__)
238+
#define prefetch(x) __builtin_prefetch((char*)(x))
239+
#elif defined(__INTEL_COMPILER) || defined(_MSC_VER)
237240
#define prefetch(x) _mm_prefetch((char*)(x), _MM_HINT_T2) // Added 4/15/2013
241+
#endif
238242
#include "move.h"
239243
bool BoardIsOk, isNewGame;
240244

0 commit comments

Comments
 (0)