mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
Don't use NEON instructions for non-NEON ARM CPUs
Since NDK r21b NEON instructions are used by default. Explicitly disable them for non-NEON CPUs.
This commit is contained in:
parent
150082a57f
commit
1e7aaf682b
|
@ -14,6 +14,10 @@ LOCAL_SRC_FILES := \
|
||||||
compression/zlib/zutil.c compression/liblzf/lzf_c.c compression/liblzf/lzf_d.c \
|
compression/zlib/zutil.c compression/liblzf/lzf_c.c compression/liblzf/lzf_d.c \
|
||||||
GtbProbe.cpp
|
GtbProbe.cpp
|
||||||
|
|
||||||
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
|
LOCAL_ARM_NEON := false
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_CFLAGS := \
|
LOCAL_CFLAGS := \
|
||||||
-I $(LOCAL_PATH)/sysport/ -I $(LOCAL_PATH)/compression/ \
|
-I $(LOCAL_PATH)/sysport/ -I $(LOCAL_PATH)/compression/ \
|
||||||
-I $(LOCAL_PATH)/compression/liblzf/ -I $(LOCAL_PATH)/compression/zlib/ \
|
-I $(LOCAL_PATH)/compression/liblzf/ -I $(LOCAL_PATH)/compression/zlib/ \
|
||||||
|
|
|
@ -12,16 +12,17 @@ CPU_FEATS_SRC_FILES += $(CPU_FEATS)/src/filesystem.c \
|
||||||
$(CPU_FEATS)/src/unix_features_aggregator.c
|
$(CPU_FEATS)/src/unix_features_aggregator.c
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_arm.c
|
UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_arm.c
|
||||||
|
LOCAL_ARM_NEON := false
|
||||||
endif
|
endif
|
||||||
#ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
#ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
||||||
# UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_aarch64.c
|
# UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_aarch64.c
|
||||||
#endif
|
#endif
|
||||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||||
UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_x86.c
|
UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_x86.c
|
||||||
endif
|
endif
|
||||||
#ifeq ($(TARGET_ARCH_ABI),x86_64)
|
#ifeq ($(TARGET_ARCH_ABI),x86_64)
|
||||||
# UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_x86.c
|
# UTIL_SRC_FILES += $(CPU_FEATS_SRC_FILES) $(CPU_FEATS)/src/cpuinfo_x86.c
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOCAL_MODULE := nativeutil
|
LOCAL_MODULE := nativeutil
|
||||||
|
|
|
@ -2,12 +2,15 @@ LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
|
||||||
LOCAL_MODULE := rtb
|
LOCAL_MODULE := rtb
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
bitBoard.cpp material.cpp moveGen.cpp position.cpp rtb-probe.cpp tbprobe.cpp \
|
bitBoard.cpp material.cpp moveGen.cpp position.cpp rtb-probe.cpp tbprobe.cpp \
|
||||||
RtbProbe.cpp
|
RtbProbe.cpp
|
||||||
|
|
||||||
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
|
LOCAL_ARM_NEON := false
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_CFLAGS := --std=c++11 \
|
LOCAL_CFLAGS := --std=c++11 \
|
||||||
-I $(LOCAL_PATH)/sysport/ -I -DNDEBUG -Wall
|
-I $(LOCAL_PATH)/sysport/ -I -DNDEBUG -Wall
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ SF_SRC_FILES := \
|
||||||
MY_ARCH_DEF :=
|
MY_ARCH_DEF :=
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
MY_ARCH_DEF += -DUSE_NEON -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon
|
MY_ARCH_DEF += -DUSE_NEON -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon
|
||||||
|
LOCAL_ARM_NEON := true
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
||||||
MY_ARCH_DEF += -DIS_64BIT -DUSE_POPCNT -DUSE_NEON
|
MY_ARCH_DEF += -DIS_64BIT -DUSE_POPCNT -DUSE_NEON
|
||||||
|
@ -28,6 +29,7 @@ include $(LOCAL_PATH)/build_sf.mk
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
MY_ARCH_DEF := -mthumb -march=armv7-a -mfloat-abi=softfp
|
MY_ARCH_DEF := -mthumb -march=armv7-a -mfloat-abi=softfp
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_ARM_NEON := false
|
||||||
LOCAL_MODULE := stockfish_nosimd
|
LOCAL_MODULE := stockfish_nosimd
|
||||||
include $(LOCAL_PATH)/build_sf.mk
|
include $(LOCAL_PATH)/build_sf.mk
|
||||||
stockfish : stockfish_nosimd
|
stockfish : stockfish_nosimd
|
||||||
|
|
Loading…
Reference in New Issue
Block a user