1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-05-09 16:41:19 +08:00

Tidy-up - move asm #define into build_info.h

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2022-12-23 13:15:37 +00:00
parent 39188c0a2a
commit cb0f2c4491
7 changed files with 10 additions and 34 deletions

View File

@ -59,6 +59,13 @@
#define inline __inline #define inline __inline
#endif #endif
/* Define `asm` for compilers which don't define it. */
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm__
#endif
/* *INDENT-ON* */
#if !defined(MBEDTLS_CONFIG_FILE) #if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/mbedtls_config.h" #include "mbedtls/mbedtls_config.h"
#else #else

View File

@ -48,8 +48,11 @@
* Requires support for asm() in compiler. * Requires support for asm() in compiler.
* *
* Used in: * Used in:
* library/aesni.h
* library/aria.c * library/aria.c
* library/bn_mul.h * library/bn_mul.h
* library/constant_time.c
* library/padlock.h
* *
* Required by: * Required by:
* MBEDTLS_AESNI_C * MBEDTLS_AESNI_C

View File

@ -37,12 +37,6 @@
#include <string.h> #include <string.h>
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
/* *INDENT-ON* */
#if defined(MBEDTLS_HAVE_X86_64) #if defined(MBEDTLS_HAVE_X86_64)
/* /*

View File

@ -83,10 +83,6 @@
/* *INDENT-OFF* */ /* *INDENT-OFF* */
#if defined(MBEDTLS_HAVE_ASM) #if defined(MBEDTLS_HAVE_ASM)
#ifndef asm
#define asm __asm
#endif
/* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */ /* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */
#if defined(__GNUC__) && \ #if defined(__GNUC__) && \
( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 )

View File

@ -31,12 +31,6 @@
#include <string.h> #include <string.h>
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
/* *INDENT-ON* */
#if defined(MBEDTLS_HAVE_X86) #if defined(MBEDTLS_HAVE_X86)
/* /*

View File

@ -89,12 +89,6 @@ static int mbedtls_a64_crypto_sha256_determine_support(void)
#include <signal.h> #include <signal.h>
#include <setjmp.h> #include <setjmp.h>
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm__
#endif
/* *INDENT-ON* */
static jmp_buf return_from_sigill; static jmp_buf return_from_sigill;
/* /*

View File

@ -104,12 +104,6 @@ static int mbedtls_a64_crypto_sha512_determine_support(void)
#include <signal.h> #include <signal.h>
#include <setjmp.h> #include <setjmp.h>
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm__
#endif
/* *INDENT-ON* */
static jmp_buf return_from_sigill; static jmp_buf return_from_sigill;
/* /*
@ -300,12 +294,6 @@ static const uint64_t K[80] =
# define mbedtls_internal_sha512_process_a64_crypto mbedtls_internal_sha512_process # define mbedtls_internal_sha512_process_a64_crypto mbedtls_internal_sha512_process
#endif #endif
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm__
#endif
/* *INDENT-ON* */
/* Accelerated SHA-512 implementation originally written by Simon Tatham for PuTTY, /* Accelerated SHA-512 implementation originally written by Simon Tatham for PuTTY,
* under the MIT licence; dual-licensed as Apache 2 with his kind permission. * under the MIT licence; dual-licensed as Apache 2 with his kind permission.
*/ */