]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Optimize FT activation and affine transform for NEON.
[stockfish] / src / Makefile
index a9333a22f46b7ac0928acf7ddfed53cd53257bb6..3cf97873d8a7411eaf26a8c68a1b1fb0b7c0d02c 100644 (file)
@@ -128,6 +128,7 @@ avx512 = no
 vnni256 = no
 vnni512 = no
 neon = no
+arm_version = 0
 STRIP = strip
 
 ### 2.2 Architecture specific
@@ -275,6 +276,7 @@ ifeq ($(ARCH),armv7)
        arch = armv7
        prefetch = yes
        bits = 32
+       arm_version = 7
 endif
 
 ifeq ($(ARCH),armv7-neon)
@@ -283,6 +285,7 @@ ifeq ($(ARCH),armv7-neon)
        popcnt = yes
        neon = yes
        bits = 32
+       arm_version = 7
 endif
 
 ifeq ($(ARCH),armv8)
@@ -290,6 +293,7 @@ ifeq ($(ARCH),armv8)
        prefetch = yes
        popcnt = yes
        neon = yes
+       arm_version = 8
 endif
 
 ifeq ($(ARCH),apple-silicon)
@@ -297,6 +301,7 @@ ifeq ($(ARCH),apple-silicon)
        prefetch = yes
        popcnt = yes
        neon = yes
+       arm_version = 8
 endif
 
 ifeq ($(ARCH),ppc-32)
@@ -614,7 +619,7 @@ ifeq ($(mmx),yes)
 endif
 
 ifeq ($(neon),yes)
-       CXXFLAGS += -DUSE_NEON
+       CXXFLAGS += -DUSE_NEON=$(arm_version)
        ifeq ($(KERNEL),Linux)
        ifneq ($(COMP),ndk)
        ifneq ($(arch),armv8)
@@ -863,6 +868,7 @@ config-sanity: net
        @echo "vnni256: '$(vnni256)'"
        @echo "vnni512: '$(vnni512)'"
        @echo "neon: '$(neon)'"
+       @echo "arm_version: '$(arm_version)'"
        @echo ""
        @echo "Flags:"
        @echo "CXX: $(CXX)"