1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-12 03:59:15 +00:00

Added support for architectures which supports SSE3+POPCNT, SSSE3+POPCNT and SSE41+POPCNT.

This commit is contained in:
nodchip 2020-07-19 12:41:50 +09:00
parent c24ad8d8b5
commit a4786db4c2

View file

@ -145,6 +145,15 @@ ifeq ($(ARCH),x86-64-sse3)
ssse3 = yes ssse3 = yes
endif endif
ifeq ($(ARCH),x86-64-sse3-popcnt)
arch = x86_64
prefetch = yes
popcnt = yes
sse = yes
sse3 = yes
ssse3 = yes
endif
ifeq ($(ARCH),x86-64-ssse3) ifeq ($(ARCH),x86-64-ssse3)
arch = x86_64 arch = x86_64
prefetch = yes prefetch = yes
@ -153,6 +162,15 @@ ifeq ($(ARCH),x86-64-ssse3)
ssse3 = yes ssse3 = yes
endif endif
ifeq ($(ARCH),x86-64-ssse3-popcnt)
arch = x86_64
prefetch = yes
popcnt = yes
sse = yes
sse3 = yes
ssse3 = yes
endif
ifeq ($(ARCH),x86-64-sse41) ifeq ($(ARCH),x86-64-sse41)
arch = x86_64 arch = x86_64
prefetch = yes prefetch = yes
@ -162,6 +180,16 @@ ifeq ($(ARCH),x86-64-sse41)
sse41 = yes sse41 = yes
endif endif
ifeq ($(ARCH),x86-64-sse41-popcnt)
arch = x86_64
prefetch = yes
popcnt = yes
sse = yes
sse3 = yes
ssse3 = yes
sse41 = yes
endif
ifeq ($(ARCH),x86-64-sse42) ifeq ($(ARCH),x86-64-sse42)
arch = x86_64 arch = x86_64
prefetch = yes prefetch = yes
@ -433,19 +461,22 @@ endif
### 3.6 popcnt ### 3.6 popcnt
ifeq ($(popcnt),yes) ifeq ($(popcnt),yes)
CXXFLAGS += -DUSE_POPCNT CXXFLAGS += -DUSE_POPCNT
ifeq ($(comp),$(filter $(comp),gcc clang mingw msys2))
CXXFLAGS += -mpopcnt
endif
endif endif
ifeq ($(avx2),yes) ifeq ($(avx2),yes)
CXXFLAGS += -DUSE_AVX2 CXXFLAGS += -DUSE_AVX2
ifeq ($(comp),$(filter $(comp),gcc clang mingw msys2)) ifeq ($(comp),$(filter $(comp),gcc clang mingw msys2))
CXXFLAGS += -mavx2 CXXFLAGS += -mavx2
endif endif
endif endif
ifeq ($(avx512),yes) ifeq ($(avx512),yes)
CXXFLAGS += -DUSE_AVX512 CXXFLAGS += -DUSE_AVX512
ifeq ($(comp),$(filter $(comp),gcc clang mingw msys2)) ifeq ($(comp),$(filter $(comp),gcc clang mingw msys2))
CXXFLAGS += -mavx512vbmi CXXFLAGS += -mavx512vbmi
endif endif
endif endif