1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-02 01:29:36 +00:00

Fix Makefile for PowerPC with prefetch enabled

Existing Makefile is buggy for PowerPC, it has no
SSE, yet it is given it if Prefetch is enabled,
because it isn't ARMv7.

Patch from Matthew Brades.

No functional change.
This commit is contained in:
Marco Costalba 2012-10-15 01:13:41 +02:00
parent 3aa2d6db18
commit 739d23f2a3

View file

@ -58,6 +58,7 @@ OBJS = benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o main.o \
# bsfq = yes/no --- -DUSE_BSFQ --- Use bsfq x86_64 asm-instruction (only # bsfq = yes/no --- -DUSE_BSFQ --- Use bsfq x86_64 asm-instruction (only
# with GCC and ICC 64-bit) # with GCC and ICC 64-bit)
# popcnt = yes/no --- -DUSE_POPCNT --- Use popcnt x86_64 asm-instruction # popcnt = yes/no --- -DUSE_POPCNT --- Use popcnt x86_64 asm-instruction
# sse = yes/no --- -msse --- Use Intel Streaming SIMD Extensions
# #
# Note that Makefile is space sensitive, so when adding new architectures # Note that Makefile is space sensitive, so when adding new architectures
# or modifying existing flags, you have to make sure there are no extra spaces # or modifying existing flags, you have to make sure there are no extra spaces
@ -77,6 +78,7 @@ ifeq ($(ARCH),general-64)
prefetch = no prefetch = no
bsfq = no bsfq = no
popcnt = no popcnt = no
sse = no
endif endif
ifeq ($(ARCH),general-32) ifeq ($(ARCH),general-32)
@ -86,6 +88,7 @@ ifeq ($(ARCH),general-32)
prefetch = no prefetch = no
bsfq = no bsfq = no
popcnt = no popcnt = no
sse = no
endif endif
# x86-section # x86-section
@ -96,6 +99,7 @@ ifeq ($(ARCH),x86-64)
prefetch = yes prefetch = yes
bsfq = yes bsfq = yes
popcnt = no popcnt = no
sse = yes
endif endif
ifeq ($(ARCH),x86-64-modern) ifeq ($(ARCH),x86-64-modern)
@ -105,6 +109,7 @@ ifeq ($(ARCH),x86-64-modern)
prefetch = yes prefetch = yes
bsfq = yes bsfq = yes
popcnt = yes popcnt = yes
sse = yes
endif endif
ifeq ($(ARCH),x86-32) ifeq ($(ARCH),x86-32)
@ -114,6 +119,7 @@ ifeq ($(ARCH),x86-32)
prefetch = yes prefetch = yes
bsfq = no bsfq = no
popcnt = no popcnt = no
sse = yes
endif endif
ifeq ($(ARCH),x86-32-old) ifeq ($(ARCH),x86-32-old)
@ -123,6 +129,7 @@ ifeq ($(ARCH),x86-32-old)
prefetch = no prefetch = no
bsfq = no bsfq = no
popcnt = no popcnt = no
sse = no
endif endif
#arm section #arm section
@ -133,6 +140,7 @@ ifeq ($(ARCH),armv7)
prefetch = yes prefetch = yes
bsfq = yes bsfq = yes
popcnt = no popcnt = no
sse = no
endif endif
# osx-section # osx-section
@ -143,6 +151,7 @@ ifeq ($(ARCH),osx-ppc-64)
prefetch = no prefetch = no
bsfq = no bsfq = no
popcnt = no popcnt = no
sse = no
endif endif
ifeq ($(ARCH),osx-ppc-32) ifeq ($(ARCH),osx-ppc-32)
@ -152,6 +161,7 @@ ifeq ($(ARCH),osx-ppc-32)
prefetch = no prefetch = no
bsfq = no bsfq = no
popcnt = no popcnt = no
sse = no
endif endif
ifeq ($(ARCH),osx-x86-64) ifeq ($(ARCH),osx-x86-64)
@ -161,6 +171,7 @@ ifeq ($(ARCH),osx-x86-64)
prefetch = yes prefetch = yes
bsfq = yes bsfq = yes
popcnt = no popcnt = no
sse = yes
endif endif
ifeq ($(ARCH),osx-x86-32) ifeq ($(ARCH),osx-x86-32)
@ -170,6 +181,7 @@ ifeq ($(ARCH),osx-x86-32)
prefetch = yes prefetch = yes
bsfq = no bsfq = no
popcnt = no popcnt = no
sse = yes
endif endif
@ -315,7 +327,7 @@ endif
### 3.7 prefetch ### 3.7 prefetch
ifeq ($(prefetch),yes) ifeq ($(prefetch),yes)
ifneq ($(arch),armv7) ifeq ($(sse),yes)
CXXFLAGS += -msse CXXFLAGS += -msse
DEPENDFLAGS += -msse DEPENDFLAGS += -msse
endif endif
@ -455,6 +467,7 @@ config-sanity:
@echo "prefetch: '$(prefetch)'" @echo "prefetch: '$(prefetch)'"
@echo "bsfq: '$(bsfq)'" @echo "bsfq: '$(bsfq)'"
@echo "popcnt: '$(popcnt)'" @echo "popcnt: '$(popcnt)'"
@echo "sse: '$(sse)'"
@echo "" @echo ""
@echo "Flags:" @echo "Flags:"
@echo "CXX: $(CXX)" @echo "CXX: $(CXX)"
@ -472,6 +485,7 @@ config-sanity:
@test "$(prefetch)" = "yes" || test "$(prefetch)" = "no" @test "$(prefetch)" = "yes" || test "$(prefetch)" = "no"
@test "$(bsfq)" = "yes" || test "$(bsfq)" = "no" @test "$(bsfq)" = "yes" || test "$(bsfq)" = "no"
@test "$(popcnt)" = "yes" || test "$(popcnt)" = "no" @test "$(popcnt)" = "yes" || test "$(popcnt)" = "no"
@test "$(sse)" = "yes" || test "$(sse)" = "no"
@test "$(comp)" = "gcc" || test "$(comp)" = "icc" || test "$(comp)" = "mingw" || test "$(comp)" = "clang" @test "$(comp)" = "gcc" || test "$(comp)" = "icc" || test "$(comp)" = "mingw" || test "$(comp)" = "clang"
$(EXE): $(OBJS) $(EXE): $(OBJS)