Workaround Uncrustify parsing of "asm"
The following code: #ifndef asm #define asm __asm #endif causes Uncrustify to stop correcting the rest of the file. This may be due to parsing the "asm" keyword in the definition. Work around this by wrapping the idiom in an *INDENT-OFF* comment wherever it appears. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
7a389ddc84
commit
e3d8f31ba1
6 changed files with 14 additions and 0 deletions
|
@ -36,9 +36,11 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifndef asm
|
#ifndef asm
|
||||||
#define asm __asm
|
#define asm __asm
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_X86_64)
|
#if defined(MBEDTLS_HAVE_X86_64)
|
||||||
|
|
||||||
|
|
|
@ -82,9 +82,11 @@
|
||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_ASM)
|
#if defined(MBEDTLS_HAVE_ASM)
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifndef asm
|
#ifndef asm
|
||||||
#define asm __asm
|
#define asm __asm
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
/* 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__) && \
|
||||||
|
|
|
@ -31,9 +31,11 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifndef asm
|
#ifndef asm
|
||||||
#define asm __asm
|
#define asm __asm
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_X86)
|
#if defined(MBEDTLS_HAVE_X86)
|
||||||
|
|
||||||
|
|
|
@ -89,9 +89,11 @@ 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
|
#ifndef asm
|
||||||
#define asm __asm__
|
#define asm __asm__
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
static jmp_buf return_from_sigill;
|
static jmp_buf return_from_sigill;
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,11 @@ 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
|
#ifndef asm
|
||||||
#define asm __asm__
|
#define asm __asm__
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
static jmp_buf return_from_sigill;
|
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
|
# define mbedtls_internal_sha512_process_a64_crypto mbedtls_internal_sha512_process
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifndef asm
|
#ifndef asm
|
||||||
#define asm __asm__
|
#define asm __asm__
|
||||||
#endif
|
#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.
|
||||||
|
|
|
@ -61,9 +61,11 @@ int main( void )
|
||||||
|
|
||||||
#include "mbedtls/error.h"
|
#include "mbedtls/error.h"
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifndef asm
|
#ifndef asm
|
||||||
#define asm __asm
|
#define asm __asm
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue