mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 22:40:48 +02:00
Add check for ARM to set WOLFSS_USE_ALIGN
This commit is contained in:
@@ -1706,6 +1706,19 @@ WOLFSSL_API word32 CheckRunTimeSettings(void);
|
||||
#endif /* WOLFSSL_AESNI || WOLFSSL_ARMASM || USE_INTEL_SPEEDUP || \
|
||||
* WOLFSSL_AFALG_XILINX */
|
||||
|
||||
/* ARM C-only builds: if the toolchain reports that the target does NOT
|
||||
* support unaligned access, force the alignment-safe code paths. This
|
||||
* catches Cortex-M (ARMv6-M, and ARMv7-M/v8-M built with
|
||||
* -mno-unaligned-access) without penalizing unaligned-capable cores
|
||||
* such as Cortex-A and AArch64. __ARM_FEATURE_UNALIGNED is defined by
|
||||
* GCC, Clang and armclang per the ARM ACLE when unaligned access is
|
||||
* available. */
|
||||
#if defined(__arm__) && !defined(__ARM_FEATURE_UNALIGNED)
|
||||
#ifndef WOLFSSL_USE_ALIGN
|
||||
#define WOLFSSL_USE_ALIGN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Helpers for memory alignment */
|
||||
#ifndef XALIGNED
|
||||
#if defined(__GNUC__) || defined(__llvm__) || \
|
||||
|
||||
Reference in New Issue
Block a user