Merge pull request #6868 from davidhorstmann-arm/workaround-uncrustify-asm-defines

Workaround Uncrustify parsing of "asm"
This commit is contained in:
Gilles Peskine 2023-01-04 10:38:06 +01:00 committed by GitHub
commit 262851df1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 0 deletions

View file

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

View file

@ -82,9 +82,11 @@
#if defined(MBEDTLS_HAVE_ASM)
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
/* *INDENT-ON* */
/* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */
#if defined(__GNUC__) && \

View file

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

View file

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

View file

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

View file

@ -61,9 +61,11 @@ int main( void )
#include "mbedtls/error.h"
/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
/* *INDENT-ON* */
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)