mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Rename MBEDTLS_ARCH_IS_ARMV8 to MBEDTLS_ARCH_IS_ARMV8_A
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@@ -74,14 +74,19 @@
|
|||||||
#define MBEDTLS_ARCH_IS_X86
|
#define MBEDTLS_ARCH_IS_X86
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This is defined if the architecture is Armv8, or higher */
|
/* This is defined if the architecture is Armv8-A, or higher */
|
||||||
#if !defined(MBEDTLS_ARCH_IS_ARMV8)
|
#if !defined(MBEDTLS_ARCH_IS_ARMV8_A)
|
||||||
#if defined(__ARM_ARCH)
|
#if defined(__ARM_ARCH) && defined(__ARM_ARCH_PROFILE)
|
||||||
#if __ARM_ARCH >= 8
|
#if (__ARM_ARCH >= 8) && (__ARM_ARCH_PROFILE == 'A')
|
||||||
#define MBEDTLS_ARCH_IS_ARMV8
|
/* GCC, clang, armclang and IAR */
|
||||||
|
#define MBEDTLS_ARCH_IS_ARMV8_A
|
||||||
#endif
|
#endif
|
||||||
#elif defined(MBEDTLS_ARCH_IS_ARM64)
|
#elif defined(__ARM_ARCH_8A)
|
||||||
#define MBEDTLS_ARCH_IS_ARMV8
|
/* Alternative defined by clang */
|
||||||
|
#define MBEDTLS_ARCH_IS_ARMV8_A
|
||||||
|
#elif defined(_M_ARM64) || defined(_M_ARM64EC)
|
||||||
|
/* MSVC ARM64 is at least Armv8.0-A */
|
||||||
|
#define MBEDTLS_ARCH_IS_ARMV8_A
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -865,7 +865,7 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY) && !defined(MBEDTLS_ARCH_IS_ARMV8)
|
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY) && !defined(MBEDTLS_ARCH_IS_ARMV8_A)
|
||||||
#error "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY defined on non-Armv8-A system"
|
#error "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY defined on non-Armv8-A system"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -24,15 +24,15 @@
|
|||||||
|
|
||||||
#if defined(__clang__) && (__clang_major__ >= 4)
|
#if defined(__clang__) && (__clang_major__ >= 4)
|
||||||
|
|
||||||
/* Ideally, we would simply use MBEDTLS_ARCH_IS_ARMV8 in the following #if,
|
/* Ideally, we would simply use MBEDTLS_ARCH_IS_ARMV8_A in the following #if,
|
||||||
* but that is defined by build_info.h, and we need this block to happen first. */
|
* but that is defined by build_info.h, and we need this block to happen first. */
|
||||||
#if defined(__ARM_ARCH)
|
#if defined(__ARM_ARCH) && (__ARM_ARCH_PROFILE == 'A')
|
||||||
#if __ARM_ARCH >= 8
|
#if __ARM_ARCH >= 8
|
||||||
#define MBEDTLS_SHA256_ARCH_IS_ARMV8
|
#define MBEDTLS_SHA256_ARCH_IS_ARMV8_A
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SHA256_ARCH_IS_ARMV8) && !defined(__ARM_FEATURE_CRYPTO)
|
#if defined(MBEDTLS_SHA256_ARCH_IS_ARMV8_A) && !defined(__ARM_FEATURE_CRYPTO)
|
||||||
/* TODO: Re-consider above after https://reviews.llvm.org/D131064 merged.
|
/* TODO: Re-consider above after https://reviews.llvm.org/D131064 merged.
|
||||||
*
|
*
|
||||||
* The intrinsic declaration are guarded by predefined ACLE macros in clang:
|
* The intrinsic declaration are guarded by predefined ACLE macros in clang:
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
|
|
||||||
#if defined(MBEDTLS_ARCH_IS_ARMV8)
|
#if defined(MBEDTLS_ARCH_IS_ARMV8_A)
|
||||||
|
|
||||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
# if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||||
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||||
|
Reference in New Issue
Block a user