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:
Peter Osterlund 2020-09-20 15:25:57 +02:00
parent 150082a57f
commit 1e7aaf682b
4 changed files with 15 additions and 5 deletions

View File

@ -14,6 +14,10 @@ LOCAL_SRC_FILES := \
compression/zlib/zutil.c compression/liblzf/lzf_c.c compression/liblzf/lzf_d.c \
GtbProbe.cpp
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_ARM_NEON := false
endif
LOCAL_CFLAGS := \
-I $(LOCAL_PATH)/sysport/ -I $(LOCAL_PATH)/compression/ \
-I $(LOCAL_PATH)/compression/liblzf/ -I $(LOCAL_PATH)/compression/zlib/ \

View File

@ -12,16 +12,17 @@ CPU_FEATS_SRC_FILES += $(CPU_FEATS)/src/filesystem.c \
$(CPU_FEATS)/src/unix_features_aggregator.c
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
#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
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
#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
LOCAL_MODULE := nativeutil

View File

@ -2,12 +2,15 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := rtb
LOCAL_SRC_FILES := \
bitBoard.cpp material.cpp moveGen.cpp position.cpp rtb-probe.cpp tbprobe.cpp \
RtbProbe.cpp
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_ARM_NEON := false
endif
LOCAL_CFLAGS := --std=c++11 \
-I $(LOCAL_PATH)/sysport/ -I -DNDEBUG -Wall

View File

@ -10,6 +10,7 @@ SF_SRC_FILES := \
MY_ARCH_DEF :=
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
MY_ARCH_DEF += -DUSE_NEON -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon
LOCAL_ARM_NEON := true
endif
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
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)
MY_ARCH_DEF := -mthumb -march=armv7-a -mfloat-abi=softfp
include $(CLEAR_VARS)
LOCAL_ARM_NEON := false
LOCAL_MODULE := stockfish_nosimd
include $(LOCAL_PATH)/build_sf.mk
stockfish : stockfish_nosimd