mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 04:50:12 -07:00
Check for aarch64 as well
This commit is contained in:
parent
3e0946c564
commit
d7a652e397
2 changed files with 15 additions and 6 deletions
|
@ -5,13 +5,22 @@ MYDEFS =
|
||||||
MYSRCS = hardnested_bruteforce.c
|
MYSRCS = hardnested_bruteforce.c
|
||||||
|
|
||||||
cpu_arch = $(shell uname -m)
|
cpu_arch = $(shell uname -m)
|
||||||
|
|
||||||
|
IS_SIMD_ARCH =
|
||||||
ifneq ($(findstring 86, $(cpu_arch)), )
|
ifneq ($(findstring 86, $(cpu_arch)), )
|
||||||
MULTIARCHSRCS = hardnested_bf_core.c hardnested_bitarray_core.c
|
IS_SIMD_ARCH=x86
|
||||||
endif
|
endif
|
||||||
ifneq ($(findstring amd64, $(cpu_arch)), )
|
ifneq ($(findstring amd64, $(cpu_arch)), )
|
||||||
MULTIARCHSRCS = hardnested_bf_core.c hardnested_bitarray_core.c
|
IS_SIMD_ARCH=x86
|
||||||
endif
|
endif
|
||||||
ifneq ($(findstring arm64, $(cpu_arch)), )
|
ifneq ($(findstring arm64, $(cpu_arch)), )
|
||||||
|
IS_SIMD_ARCH=arm64
|
||||||
|
endif
|
||||||
|
ifneq ($(findstring aarch64, $(cpu_arch)), )
|
||||||
|
IS_SIMD_ARCH=arm64
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(IS_SIMD_ARCH), )
|
||||||
MULTIARCHSRCS = hardnested_bf_core.c hardnested_bitarray_core.c
|
MULTIARCHSRCS = hardnested_bf_core.c hardnested_bitarray_core.c
|
||||||
endif
|
endif
|
||||||
ifeq ($(MULTIARCHSRCS), )
|
ifeq ($(MULTIARCHSRCS), )
|
||||||
|
@ -21,7 +30,7 @@ endif
|
||||||
LIB_A = libhardnested.a
|
LIB_A = libhardnested.a
|
||||||
|
|
||||||
MYOBJS = $(MYSRCS:%.c=$(OBJDIR)/%.o)
|
MYOBJS = $(MYSRCS:%.c=$(OBJDIR)/%.o)
|
||||||
ifneq ($(findstring arm64, $(cpu_arch)), )
|
ifeq ($(IS_SIMD_ARCH), arm64)
|
||||||
MYOBJS += $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \
|
MYOBJS += $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \
|
||||||
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NEON.o)
|
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NEON.o)
|
||||||
else
|
else
|
||||||
|
@ -41,8 +50,8 @@ HARD_SWITCH_SSE2 = -mmmx -msse2 -mno-avx -mno-avx2
|
||||||
HARD_SWITCH_AVX = -mmmx -msse2 -mavx -mno-avx2
|
HARD_SWITCH_AVX = -mmmx -msse2 -mavx -mno-avx2
|
||||||
HARD_SWITCH_AVX2 = -mmmx -msse2 -mavx -mavx2
|
HARD_SWITCH_AVX2 = -mmmx -msse2 -mavx -mavx2
|
||||||
HARD_SWITCH_AVX512 = -mmmx -msse2 -mavx -mavx2 -mavx512f
|
HARD_SWITCH_AVX512 = -mmmx -msse2 -mavx -mavx2 -mavx512f
|
||||||
ifneq ($(findstring arm64, $(cpu_arch)), )
|
ifeq ($(IS_SIMD_ARCH), arm64)
|
||||||
SUPPORTS_AVX512=0
|
SUPPORTS_AVX512=False
|
||||||
HARD_SWITCH_NOSIMD = -DNOSIMD_BUILD
|
HARD_SWITCH_NOSIMD = -DNOSIMD_BUILD
|
||||||
endif
|
endif
|
||||||
ifeq "$(SUPPORTS_AVX512)" "True"
|
ifeq "$(SUPPORTS_AVX512)" "True"
|
||||||
|
|
|
@ -62,7 +62,7 @@ THE SOFTWARE.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ARM64 mandates implementation of NEON
|
// ARM64 mandates implementation of NEON
|
||||||
#if defined(__arm64__)
|
#if defined(__arm64__) || defined(__aarch64__)
|
||||||
#define COMPILER_HAS_SIMD_NEON
|
#define COMPILER_HAS_SIMD_NEON
|
||||||
#define arm_has_neon() (true)
|
#define arm_has_neon() (true)
|
||||||
// ARMv7 or older, NEON is optional and autodetection is difficult
|
// ARMv7 or older, NEON is optional and autodetection is difficult
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue