From: Marco Costalba Date: Thu, 20 May 2010 20:37:37 +0000 (+0100) Subject: Let prefetch to be enabled by default on Windows X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=cab8b788465c34f5fc3d3caeeaee098c1ea185fe Let prefetch to be enabled by default on Windows 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 --- diff --git a/src/Makefile b/src/Makefile index 7459d06d..d2ac4211 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/tt.cpp b/src/tt.cpp index 12e6b636..555f3c6d 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -25,7 +25,7 @@ #include #include #include -#if defined(USE_PREFETCH) +#if !defined(NO_PREFETCH) # include #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