Skip to content

Commit 9c4960f

Browse files
authored
Merge pull request #8035 from danielinux/armv8-armasm-ARMv7-A
Allow armv8-asm on ARMv7-A with -mthumb-interwork
2 parents daef866 + a23d384 commit 9c4960f

16 files changed

Lines changed: 32 additions & 32 deletions

wolfcrypt/src/port/arm/armv8-32-aes-asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <wolfssl/wolfcrypt/settings.h>
3232

3333
#ifdef WOLFSSL_ARMASM
34-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
34+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3535
#ifndef WOLFSSL_ARMASM_INLINE
3636
#ifndef NO_AES
3737
#ifdef HAVE_AES_DECRYPT

wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <wolfssl/wolfcrypt/error-crypt.h>
3333

3434
#ifdef WOLFSSL_ARMASM
35-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
35+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3636
#include <stdint.h>
3737
#ifdef HAVE_CONFIG_H
3838
#include <config.h>
@@ -42,7 +42,7 @@
4242
#ifdef WOLFSSL_ARMASM_INLINE
4343

4444
#ifdef WOLFSSL_ARMASM
45-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
45+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
4646

4747
#ifdef __IAR_SYSTEMS_ICC__
4848
#define __asm__ asm
@@ -4854,7 +4854,7 @@ void AES_GCM_encrypt(const unsigned char* in_p, unsigned char* out_p,
48544854
#endif /* !NO_AES */
48554855
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
48564856
#endif /* WOLFSSL_ARMASM */
4857-
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
4857+
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
48584858
#endif /* WOLFSSL_ARMASM */
48594859

48604860
#endif /* WOLFSSL_ARMASM_INLINE */

wolfcrypt/src/port/arm/armv8-32-chacha-asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <wolfssl/wolfcrypt/settings.h>
3232

3333
#ifdef WOLFSSL_ARMASM
34-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
34+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3535
#ifndef WOLFSSL_ARMASM_INLINE
3636
#ifdef HAVE_CHACHA
3737
.text

wolfcrypt/src/port/arm/armv8-32-chacha-asm_c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <wolfssl/wolfcrypt/error-crypt.h>
3333

3434
#ifdef WOLFSSL_ARMASM
35-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
35+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3636
#include <stdint.h>
3737
#ifdef HAVE_CONFIG_H
3838
#include <config.h>
@@ -42,7 +42,7 @@
4242
#ifdef WOLFSSL_ARMASM_INLINE
4343

4444
#ifdef WOLFSSL_ARMASM
45-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
45+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
4646

4747
#ifdef __IAR_SYSTEMS_ICC__
4848
#define __asm__ asm
@@ -570,7 +570,7 @@ void wc_chacha_use_over(byte* over_p, byte* output_p, const byte* input_p,
570570
#endif /* HAVE_CHACHA */
571571
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
572572
#endif /* WOLFSSL_ARMASM */
573-
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
573+
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
574574
#endif /* WOLFSSL_ARMASM */
575575

576576
#endif /* WOLFSSL_ARMASM_INLINE */

wolfcrypt/src/port/arm/armv8-32-curve25519.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <wolfssl/wolfcrypt/settings.h>
3232

3333
#ifdef WOLFSSL_ARMASM
34-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
34+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3535
#ifndef WOLFSSL_ARMASM_INLINE
3636
#if defined(HAVE_CURVE25519) || defined(HAVE_ED25519)
3737
#if !defined(CURVE25519_SMALL) || !defined(ED25519_SMALL)

wolfcrypt/src/port/arm/armv8-32-curve25519_c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <wolfssl/wolfcrypt/error-crypt.h>
3333

3434
#ifdef WOLFSSL_ARMASM
35-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
35+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3636
#include <stdint.h>
3737
#ifdef HAVE_CONFIG_H
3838
#include <config.h>
@@ -42,7 +42,7 @@
4242
#ifdef WOLFSSL_ARMASM_INLINE
4343

4444
#ifdef WOLFSSL_ARMASM
45-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
45+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
4646

4747
#ifdef __IAR_SYSTEMS_ICC__
4848
#define __asm__ asm
@@ -9430,7 +9430,7 @@ void sc_muladd(byte* s_p, const byte* a_p, const byte* b_p, const byte* c_p)
94309430
#endif /* HAVE_CURVE25519 || HAVE_ED25519 */
94319431
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
94329432
#endif /* WOLFSSL_ARMASM */
9433-
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
9433+
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
94349434
#endif /* WOLFSSL_ARMASM */
94359435

94369436
#endif /* WOLFSSL_ARMASM_INLINE */

wolfcrypt/src/port/arm/armv8-32-kyber-asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <wolfssl/wolfcrypt/settings.h>
3232

3333
#ifdef WOLFSSL_ARMASM
34-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
34+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3535
#ifndef WOLFSSL_ARMASM_INLINE
3636
#ifdef WOLFSSL_WC_KYBER
3737
.text

wolfcrypt/src/port/arm/armv8-32-kyber-asm_c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <wolfssl/wolfcrypt/error-crypt.h>
3333

3434
#ifdef WOLFSSL_ARMASM
35-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
35+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3636
#include <stdint.h>
3737
#ifdef HAVE_CONFIG_H
3838
#include <config.h>
@@ -42,7 +42,7 @@
4242
#ifdef WOLFSSL_ARMASM_INLINE
4343

4444
#ifdef WOLFSSL_ARMASM
45-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
45+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
4646

4747
#ifdef __IAR_SYSTEMS_ICC__
4848
#define __asm__ asm
@@ -9233,7 +9233,7 @@ unsigned int kyber_arm32_rej_uniform(sword16* p_p, unsigned int len_p,
92339233
#endif /* WOLFSSL_WC_KYBER */
92349234
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
92359235
#endif /* WOLFSSL_ARMASM */
9236-
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
9236+
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
92379237
#endif /* WOLFSSL_ARMASM */
92389238

92399239
#endif /* WOLFSSL_ARMASM_INLINE */

wolfcrypt/src/port/arm/armv8-32-poly1305-asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <wolfssl/wolfcrypt/settings.h>
3232

3333
#ifdef WOLFSSL_ARMASM
34-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
34+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3535
#ifndef WOLFSSL_ARMASM_INLINE
3636
#ifdef HAVE_POLY1305
3737
.text

wolfcrypt/src/port/arm/armv8-32-poly1305-asm_c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <wolfssl/wolfcrypt/error-crypt.h>
3333

3434
#ifdef WOLFSSL_ARMASM
35-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
35+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
3636
#include <stdint.h>
3737
#ifdef HAVE_CONFIG_H
3838
#include <config.h>
@@ -42,7 +42,7 @@
4242
#ifdef WOLFSSL_ARMASM_INLINE
4343

4444
#ifdef WOLFSSL_ARMASM
45-
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
45+
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
4646

4747
#ifdef __IAR_SYSTEMS_ICC__
4848
#define __asm__ asm
@@ -389,7 +389,7 @@ void poly1305_final(Poly1305* ctx_p, byte* mac_p)
389389
#endif /* HAVE_POLY1305 */
390390
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
391391
#endif /* WOLFSSL_ARMASM */
392-
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
392+
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
393393
#endif /* WOLFSSL_ARMASM */
394394

395395
#endif /* WOLFSSL_ARMASM_INLINE */

0 commit comments

Comments
 (0)