]> git.sesse.net Git - stockfish/commitdiff
Let prefetch to be enabled by default on Windows
authorMarco Costalba <mcostalba@gmail.com>
Thu, 20 May 2010 20:37:37 +0000 (21:37 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 20 May 2010 20:37:37 +0000 (21:37 +0100)
When compiling with MSVC we don't use the Makefile
so tweak a bit the Makefile to allow to let prefetch
in by default so that it works under Windows.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/Makefile
src/tt.cpp

index 7459d06d3f0346ca80da60d8d04e5c81002c1d33..d2ac42111e9b1db5c3dc624dc32e3c757f888eaa 100644 (file)
@@ -64,6 +64,7 @@ OBJS = application.o bitboard.o pawns.o material.o endgame.o evaluate.o main.o \
 ### 2.1. General
 debug = no
 optimize = yes
+no_prefetch = yes
 
 ### 2.2 Architecture specific
 
@@ -278,7 +279,11 @@ endif
 
 ### 3.8 prefetch
 ifeq ($(prefetch),yes)
-       CXXFLAGS += -msse -DUSE_PREFETCH
+       no_prefetch = no
+endif
+
+ifeq ($(no_prefetch),yes)
+       CXXFLAGS += -msse -DNO_PREFETCH
        DEPENDFLAGS += -msse
 endif
 
index 12e6b636d0b98be117782d5c20bf6486dfba5cab..555f3c6d0e501fc262036eb5c412083ab642fcf2 100644 (file)
@@ -25,7 +25,7 @@
 #include <cassert>
 #include <cmath>
 #include <cstring>
-#if defined(USE_PREFETCH)
+#if !defined(NO_PREFETCH)
 #  include <xmmintrin.h>
 #endif
 
@@ -166,7 +166,7 @@ TTEntry* TranspositionTable::retrieve(const Key posKey) const {
 /// to be loaded from RAM, that can be very slow. When we will
 /// subsequently call retrieve() the TT data will be already
 /// quickly accessible in L1/L2 CPU cache.
-#if !defined(USE_PREFETCH)
+#if defined(NO_PREFETCH)
 void TranspositionTable::prefetch(const Key) const {}
 #else