Skip to content

Commit

Permalink
Merge pull request wolfSSL#8035 from danielinux/armv8-armasm-ARMv7-A
Browse files Browse the repository at this point in the history
Allow armv8-asm on ARMv7-A with -mthumb-interwork
  • Loading branch information
SparkiDev authored Oct 10, 2024
2 parents daef866 + a23d384 commit 9c4960f
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-aes-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#ifndef WOLFSSL_ARMASM_INLINE
#ifndef NO_AES
#ifdef HAVE_AES_DECRYPT
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -4854,7 +4854,7 @@ void AES_GCM_encrypt(const unsigned char* in_p, unsigned char* out_p,
#endif /* !NO_AES */
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
#endif /* WOLFSSL_ARMASM */
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-chacha-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#ifndef WOLFSSL_ARMASM_INLINE
#ifdef HAVE_CHACHA
.text
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-chacha-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -570,7 +570,7 @@ void wc_chacha_use_over(byte* over_p, byte* output_p, const byte* input_p,
#endif /* HAVE_CHACHA */
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
#endif /* WOLFSSL_ARMASM */
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-curve25519.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#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)
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-curve25519_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -9430,7 +9430,7 @@ void sc_muladd(byte* s_p, const byte* a_p, const byte* b_p, const byte* c_p)
#endif /* HAVE_CURVE25519 || HAVE_ED25519 */
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
#endif /* WOLFSSL_ARMASM */
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-kyber-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#ifndef WOLFSSL_ARMASM_INLINE
#ifdef WOLFSSL_WC_KYBER
.text
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-kyber-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -9233,7 +9233,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__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-poly1305-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#ifndef WOLFSSL_ARMASM_INLINE
#ifdef HAVE_POLY1305
.text
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-poly1305-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -389,7 +389,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__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-sha256-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#ifndef WOLFSSL_ARMASM_INLINE
#ifndef NO_SHA256
#ifdef WOLFSSL_ARMASM_NO_NEON
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-sha256-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -2812,7 +2812,7 @@ void Transform_Sha256_Len(wc_Sha256* sha256_p, const byte* data_p, word32 len_p)
#endif /* !NO_SHA256 */
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
#endif /* WOLFSSL_ARMASM */
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-sha3-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#ifndef WOLFSSL_ARMASM_INLINE
#ifdef WOLFSSL_SHA3
#ifndef WOLFSSL_ARMASM_NO_NEON
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -2357,7 +2357,7 @@ void BlockSha3(word64* state_p)
#endif /* WOLFSSL_SHA3 */
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
#endif /* WOLFSSL_ARMASM */
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/arm/armv8-32-sha512-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#ifndef WOLFSSL_ARMASM_INLINE
#ifdef WOLFSSL_SHA512
#ifdef WOLFSSL_ARMASM_NO_NEON
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/port/arm/armv8-32-sha512-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <wolfssl/wolfcrypt/error-crypt.h>

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
Expand All @@ -42,7 +42,7 @@
#ifdef WOLFSSL_ARMASM_INLINE

#ifdef WOLFSSL_ARMASM
#if !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__)
#if !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__))

#ifdef __IAR_SYSTEMS_ICC__
#define __asm__ asm
Expand Down Expand Up @@ -9169,7 +9169,7 @@ void Transform_Sha512_Len(wc_Sha512* sha512_p, const byte* data_p, word32 len_p)
#endif /* WOLFSSL_SHA512 */
#endif /* !__aarch64__ && __arm__ && !__thumb__ */
#endif /* WOLFSSL_ARMASM */
#endif /* !defined(__aarch64__) && defined(__arm__) && !defined(__thumb__) */
#endif /* !defined(__aarch64__) && defined(__arm__) && (!defined(__thumb__) || defined(__THUMB_INTERWORK__)) */
#endif /* WOLFSSL_ARMASM */

#endif /* WOLFSSL_ARMASM_INLINE */

0 comments on commit 9c4960f

Please sign in to comment.