AES builds and works now on ARM64.

This commit is contained in:
Adam Ierymenko 2020-09-16 22:47:13 +00:00
parent afcbc6dd9f
commit 04f6140da6
3 changed files with 13 additions and 2 deletions

View File

@ -208,11 +208,11 @@ ifeq ($(CC_MACH),armv7hl)
endif
ifeq ($(CC_MACH),arm64)
ZT_ARCHITECTURE=4
override DEFS+=-DZT_NO_TYPE_PUNNING
override DEFS+=-DZT_NO_TYPE_PUNNING -DZT_ARCH_ARM_HAS_NEON -march=armv8-a+aes+crypto -mtune=generic -mstrict-align
endif
ifeq ($(CC_MACH),aarch64)
ZT_ARCHITECTURE=4
override DEFS+=-DZT_NO_TYPE_PUNNING
override DEFS+=-DZT_NO_TYPE_PUNNING -DZT_ARCH_ARM_HAS_NEON -march=armv8-a+aes+crypto -mtune=generic -mstrict-align
endif
ifeq ($(CC_MACH),mipsel)
ZT_ARCHITECTURE=5

View File

@ -111,6 +111,14 @@
#include <mmintrin.h>
#endif
#if (defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ZT_ARCH_ARM_HAS_NEON))
#ifndef ZT_ARCH_ARM_HAS_NEON
#define ZT_ARCH_ARM_HAS_NEON 1
#endif
#include <arm_neon.h>
/*#include <arm_acle.h>*/
#endif
// Define ZT_NO_TYPE_PUNNING to disable reckless casts on anything other than x86/x64.
#if (!(defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || defined(i386) || defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(_M_IX86) || defined(__X86__) || defined(_X86_) || defined(__I86__) || defined(__INTEL__) || defined(__386)))
#ifndef ZT_NO_TYPE_PUNNING

View File

@ -28,6 +28,9 @@
#include <sys/stat.h>
#include <sys/uio.h>
#include <dirent.h>
#ifdef __LINUX__
#include <sys/auxv.h>
#endif
#endif
#ifdef __WINDOWS__