From 65742c4a7a21d58c5a065ae80a1b02541b839e43 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Fri, 11 Oct 2024 09:55:46 +1000 Subject: [PATCH] ARM32 ASM: regenerated with fixes Fix thumb interwork def check to be consistent and update #endif. Remove duplicate check in generated C files. --- wolfcrypt/src/port/arm/armv8-32-aes-asm.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c | 10 +++------- wolfcrypt/src/port/arm/armv8-32-chacha-asm.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-chacha-asm_c.c | 10 +++------- wolfcrypt/src/port/arm/armv8-32-curve25519.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-curve25519_c.c | 10 +++------- wolfcrypt/src/port/arm/armv8-32-kyber-asm.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-kyber-asm_c.c | 10 +++------- wolfcrypt/src/port/arm/armv8-32-poly1305-asm.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-poly1305-asm_c.c | 10 +++------- wolfcrypt/src/port/arm/armv8-32-sha256-asm.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-sha256-asm_c.c | 10 +++------- wolfcrypt/src/port/arm/armv8-32-sha3-asm.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c | 10 +++------- wolfcrypt/src/port/arm/armv8-32-sha512-asm.S | 5 +++-- wolfcrypt/src/port/arm/armv8-32-sha512-asm_c.c | 10 +++------- 16 files changed, 48 insertions(+), 72 deletions(-) diff --git a/wolfcrypt/src/port/arm/armv8-32-aes-asm.S b/wolfcrypt/src/port/arm/armv8-32-aes-asm.S index a98ae94544..45441ead12 100644 --- a/wolfcrypt/src/port/arm/armv8-32-aes-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-aes-asm.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #ifndef NO_AES #ifdef HAVE_AES_DECRYPT @@ -5305,7 +5306,7 @@ L_AES_GCM_encrypt_end: .size AES_GCM_encrypt,.-AES_GCM_encrypt #endif /* HAVE_AESGCM */ #endif /* !NO_AES */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c b/wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c index 14a8922e67..3c34f3ef6f 100644 --- a/wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -4852,9 +4850,7 @@ void AES_GCM_encrypt(const unsigned char* in_p, unsigned char* out_p, #endif /* HAVE_AESGCM */ #endif /* !NO_AES */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */ diff --git a/wolfcrypt/src/port/arm/armv8-32-chacha-asm.S b/wolfcrypt/src/port/arm/armv8-32-chacha-asm.S index 53ccdaaaa8..3c4119eb1a 100644 --- a/wolfcrypt/src/port/arm/armv8-32-chacha-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-chacha-asm.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #ifdef HAVE_CHACHA .text @@ -514,7 +515,7 @@ L_chacha_arm32_over_done: .size wc_chacha_use_over,.-wc_chacha_use_over #endif /* WOLFSSL_ARMASM_NO_NEON */ #endif /* HAVE_CHACHA */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-chacha-asm_c.c b/wolfcrypt/src/port/arm/armv8-32-chacha-asm_c.c index 16039f2473..aebcff1553 100644 --- a/wolfcrypt/src/port/arm/armv8-32-chacha-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-chacha-asm_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -568,9 +566,7 @@ void wc_chacha_use_over(byte* over_p, byte* output_p, const byte* input_p, #endif /* WOLFSSL_ARMASM_NO_NEON */ #endif /* HAVE_CHACHA */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */ diff --git a/wolfcrypt/src/port/arm/armv8-32-curve25519.S b/wolfcrypt/src/port/arm/armv8-32-curve25519.S index 73c3151cb1..1dea1e1d13 100644 --- a/wolfcrypt/src/port/arm/armv8-32-curve25519.S +++ b/wolfcrypt/src/port/arm/armv8-32-curve25519.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #if defined(HAVE_CURVE25519) || defined(HAVE_ED25519) #if !defined(CURVE25519_SMALL) || !defined(ED25519_SMALL) @@ -9180,7 +9181,7 @@ sc_muladd: #endif /* !CURVE25519_SMALL || !ED25519_SMALL */ #endif /* HAVE_CURVE25519 || HAVE_ED25519 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-curve25519_c.c b/wolfcrypt/src/port/arm/armv8-32-curve25519_c.c index 709b7d60b9..6871aaade3 100644 --- a/wolfcrypt/src/port/arm/armv8-32-curve25519_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-curve25519_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -9428,9 +9426,7 @@ void sc_muladd(byte* s_p, const byte* a_p, const byte* b_p, const byte* c_p) #endif /* !CURVE25519_SMALL || !ED25519_SMALL */ #endif /* HAVE_CURVE25519 || HAVE_ED25519 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */ diff --git a/wolfcrypt/src/port/arm/armv8-32-kyber-asm.S b/wolfcrypt/src/port/arm/armv8-32-kyber-asm.S index 3ccd894d0a..ec2f1352b6 100644 --- a/wolfcrypt/src/port/arm/armv8-32-kyber-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-kyber-asm.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #ifdef WOLFSSL_WC_KYBER .text @@ -9433,7 +9434,7 @@ L_kyber_arm32_rej_uniform_done: pop {r4, r5, r6, r7, r8, pc} .size kyber_arm32_rej_uniform,.-kyber_arm32_rej_uniform #endif /* WOLFSSL_WC_KYBER */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-kyber-asm_c.c b/wolfcrypt/src/port/arm/armv8-32-kyber-asm_c.c index acf3a39b21..4650b9bc8f 100644 --- a/wolfcrypt/src/port/arm/armv8-32-kyber-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-kyber-asm_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -9231,9 +9229,7 @@ unsigned int kyber_arm32_rej_uniform(sword16* p_p, unsigned int len_p, } #endif /* WOLFSSL_WC_KYBER */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */ diff --git a/wolfcrypt/src/port/arm/armv8-32-poly1305-asm.S b/wolfcrypt/src/port/arm/armv8-32-poly1305-asm.S index 5e8814dd68..a7a1b94339 100644 --- a/wolfcrypt/src/port/arm/armv8-32-poly1305-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-poly1305-asm.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #ifdef HAVE_POLY1305 .text @@ -348,7 +349,7 @@ poly1305_final: pop {r4, r5, r6, r7, r8, r9, pc} .size poly1305_final,.-poly1305_final #endif /* HAVE_POLY1305 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-poly1305-asm_c.c b/wolfcrypt/src/port/arm/armv8-32-poly1305-asm_c.c index dc0dffed87..aaf596d4c1 100644 --- a/wolfcrypt/src/port/arm/armv8-32-poly1305-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-poly1305-asm_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -387,9 +385,7 @@ void poly1305_final(Poly1305* ctx_p, byte* mac_p) } #endif /* HAVE_POLY1305 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */ diff --git a/wolfcrypt/src/port/arm/armv8-32-sha256-asm.S b/wolfcrypt/src/port/arm/armv8-32-sha256-asm.S index 58464f60e8..62fc8eb1c9 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha256-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-sha256-asm.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #ifndef NO_SHA256 #ifdef WOLFSSL_ARMASM_NO_NEON @@ -2866,7 +2867,7 @@ L_SHA256_transform_neon_len_start: .size Transform_Sha256_Len,.-Transform_Sha256_Len #endif /* WOLFSSL_ARMASM_NO_NEON */ #endif /* !NO_SHA256 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-sha256-asm_c.c b/wolfcrypt/src/port/arm/armv8-32-sha256-asm_c.c index 22f112338e..05086af071 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha256-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-sha256-asm_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -2810,9 +2808,7 @@ void Transform_Sha256_Len(wc_Sha256* sha256_p, const byte* data_p, word32 len_p) #endif /* WOLFSSL_ARMASM_NO_NEON */ #endif /* !NO_SHA256 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */ diff --git a/wolfcrypt/src/port/arm/armv8-32-sha3-asm.S b/wolfcrypt/src/port/arm/armv8-32-sha3-asm.S index 53c54901c3..46a75cedc6 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha3-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-sha3-asm.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #ifdef WOLFSSL_SHA3 #ifndef WOLFSSL_ARMASM_NO_NEON @@ -2394,7 +2395,7 @@ L_sha3_arm32_begin: .size BlockSha3,.-BlockSha3 #endif /* WOLFSSL_ARMASM_NO_NEON */ #endif /* WOLFSSL_SHA3 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c b/wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c index d3208d9d3f..e9e227ec37 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -2355,9 +2353,7 @@ void BlockSha3(word64* state_p) #endif /* WOLFSSL_ARMASM_NO_NEON */ #endif /* WOLFSSL_SHA3 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */ diff --git a/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S b/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S index 429af4b2c4..3316e6006d 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S +++ b/wolfcrypt/src/port/arm/armv8-32-sha512-asm.S @@ -31,7 +31,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #ifndef WOLFSSL_ARMASM_INLINE #ifdef WOLFSSL_SHA512 #ifdef WOLFSSL_ARMASM_NO_NEON @@ -9367,7 +9368,7 @@ L_SHA512_transform_neon_len_start: .size Transform_Sha512_Len,.-Transform_Sha512_Len #endif /* !WOLFSSL_ARMASM_NO_NEON */ #endif /* WOLFSSL_SHA512 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #if defined(__linux__) && defined(__ELF__) diff --git a/wolfcrypt/src/port/arm/armv8-32-sha512-asm_c.c b/wolfcrypt/src/port/arm/armv8-32-sha512-asm_c.c index aa71f62357..32506f64e7 100644 --- a/wolfcrypt/src/port/arm/armv8-32-sha512-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-32-sha512-asm_c.c @@ -32,7 +32,8 @@ #include #ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) +#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || \ + defined(__THUMB_INTERWORK__)) #include #ifdef HAVE_CONFIG_H #include @@ -41,9 +42,6 @@ #include #ifdef WOLFSSL_ARMASM_INLINE -#ifdef WOLFSSL_ARMASM -#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) - #ifdef __IAR_SYSTEMS_ICC__ #define __asm__ asm #define __volatile__ volatile @@ -9167,9 +9165,7 @@ void Transform_Sha512_Len(wc_Sha512* sha512_p, const byte* data_p, word32 len_p) #endif /* !WOLFSSL_ARMASM_NO_NEON */ #endif /* WOLFSSL_SHA512 */ -#endif /* !__aarch64__ && __arm__ && !__thumb__ */ -#endif /* WOLFSSL_ARMASM */ -#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */ +#endif /* !__aarch64__ && __arm__ && (!__thumb__ || __THUMB_INTERWORK__) */ #endif /* WOLFSSL_ARMASM */ #endif /* WOLFSSL_ARMASM_INLINE */