ARM32/Thumb2/RISC-V 64 ASM: omit frame pointer

ARM32/Thumb2: Generated code now omits the frame pointer attribute on
each function. Remove global use in configure.ac.
RISC-V 64: Omit the frame pointer on the one function that uses the
register 's0'.
This commit is contained in:
Sean Parkinson
2025-06-18 10:20:39 +10:00
parent 7d77446964
commit dc70cfa3b3
21 changed files with 2378 additions and 1896 deletions

View File

@@ -3367,7 +3367,7 @@ then
armv7m*)
# QEMU doesn't work with armv7-m
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ARMASM_THUMB2"
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv7-r -DWOLFSSL_ARMASM_THUMB2 -fomit-frame-pointer -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=7"
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv7-r -DWOLFSSL_ARMASM_THUMB2 -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=7"
# Include options.h
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
ENABLED_ARMASM_CRYPTO=no
@@ -3385,7 +3385,7 @@ then
fi
;;
armv6*)
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv6 -fomit-frame-pointer -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=6"
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv6 -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=6"
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
ENABLED_ARMASM_CRYPTO=no
ENABLED_ARMASM_NEON=no
@@ -3393,7 +3393,7 @@ then
AC_MSG_NOTICE([32bit ARMv6 found])
;;
armv4*)
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv4 -fomit-frame-pointer -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=4"
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv4 -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=4"
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
ENABLED_ARMASM_CRYPTO=no
ENABLED_ARMASM_NEON=no

View File

@@ -48,6 +48,7 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
#ifndef NO_AES
#include <wolfssl/wolfcrypt/aes.h>
@@ -204,9 +205,9 @@ static const word32* L_AES_ARM32_te = L_AES_ARM32_te_data;
#ifdef HAVE_AES_DECRYPT
void AES_invert_key(unsigned char* ks_p, word32 rounds_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_invert_key(unsigned char* ks_p, word32 rounds_p)
WC_OMIT_FRAME_POINTER void AES_invert_key(unsigned char* ks_p, word32 rounds_p)
#else
void AES_invert_key(unsigned char* ks, word32 rounds)
WC_OMIT_FRAME_POINTER void AES_invert_key(unsigned char* ks, word32 rounds)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -441,11 +442,11 @@ static const word32 L_AES_ARM32_rcon[] = {
void AES_set_encrypt_key(const unsigned char* key_p, word32 len_p,
unsigned char* ks_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_set_encrypt_key(const unsigned char* key_p, word32 len_p,
unsigned char* ks_p)
WC_OMIT_FRAME_POINTER void AES_set_encrypt_key(const unsigned char* key_p,
word32 len_p, unsigned char* ks_p)
#else
void AES_set_encrypt_key(const unsigned char* key, word32 len,
unsigned char* ks)
WC_OMIT_FRAME_POINTER void AES_set_encrypt_key(const unsigned char* key,
word32 len, unsigned char* ks)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -976,10 +977,11 @@ void AES_set_encrypt_key(const unsigned char* key, word32 len,
void AES_encrypt_block(const word32* te_p, int nr_p, int len_p,
const word32* ks_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_encrypt_block(const word32* te_p, int nr_p, int len_p,
const word32* ks_p)
WC_OMIT_FRAME_POINTER void AES_encrypt_block(const word32* te_p, int nr_p,
int len_p, const word32* ks_p)
#else
void AES_encrypt_block(const word32* te, int nr, int len, const word32* ks)
WC_OMIT_FRAME_POINTER void AES_encrypt_block(const word32* te, int nr, int len,
const word32* ks)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1643,11 +1645,12 @@ static const word32* L_AES_ARM32_te_ecb = L_AES_ARM32_te_data;
void AES_ECB_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_ECB_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p)
WC_OMIT_FRAME_POINTER void AES_ECB_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p)
#else
void AES_ECB_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr)
WC_OMIT_FRAME_POINTER void AES_ECB_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1919,12 +1922,13 @@ void AES_CBC_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* iv_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_CBC_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* iv_p)
WC_OMIT_FRAME_POINTER void AES_CBC_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* iv_p)
#else
void AES_CBC_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* iv)
WC_OMIT_FRAME_POINTER void AES_CBC_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* iv)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2217,12 +2221,13 @@ void AES_CTR_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* ctr_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_CTR_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* ctr_p)
WC_OMIT_FRAME_POINTER void AES_CTR_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* ctr_p)
#else
void AES_CTR_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr)
WC_OMIT_FRAME_POINTER void AES_CTR_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* ctr)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2516,9 +2521,11 @@ void AES_CTR_encrypt(const unsigned char* in, unsigned char* out,
defined(HAVE_AES_CBC)
void AES_decrypt_block(const word32* td_p, int nr_p, const byte* td4_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_decrypt_block(const word32* td_p, int nr_p, const byte* td4_p)
WC_OMIT_FRAME_POINTER void AES_decrypt_block(const word32* td_p, int nr_p,
const byte* td4_p)
#else
void AES_decrypt_block(const word32* td, int nr, const byte* td4)
WC_OMIT_FRAME_POINTER void AES_decrypt_block(const word32* td, int nr,
const byte* td4)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3215,11 +3222,12 @@ static const byte L_AES_ARM32_td4[] = {
void AES_ECB_decrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_ECB_decrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p)
WC_OMIT_FRAME_POINTER void AES_ECB_decrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p)
#else
void AES_ECB_decrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr)
WC_OMIT_FRAME_POINTER void AES_ECB_decrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3491,12 +3499,13 @@ void AES_CBC_decrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* iv_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_CBC_decrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* iv_p)
WC_OMIT_FRAME_POINTER void AES_CBC_decrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* iv_p)
#else
void AES_CBC_decrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* iv)
WC_OMIT_FRAME_POINTER void AES_CBC_decrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* iv)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4163,11 +4172,11 @@ static const word32 L_GCM_gmult_len_r[] = {
void GCM_gmult_len(unsigned char* x_p, const unsigned char** m_p,
const unsigned char* data_p, unsigned long len_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void GCM_gmult_len(unsigned char* x_p, const unsigned char** m_p,
const unsigned char* data_p, unsigned long len_p)
WC_OMIT_FRAME_POINTER void GCM_gmult_len(unsigned char* x_p,
const unsigned char** m_p, const unsigned char* data_p, unsigned long len_p)
#else
void GCM_gmult_len(unsigned char* x, const unsigned char** m,
const unsigned char* data, unsigned long len)
WC_OMIT_FRAME_POINTER void GCM_gmult_len(unsigned char* x,
const unsigned char** m, const unsigned char* data, unsigned long len)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4774,12 +4783,13 @@ void AES_GCM_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* ctr_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_GCM_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* ctr_p)
WC_OMIT_FRAME_POINTER void AES_GCM_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* ctr_p)
#else
void AES_GCM_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr)
WC_OMIT_FRAME_POINTER void AES_GCM_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* ctr)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -48,13 +48,16 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
#ifdef HAVE_CHACHA
#include <wolfssl/wolfcrypt/chacha.h>
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_setiv(word32* x_p, const byte* iv_p, word32 counter_p)
WC_OMIT_FRAME_POINTER void wc_chacha_setiv(word32* x_p, const byte* iv_p,
word32 counter_p)
#else
void wc_chacha_setiv(word32* x, const byte* iv, word32 counter)
WC_OMIT_FRAME_POINTER void wc_chacha_setiv(word32* x, const byte* iv,
word32 counter)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -92,9 +95,11 @@ static const word32 L_chacha_arm32_constants[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_setkey(word32* x_p, const byte* key_p, word32 keySz_p)
WC_OMIT_FRAME_POINTER void wc_chacha_setkey(word32* x_p, const byte* key_p,
word32 keySz_p)
#else
void wc_chacha_setkey(word32* x, const byte* key, word32 keySz)
WC_OMIT_FRAME_POINTER void wc_chacha_setkey(word32* x, const byte* key,
word32 keySz)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -154,10 +159,11 @@ void wc_chacha_setkey(word32* x, const byte* key, word32 keySz)
#ifdef WOLFSSL_ARMASM_NO_NEON
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_crypt_bytes(ChaCha* ctx_p, byte* c_p, const byte* m_p,
word32 len_p)
WC_OMIT_FRAME_POINTER void wc_chacha_crypt_bytes(ChaCha* ctx_p, byte* c_p,
const byte* m_p, word32 len_p)
#else
void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
WC_OMIT_FRAME_POINTER void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c,
const byte* m, word32 len)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -529,10 +535,11 @@ void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_use_over(byte* over_p, byte* output_p, const byte* input_p,
word32 len_p)
WC_OMIT_FRAME_POINTER void wc_chacha_use_over(byte* over_p, byte* output_p,
const byte* input_p, word32 len_p)
#else
void wc_chacha_use_over(byte* over, byte* output, const byte* input, word32 len)
WC_OMIT_FRAME_POINTER void wc_chacha_use_over(byte* over, byte* output,
const byte* input, word32 len)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -48,6 +48,7 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
/* Based on work by: Emil Lenngren
* https://github.com/pornin/X25519-Cortex-M4
*/
@@ -60,9 +61,9 @@
#if !defined(CURVE25519_SMALL) || !defined(ED25519_SMALL)
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_init()
WC_OMIT_FRAME_POINTER void fe_init()
#else
void fe_init()
WC_OMIT_FRAME_POINTER void fe_init()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -82,9 +83,9 @@ void fe_init()
void fe_add_sub_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_add_sub_op()
WC_OMIT_FRAME_POINTER void fe_add_sub_op()
#else
void fe_add_sub_op()
WC_OMIT_FRAME_POINTER void fe_add_sub_op()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -301,9 +302,9 @@ void fe_add_sub_op()
void fe_sub_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sub_op()
WC_OMIT_FRAME_POINTER void fe_sub_op()
#else
void fe_sub_op()
WC_OMIT_FRAME_POINTER void fe_sub_op()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -353,9 +354,9 @@ void fe_sub_op()
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sub(fe r_p, const fe a_p, const fe b_p)
WC_OMIT_FRAME_POINTER void fe_sub(fe r_p, const fe a_p, const fe b_p)
#else
void fe_sub(fe r, const fe a, const fe b)
WC_OMIT_FRAME_POINTER void fe_sub(fe r, const fe a, const fe b)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -380,9 +381,9 @@ void fe_sub(fe r, const fe a, const fe b)
void fe_add_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_add_op()
WC_OMIT_FRAME_POINTER void fe_add_op()
#else
void fe_add_op()
WC_OMIT_FRAME_POINTER void fe_add_op()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -433,9 +434,9 @@ void fe_add_op()
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_add(fe r_p, const fe a_p, const fe b_p)
WC_OMIT_FRAME_POINTER void fe_add(fe r_p, const fe a_p, const fe b_p)
#else
void fe_add(fe r, const fe a, const fe b)
WC_OMIT_FRAME_POINTER void fe_add(fe r, const fe a, const fe b)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -460,9 +461,9 @@ void fe_add(fe r, const fe a, const fe b)
#ifdef HAVE_ED25519
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_frombytes(fe out_p, const unsigned char* in_p)
WC_OMIT_FRAME_POINTER void fe_frombytes(fe out_p, const unsigned char* in_p)
#else
void fe_frombytes(fe out, const unsigned char* in)
WC_OMIT_FRAME_POINTER void fe_frombytes(fe out, const unsigned char* in)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -504,9 +505,9 @@ void fe_frombytes(fe out, const unsigned char* in)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_tobytes(unsigned char* out_p, const fe n_p)
WC_OMIT_FRAME_POINTER void fe_tobytes(unsigned char* out_p, const fe n_p)
#else
void fe_tobytes(unsigned char* out, const fe n)
WC_OMIT_FRAME_POINTER void fe_tobytes(unsigned char* out, const fe n)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -559,9 +560,9 @@ void fe_tobytes(unsigned char* out, const fe n)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_1(fe n_p)
WC_OMIT_FRAME_POINTER void fe_1(fe n_p)
#else
void fe_1(fe n)
WC_OMIT_FRAME_POINTER void fe_1(fe n)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -591,9 +592,9 @@ void fe_1(fe n)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_0(fe n_p)
WC_OMIT_FRAME_POINTER void fe_0(fe n_p)
#else
void fe_0(fe n)
WC_OMIT_FRAME_POINTER void fe_0(fe n)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -623,9 +624,9 @@ void fe_0(fe n)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_copy(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_copy(fe r_p, const fe a_p)
#else
void fe_copy(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_copy(fe r, const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -693,9 +694,9 @@ void fe_copy(fe r, const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_neg(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_neg(fe r_p, const fe a_p)
#else
void fe_neg(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_neg(fe r, const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -731,9 +732,9 @@ void fe_neg(fe r, const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int fe_isnonzero(const fe a_p)
WC_OMIT_FRAME_POINTER int fe_isnonzero(const fe a_p)
#else
int fe_isnonzero(const fe a)
WC_OMIT_FRAME_POINTER int fe_isnonzero(const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -786,9 +787,9 @@ int fe_isnonzero(const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int fe_isnegative(const fe a_p)
WC_OMIT_FRAME_POINTER int fe_isnegative(const fe a_p)
#else
int fe_isnegative(const fe a)
WC_OMIT_FRAME_POINTER int fe_isnegative(const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -825,9 +826,9 @@ int fe_isnegative(const fe a)
#if defined(HAVE_ED25519_MAKE_KEY) || defined(HAVE_ED25519_SIGN)
#ifndef WC_NO_CACHE_RESISTANT
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
#else
void fe_cmov_table(fe* r, fe* base, signed char b)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r, fe* base, signed char b)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2370,9 +2371,9 @@ void fe_cmov_table(fe* r, fe* base, signed char b)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
#else
void fe_cmov_table(fe* r, fe* base, signed char b)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r, fe* base, signed char b)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2506,9 +2507,9 @@ void fe_cmov_table(fe* r, fe* base, signed char b)
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
void fe_mul_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#else
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2901,9 +2902,9 @@ void fe_mul_op()
#else
void fe_mul_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#else
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3054,9 +3055,9 @@ void fe_mul_op()
#endif /* WOLFSSL_ARM_ARCH && WOLFSSL_ARM_ARCH < 6 */
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul(fe r_p, const fe a_p, const fe b_p)
WC_OMIT_FRAME_POINTER void fe_mul(fe r_p, const fe a_p, const fe b_p)
#else
void fe_mul(fe r, const fe a, const fe b)
WC_OMIT_FRAME_POINTER void fe_mul(fe r, const fe a, const fe b)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3082,9 +3083,9 @@ void fe_mul(fe r, const fe a, const fe b)
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
void fe_sq_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#else
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3370,9 +3371,9 @@ void fe_sq_op()
#else
void fe_sq_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#else
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3509,9 +3510,9 @@ void fe_sq_op()
#endif /* WOLFSSL_ARM_ARCH && WOLFSSL_ARM_ARCH < 6 */
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_sq(fe r_p, const fe a_p)
#else
void fe_sq(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_sq(fe r, const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3536,9 +3537,9 @@ void fe_sq(fe r, const fe a)
#ifdef HAVE_CURVE25519
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul121666(fe r_p, fe a_p)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r_p, fe a_p)
#else
void fe_mul121666(fe r, fe a)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r, fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3620,9 +3621,9 @@ void fe_mul121666(fe r, fe a)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul121666(fe r_p, fe a_p)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r_p, fe a_p)
#else
void fe_mul121666(fe r, fe a)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r, fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3692,9 +3693,10 @@ void fe_mul121666(fe r, fe a)
#endif /* WOLFSSL_ARM_ARCH && WOLFSSL_ARM_ARCH < 6 */
#ifndef WC_NO_CACHE_RESISTANT
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int curve25519(byte* r_p, const byte* n_p, const byte* a_p)
WC_OMIT_FRAME_POINTER int curve25519(byte* r_p, const byte* n_p,
const byte* a_p)
#else
int curve25519(byte* r, const byte* n, const byte* a)
WC_OMIT_FRAME_POINTER int curve25519(byte* r, const byte* n, const byte* a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4094,9 +4096,10 @@ int curve25519(byte* r, const byte* n, const byte* a)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int curve25519(byte* r_p, const byte* n_p, const byte* a_p)
WC_OMIT_FRAME_POINTER int curve25519(byte* r_p, const byte* n_p,
const byte* a_p)
#else
int curve25519(byte* r, const byte* n, const byte* a)
WC_OMIT_FRAME_POINTER int curve25519(byte* r, const byte* n, const byte* a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4421,9 +4424,9 @@ int curve25519(byte* r, const byte* n, const byte* a)
#endif /* HAVE_CURVE25519 */
#ifdef HAVE_ED25519
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_invert(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_invert(fe r_p, const fe a_p)
#else
void fe_invert(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_invert(fe r, const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4604,9 +4607,9 @@ void fe_invert(fe r, const fe a)
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq2(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r_p, const fe a_p)
#else
void fe_sq2(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r, const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4935,9 +4938,9 @@ void fe_sq2(fe r, const fe a)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq2(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r_p, const fe a_p)
#else
void fe_sq2(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r, const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5125,9 +5128,9 @@ void fe_sq2(fe r, const fe a)
#endif /* WOLFSSL_ARM_ARCH && WOLFSSL_ARM_ARCH < 6 */
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_pow22523(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_pow22523(fe r_p, const fe a_p)
#else
void fe_pow22523(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_pow22523(fe r, const fe a)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5307,9 +5310,9 @@ void fe_pow22523(fe r, const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_p1p1_to_p2(ge_p2 * r_p, const ge_p1p1 * p_p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p2(ge_p2 * r_p, const ge_p1p1 * p_p)
#else
void ge_p1p1_to_p2(ge_p2 * r, const ge_p1p1 * p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p2(ge_p2 * r, const ge_p1p1 * p)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5349,9 +5352,9 @@ void ge_p1p1_to_p2(ge_p2 * r, const ge_p1p1 * p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_p1p1_to_p3(ge_p3 * r_p, const ge_p1p1 * p_p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p3(ge_p3 * r_p, const ge_p1p1 * p_p)
#else
void ge_p1p1_to_p3(ge_p3 * r, const ge_p1p1 * p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p3(ge_p3 * r, const ge_p1p1 * p)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5396,9 +5399,9 @@ void ge_p1p1_to_p3(ge_p3 * r, const ge_p1p1 * p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_p2_dbl(ge_p1p1 * r_p, const ge_p2 * p_p)
WC_OMIT_FRAME_POINTER void ge_p2_dbl(ge_p1p1 * r_p, const ge_p2 * p_p)
#else
void ge_p2_dbl(ge_p1p1 * r, const ge_p2 * p)
WC_OMIT_FRAME_POINTER void ge_p2_dbl(ge_p1p1 * r, const ge_p2 * p)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5455,9 +5458,11 @@ void ge_p2_dbl(ge_p1p1 * r, const ge_p2 * p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_madd(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_precomp * q_p)
WC_OMIT_FRAME_POINTER void ge_madd(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_precomp * q_p)
#else
void ge_madd(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
WC_OMIT_FRAME_POINTER void ge_madd(ge_p1p1 * r, const ge_p3 * p,
const ge_precomp * q)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5553,9 +5558,11 @@ void ge_madd(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_msub(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_precomp * q_p)
WC_OMIT_FRAME_POINTER void ge_msub(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_precomp * q_p)
#else
void ge_msub(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
WC_OMIT_FRAME_POINTER void ge_msub(ge_p1p1 * r, const ge_p3 * p,
const ge_precomp * q)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5652,9 +5659,11 @@ void ge_msub(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_add(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_cached* q_p)
WC_OMIT_FRAME_POINTER void ge_add(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_cached* q_p)
#else
void ge_add(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
WC_OMIT_FRAME_POINTER void ge_add(ge_p1p1 * r, const ge_p3 * p,
const ge_cached* q)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5751,9 +5760,11 @@ void ge_add(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_sub(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_cached* q_p)
WC_OMIT_FRAME_POINTER void ge_sub(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_cached* q_p)
#else
void ge_sub(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
WC_OMIT_FRAME_POINTER void ge_sub(ge_p1p1 * r, const ge_p3 * p,
const ge_cached* q)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5851,9 +5862,9 @@ void ge_sub(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_reduce(byte* s_p)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s_p)
#else
void sc_reduce(byte* s)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -6651,9 +6662,9 @@ void sc_reduce(byte* s)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_reduce(byte* s_p)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s_p)
#else
void sc_reduce(byte* s)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -7324,9 +7335,11 @@ void sc_reduce(byte* s)
#ifdef HAVE_ED25519_SIGN
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_muladd(byte* s_p, const byte* a_p, const byte* b_p, const byte* c_p)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s_p, const byte* a_p,
const byte* b_p, const byte* c_p)
#else
void sc_muladd(byte* s, const byte* a, const byte* b, const byte* c)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s, const byte* a, const byte* b,
const byte* c)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -8484,9 +8497,11 @@ void sc_muladd(byte* s, const byte* a, const byte* b, const byte* c)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_muladd(byte* s_p, const byte* a_p, const byte* b_p, const byte* c_p)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s_p, const byte* a_p,
const byte* b_p, const byte* c_p)
#else
void sc_muladd(byte* s, const byte* a, const byte* b, const byte* c)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s, const byte* a, const byte* b,
const byte* c)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -48,6 +48,7 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
#include <wolfssl/wolfcrypt/wc_mlkem.h>
#ifdef WOLFSSL_WC_MLKEM
@@ -87,9 +88,9 @@ static const word16 L_mlkem_arm32_ntt_zetas[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_arm32_ntt(sword16* r_p)
WC_OMIT_FRAME_POINTER void mlkem_arm32_ntt(sword16* r_p)
#else
void mlkem_arm32_ntt(sword16* r)
WC_OMIT_FRAME_POINTER void mlkem_arm32_ntt(sword16* r)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3140,9 +3141,9 @@ static const word16 L_mlkem_invntt_zetas_inv[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_arm32_invntt(sword16* r_p)
WC_OMIT_FRAME_POINTER void mlkem_arm32_invntt(sword16* r_p)
#else
void mlkem_arm32_invntt(sword16* r)
WC_OMIT_FRAME_POINTER void mlkem_arm32_invntt(sword16* r)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -7587,10 +7588,11 @@ static const word16 L_mlkem_basemul_mont_zetas[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_arm32_basemul_mont(sword16* r_p, const sword16* a_p,
const sword16* b_p)
WC_OMIT_FRAME_POINTER void mlkem_arm32_basemul_mont(sword16* r_p,
const sword16* a_p, const sword16* b_p)
#else
void mlkem_arm32_basemul_mont(sword16* r, const sword16* a, const sword16* b)
WC_OMIT_FRAME_POINTER void mlkem_arm32_basemul_mont(sword16* r,
const sword16* a, const sword16* b)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -7892,11 +7894,11 @@ void mlkem_arm32_basemul_mont(sword16* r, const sword16* a, const sword16* b)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_arm32_basemul_mont_add(sword16* r_p, const sword16* a_p,
const sword16* b_p)
WC_OMIT_FRAME_POINTER void mlkem_arm32_basemul_mont_add(sword16* r_p,
const sword16* a_p, const sword16* b_p)
#else
void mlkem_arm32_basemul_mont_add(sword16* r, const sword16* a,
const sword16* b)
WC_OMIT_FRAME_POINTER void mlkem_arm32_basemul_mont_add(sword16* r,
const sword16* a, const sword16* b)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -8232,9 +8234,9 @@ void mlkem_arm32_basemul_mont_add(sword16* r, const sword16* a,
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_arm32_csubq(sword16* p_p)
WC_OMIT_FRAME_POINTER void mlkem_arm32_csubq(sword16* p_p)
#else
void mlkem_arm32_csubq(sword16* p)
WC_OMIT_FRAME_POINTER void mlkem_arm32_csubq(sword16* p)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -8427,11 +8429,11 @@ void mlkem_arm32_csubq(sword16* p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
unsigned int mlkem_arm32_rej_uniform(sword16* p_p, unsigned int len_p,
const byte* r_p, unsigned int rLen_p)
WC_OMIT_FRAME_POINTER unsigned int mlkem_arm32_rej_uniform(sword16* p_p,
unsigned int len_p, const byte* r_p, unsigned int rLen_p)
#else
unsigned int mlkem_arm32_rej_uniform(sword16* p, unsigned int len,
const byte* r, unsigned int rLen)
WC_OMIT_FRAME_POINTER unsigned int mlkem_arm32_rej_uniform(sword16* p,
unsigned int len, const byte* r, unsigned int rLen)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -48,16 +48,17 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
#ifdef HAVE_POLY1305
#include <wolfssl/wolfcrypt/poly1305.h>
#ifdef WOLFSSL_ARMASM_NO_NEON
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_arm32_blocks_16(Poly1305* ctx_p, const byte* m_p, word32 len_p,
int notLast_p)
WC_OMIT_FRAME_POINTER void poly1305_arm32_blocks_16(Poly1305* ctx_p,
const byte* m_p, word32 len_p, int notLast_p)
#else
void poly1305_arm32_blocks_16(Poly1305* ctx, const byte* m, word32 len,
int notLast)
WC_OMIT_FRAME_POINTER void poly1305_arm32_blocks_16(Poly1305* ctx,
const byte* m, word32 len, int notLast)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -295,9 +296,9 @@ static const word32 L_poly1305_arm32_clamp[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_set_key(Poly1305* ctx_p, const byte* key_p)
WC_OMIT_FRAME_POINTER void poly1305_set_key(Poly1305* ctx_p, const byte* key_p)
#else
void poly1305_set_key(Poly1305* ctx, const byte* key)
WC_OMIT_FRAME_POINTER void poly1305_set_key(Poly1305* ctx, const byte* key)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -357,9 +358,9 @@ void poly1305_set_key(Poly1305* ctx, const byte* key)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_final(Poly1305* ctx_p, byte* mac_p)
WC_OMIT_FRAME_POINTER void poly1305_final(Poly1305* ctx_p, byte* mac_p)
#else
void poly1305_final(Poly1305* ctx, byte* mac)
WC_OMIT_FRAME_POINTER void poly1305_final(Poly1305* ctx, byte* mac)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -425,11 +426,11 @@ void poly1305_final(Poly1305* ctx, byte* mac)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_arm32_blocks_16(Poly1305* ctx_p, const byte* m_p, word32 len_p,
int notLast_p)
WC_OMIT_FRAME_POINTER void poly1305_arm32_blocks_16(Poly1305* ctx_p,
const byte* m_p, word32 len_p, int notLast_p)
#else
void poly1305_arm32_blocks_16(Poly1305* ctx, const byte* m, word32 len,
int notLast)
WC_OMIT_FRAME_POINTER void poly1305_arm32_blocks_16(Poly1305* ctx,
const byte* m, word32 len, int notLast)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -663,10 +664,11 @@ void poly1305_arm32_blocks_16(Poly1305* ctx, const byte* m, word32 len,
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_arm32_blocks(Poly1305* ctx_p, const unsigned char* m_p,
size_t bytes_p)
WC_OMIT_FRAME_POINTER void poly1305_arm32_blocks(Poly1305* ctx_p,
const unsigned char* m_p, size_t bytes_p)
#else
void poly1305_arm32_blocks(Poly1305* ctx, const unsigned char* m, size_t bytes)
WC_OMIT_FRAME_POINTER void poly1305_arm32_blocks(Poly1305* ctx,
const unsigned char* m, size_t bytes)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1138,9 +1140,9 @@ static const word32 L_poly1305_arm32_clamp[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_set_key(Poly1305* ctx_p, const byte* key_p)
WC_OMIT_FRAME_POINTER void poly1305_set_key(Poly1305* ctx_p, const byte* key_p)
#else
void poly1305_set_key(Poly1305* ctx, const byte* key)
WC_OMIT_FRAME_POINTER void poly1305_set_key(Poly1305* ctx, const byte* key)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1380,9 +1382,9 @@ void poly1305_set_key(Poly1305* ctx, const byte* key)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_final(Poly1305* ctx_p, byte* mac_p)
WC_OMIT_FRAME_POINTER void poly1305_final(Poly1305* ctx_p, byte* mac_p)
#else
void poly1305_final(Poly1305* ctx, byte* mac)
WC_OMIT_FRAME_POINTER void poly1305_final(Poly1305* ctx, byte* mac)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -48,6 +48,7 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
#ifndef NO_SHA256
#include <wolfssl/wolfcrypt/sha256.h>
@@ -74,9 +75,11 @@ static const word32 L_SHA256_transform_len_k[] = {
void Transform_Sha256_Len(wc_Sha256* sha256_p, const byte* data_p,
word32 len_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void Transform_Sha256_Len(wc_Sha256* sha256_p, const byte* data_p, word32 len_p)
WC_OMIT_FRAME_POINTER void Transform_Sha256_Len(wc_Sha256* sha256_p,
const byte* data_p, word32 len_p)
#else
void Transform_Sha256_Len(wc_Sha256* sha256, const byte* data, word32 len)
WC_OMIT_FRAME_POINTER void Transform_Sha256_Len(wc_Sha256* sha256,
const byte* data, word32 len)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1777,9 +1780,11 @@ static const word32 L_SHA256_transform_neon_len_k[] = {
void Transform_Sha256_Len(wc_Sha256* sha256_p, const byte* data_p,
word32 len_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void Transform_Sha256_Len(wc_Sha256* sha256_p, const byte* data_p, word32 len_p)
WC_OMIT_FRAME_POINTER void Transform_Sha256_Len(wc_Sha256* sha256_p,
const byte* data_p, word32 len_p)
#else
void Transform_Sha256_Len(wc_Sha256* sha256, const byte* data, word32 len)
WC_OMIT_FRAME_POINTER void Transform_Sha256_Len(wc_Sha256* sha256,
const byte* data, word32 len)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -48,6 +48,7 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
#ifdef WOLFSSL_SHA3
#ifndef WOLFSSL_ARMASM_NO_NEON
static const word64 L_sha3_arm2_neon_rt[] = {
@@ -68,9 +69,9 @@ static const word64 L_sha3_arm2_neon_rt[] = {
#include <wolfssl/wolfcrypt/sha3.h>
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void BlockSha3(word64* state_p)
WC_OMIT_FRAME_POINTER void BlockSha3(word64* state_p)
#else
void BlockSha3(word64* state)
WC_OMIT_FRAME_POINTER void BlockSha3(word64* state)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -377,9 +378,9 @@ static const word64 L_sha3_arm2_rt[] = {
#include <wolfssl/wolfcrypt/sha3.h>
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void BlockSha3(word64* state_p)
WC_OMIT_FRAME_POINTER void BlockSha3(word64* state_p)
#else
void BlockSha3(word64* state)
WC_OMIT_FRAME_POINTER void BlockSha3(word64* state)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -48,6 +48,7 @@
#define __volatile__
#define WOLFSSL_NO_VAR_ASSIGN_REG
#endif /* __ghs__ */
#if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
#include <wolfssl/wolfcrypt/sha512.h>
@@ -98,9 +99,11 @@ static const word64 L_SHA512_transform_len_k[] = {
void Transform_Sha512_Len(wc_Sha512* sha512_p, const byte* data_p,
word32 len_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void Transform_Sha512_Len(wc_Sha512* sha512_p, const byte* data_p, word32 len_p)
WC_OMIT_FRAME_POINTER void Transform_Sha512_Len(wc_Sha512* sha512_p,
const byte* data_p, word32 len_p)
#else
void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len)
WC_OMIT_FRAME_POINTER void Transform_Sha512_Len(wc_Sha512* sha512,
const byte* data, word32 len)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -7593,9 +7596,11 @@ static const word64 L_SHA512_transform_neon_len_k[] = {
void Transform_Sha512_Len(wc_Sha512* sha512_p, const byte* data_p,
word32 len_p);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void Transform_Sha512_Len(wc_Sha512* sha512_p, const byte* data_p, word32 len_p)
WC_OMIT_FRAME_POINTER void Transform_Sha512_Len(wc_Sha512* sha512_p,
const byte* data_p, word32 len_p)
#else
void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len)
WC_OMIT_FRAME_POINTER void Transform_Sha512_Len(wc_Sha512* sha512,
const byte* data, word32 len)
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG

View File

@@ -41,6 +41,7 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
#ifndef NO_AES
#include <wolfssl/wolfcrypt/aes.h>
@@ -197,9 +198,9 @@ static const word32* L_AES_Thumb2_te = L_AES_Thumb2_te_data;
#ifdef HAVE_AES_DECRYPT
void AES_invert_key(unsigned char* ks, word32 rounds);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_invert_key(unsigned char* ks_p, word32 rounds_p)
WC_OMIT_FRAME_POINTER void AES_invert_key(unsigned char* ks_p, word32 rounds_p)
#else
void AES_invert_key(unsigned char* ks, word32 rounds)
WC_OMIT_FRAME_POINTER void AES_invert_key(unsigned char* ks, word32 rounds)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -343,11 +344,11 @@ XALIGNED(16) static const word32 L_AES_Thumb2_rcon[] = {
void AES_set_encrypt_key(const unsigned char* key, word32 len,
unsigned char* ks);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_set_encrypt_key(const unsigned char* key_p, word32 len_p,
unsigned char* ks_p)
WC_OMIT_FRAME_POINTER void AES_set_encrypt_key(const unsigned char* key_p,
word32 len_p, unsigned char* ks_p)
#else
void AES_set_encrypt_key(const unsigned char* key, word32 len,
unsigned char* ks)
WC_OMIT_FRAME_POINTER void AES_set_encrypt_key(const unsigned char* key,
word32 len, unsigned char* ks)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -638,10 +639,11 @@ void AES_set_encrypt_key(const unsigned char* key, word32 len,
void AES_encrypt_block(const word32* te, int nr, int len, const word32* ks);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_encrypt_block(const word32* te_p, int nr_p, int len_p,
const word32* ks_p)
WC_OMIT_FRAME_POINTER void AES_encrypt_block(const word32* te_p, int nr_p,
int len_p, const word32* ks_p)
#else
void AES_encrypt_block(const word32* te, int nr, int len, const word32* ks)
WC_OMIT_FRAME_POINTER void AES_encrypt_block(const word32* te, int nr, int len,
const word32* ks)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -882,11 +884,12 @@ static const word32* L_AES_Thumb2_te_ecb = L_AES_Thumb2_te_data;
void AES_ECB_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_ECB_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p)
WC_OMIT_FRAME_POINTER void AES_ECB_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p)
#else
void AES_ECB_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr)
WC_OMIT_FRAME_POINTER void AES_ECB_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1105,12 +1108,13 @@ void AES_ECB_encrypt(const unsigned char* in, unsigned char* out,
void AES_CBC_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* iv);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_CBC_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* iv_p)
WC_OMIT_FRAME_POINTER void AES_CBC_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* iv_p)
#else
void AES_CBC_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* iv)
WC_OMIT_FRAME_POINTER void AES_CBC_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* iv)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1349,12 +1353,13 @@ void AES_CBC_encrypt(const unsigned char* in, unsigned char* out,
void AES_CTR_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_CTR_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* ctr_p)
WC_OMIT_FRAME_POINTER void AES_CTR_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* ctr_p)
#else
void AES_CTR_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr)
WC_OMIT_FRAME_POINTER void AES_CTR_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* ctr)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1615,9 +1620,11 @@ void AES_CTR_encrypt(const unsigned char* in, unsigned char* out,
defined(HAVE_AES_CBC)
void AES_decrypt_block(const word32* td, int nr, const byte* td4);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_decrypt_block(const word32* td_p, int nr_p, const byte* td4_p)
WC_OMIT_FRAME_POINTER void AES_decrypt_block(const word32* td_p, int nr_p,
const byte* td4_p)
#else
void AES_decrypt_block(const word32* td, int nr, const byte* td4)
WC_OMIT_FRAME_POINTER void AES_decrypt_block(const word32* td, int nr,
const byte* td4)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1887,11 +1894,12 @@ static const byte L_AES_Thumb2_td4[] = {
void AES_ECB_decrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_ECB_decrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p)
WC_OMIT_FRAME_POINTER void AES_ECB_decrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p)
#else
void AES_ECB_decrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr)
WC_OMIT_FRAME_POINTER void AES_ECB_decrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2112,12 +2120,13 @@ void AES_ECB_decrypt(const unsigned char* in, unsigned char* out,
void AES_CBC_decrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* iv);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_CBC_decrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* iv_p)
WC_OMIT_FRAME_POINTER void AES_CBC_decrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* iv_p)
#else
void AES_CBC_decrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* iv)
WC_OMIT_FRAME_POINTER void AES_CBC_decrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* iv)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2533,11 +2542,11 @@ XALIGNED(16) static const word32 L_GCM_gmult_len_r[] = {
void GCM_gmult_len(unsigned char* x, const unsigned char** m,
const unsigned char* data, unsigned long len);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void GCM_gmult_len(unsigned char* x_p, const unsigned char** m_p,
const unsigned char* data_p, unsigned long len_p)
WC_OMIT_FRAME_POINTER void GCM_gmult_len(unsigned char* x_p,
const unsigned char** m_p, const unsigned char* data_p, unsigned long len_p)
#else
void GCM_gmult_len(unsigned char* x, const unsigned char** m,
const unsigned char* data, unsigned long len)
WC_OMIT_FRAME_POINTER void GCM_gmult_len(unsigned char* x,
const unsigned char** m, const unsigned char* data, unsigned long len)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3126,12 +3135,13 @@ static const word32* L_AES_Thumb2_te_gcm = L_AES_Thumb2_te_data;
void AES_GCM_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void AES_GCM_encrypt(const unsigned char* in_p, unsigned char* out_p,
unsigned long len_p, const unsigned char* ks_p, int nr_p,
unsigned char* ctr_p)
WC_OMIT_FRAME_POINTER void AES_GCM_encrypt(const unsigned char* in_p,
unsigned char* out_p, unsigned long len_p, const unsigned char* ks_p,
int nr_p, unsigned char* ctr_p)
#else
void AES_GCM_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr)
WC_OMIT_FRAME_POINTER void AES_GCM_encrypt(const unsigned char* in,
unsigned char* out, unsigned long len, const unsigned char* ks, int nr,
unsigned char* ctr)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3381,4 +3391,5 @@ void AES_GCM_encrypt(const unsigned char* in, unsigned char* out,
#endif /* !NO_AES */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -41,13 +41,16 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
#ifdef HAVE_CHACHA
#include <wolfssl/wolfcrypt/chacha.h>
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_setiv(word32* x_p, const byte* iv_p, word32 counter_p)
WC_OMIT_FRAME_POINTER void wc_chacha_setiv(word32* x_p, const byte* iv_p,
word32 counter_p)
#else
void wc_chacha_setiv(word32* x, const byte* iv, word32 counter)
WC_OMIT_FRAME_POINTER void wc_chacha_setiv(word32* x, const byte* iv,
word32 counter)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -80,9 +83,11 @@ XALIGNED(16) static const word32 L_chacha_thumb2_constants[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_setkey(word32* x_p, const byte* key_p, word32 keySz_p)
WC_OMIT_FRAME_POINTER void wc_chacha_setkey(word32* x_p, const byte* key_p,
word32 keySz_p)
#else
void wc_chacha_setkey(word32* x, const byte* key, word32 keySz)
WC_OMIT_FRAME_POINTER void wc_chacha_setkey(word32* x, const byte* key,
word32 keySz)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -146,10 +151,11 @@ void wc_chacha_setkey(word32* x, const byte* key, word32 keySz)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_crypt_bytes(ChaCha* ctx_p, byte* c_p, const byte* m_p,
word32 len_p)
WC_OMIT_FRAME_POINTER void wc_chacha_crypt_bytes(ChaCha* ctx_p, byte* c_p,
const byte* m_p, word32 len_p)
#else
void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
WC_OMIT_FRAME_POINTER void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c,
const byte* m, word32 len)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -585,10 +591,11 @@ void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void wc_chacha_use_over(byte* over_p, byte* output_p, const byte* input_p,
word32 len_p)
WC_OMIT_FRAME_POINTER void wc_chacha_use_over(byte* over_p, byte* output_p,
const byte* input_p, word32 len_p)
#else
void wc_chacha_use_over(byte* over, byte* output, const byte* input, word32 len)
WC_OMIT_FRAME_POINTER void wc_chacha_use_over(byte* over, byte* output,
const byte* input, word32 len)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -730,4 +737,5 @@ void wc_chacha_use_over(byte* over, byte* output, const byte* input, word32 len)
#endif /* HAVE_CHACHA */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -41,6 +41,7 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
/* Based on work by: Emil Lenngren
* https://github.com/pornin/X25519-Cortex-M4
*/
@@ -53,9 +54,9 @@
#if !defined(CURVE25519_SMALL) || !defined(ED25519_SMALL)
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_init()
WC_OMIT_FRAME_POINTER void fe_init()
#else
void fe_init()
WC_OMIT_FRAME_POINTER void fe_init()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -70,9 +71,9 @@ void fe_init()
void fe_add_sub_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_add_sub_op()
WC_OMIT_FRAME_POINTER void fe_add_sub_op()
#else
void fe_add_sub_op()
WC_OMIT_FRAME_POINTER void fe_add_sub_op()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -173,9 +174,9 @@ void fe_add_sub_op()
void fe_sub_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sub_op()
WC_OMIT_FRAME_POINTER void fe_sub_op()
#else
void fe_sub_op()
WC_OMIT_FRAME_POINTER void fe_sub_op()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -213,9 +214,9 @@ void fe_sub_op()
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sub(fe r_p, const fe a_p, const fe b_p)
WC_OMIT_FRAME_POINTER void fe_sub(fe r_p, const fe a_p, const fe b_p)
#else
void fe_sub(fe r, const fe a, const fe b)
WC_OMIT_FRAME_POINTER void fe_sub(fe r, const fe a, const fe b)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -235,9 +236,9 @@ void fe_sub(fe r, const fe a, const fe b)
void fe_add_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_add_op()
WC_OMIT_FRAME_POINTER void fe_add_op()
#else
void fe_add_op()
WC_OMIT_FRAME_POINTER void fe_add_op()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -275,9 +276,9 @@ void fe_add_op()
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_add(fe r_p, const fe a_p, const fe b_p)
WC_OMIT_FRAME_POINTER void fe_add(fe r_p, const fe a_p, const fe b_p)
#else
void fe_add(fe r, const fe a, const fe b)
WC_OMIT_FRAME_POINTER void fe_add(fe r, const fe a, const fe b)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -297,9 +298,9 @@ void fe_add(fe r, const fe a, const fe b)
#ifdef HAVE_ED25519
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_frombytes(fe out_p, const unsigned char* in_p)
WC_OMIT_FRAME_POINTER void fe_frombytes(fe out_p, const unsigned char* in_p)
#else
void fe_frombytes(fe out, const unsigned char* in)
WC_OMIT_FRAME_POINTER void fe_frombytes(fe out, const unsigned char* in)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -333,9 +334,9 @@ void fe_frombytes(fe out, const unsigned char* in)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_tobytes(unsigned char* out_p, const fe n_p)
WC_OMIT_FRAME_POINTER void fe_tobytes(unsigned char* out_p, const fe n_p)
#else
void fe_tobytes(unsigned char* out, const fe n)
WC_OMIT_FRAME_POINTER void fe_tobytes(unsigned char* out, const fe n)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -379,9 +380,9 @@ void fe_tobytes(unsigned char* out, const fe n)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_1(fe n_p)
WC_OMIT_FRAME_POINTER void fe_1(fe n_p)
#else
void fe_1(fe n)
WC_OMIT_FRAME_POINTER void fe_1(fe n)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -406,9 +407,9 @@ void fe_1(fe n)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_0(fe n_p)
WC_OMIT_FRAME_POINTER void fe_0(fe n_p)
#else
void fe_0(fe n)
WC_OMIT_FRAME_POINTER void fe_0(fe n)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -433,9 +434,9 @@ void fe_0(fe n)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_copy(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_copy(fe r_p, const fe a_p)
#else
void fe_copy(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_copy(fe r, const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -460,9 +461,9 @@ void fe_copy(fe r, const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_neg(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_neg(fe r_p, const fe a_p)
#else
void fe_neg(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_neg(fe r, const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -493,9 +494,9 @@ void fe_neg(fe r, const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int fe_isnonzero(const fe a_p)
WC_OMIT_FRAME_POINTER int fe_isnonzero(const fe a_p)
#else
int fe_isnonzero(const fe a)
WC_OMIT_FRAME_POINTER int fe_isnonzero(const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -539,9 +540,9 @@ int fe_isnonzero(const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int fe_isnegative(const fe a_p)
WC_OMIT_FRAME_POINTER int fe_isnegative(const fe a_p)
#else
int fe_isnegative(const fe a)
WC_OMIT_FRAME_POINTER int fe_isnegative(const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -573,9 +574,9 @@ int fe_isnegative(const fe a)
#if defined(HAVE_ED25519_MAKE_KEY) || defined(HAVE_ED25519_SIGN)
#ifndef WC_NO_CACHE_RESISTANT
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
#else
void fe_cmov_table(fe* r, fe* base, signed char b)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r, fe* base, signed char b)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1557,9 +1558,9 @@ void fe_cmov_table(fe* r, fe* base, signed char b)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r_p, fe* base_p, signed char b_p)
#else
void fe_cmov_table(fe* r, fe* base, signed char b)
WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r, fe* base, signed char b)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1674,9 +1675,9 @@ void fe_cmov_table(fe* r, fe* base, signed char b)
#ifdef WOLFSSL_ARM_ARCH_7M
void fe_mul_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#else
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2060,9 +2061,9 @@ void fe_mul_op()
#else
void fe_mul_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#else
void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2199,9 +2200,9 @@ void fe_mul_op()
#endif /* WOLFSSL_ARM_ARCH_7M */
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul(fe r_p, const fe a_p, const fe b_p)
WC_OMIT_FRAME_POINTER void fe_mul(fe r_p, const fe a_p, const fe b_p)
#else
void fe_mul(fe r, const fe a, const fe b)
WC_OMIT_FRAME_POINTER void fe_mul(fe r, const fe a, const fe b)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2222,9 +2223,9 @@ void fe_mul(fe r, const fe a, const fe b)
#ifdef WOLFSSL_ARM_ARCH_7M
void fe_sq_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#else
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2501,9 +2502,9 @@ void fe_sq_op()
#else
void fe_sq_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#else
void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op()
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2626,9 +2627,9 @@ void fe_sq_op()
#endif /* WOLFSSL_ARM_ARCH_7M */
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_sq(fe r_p, const fe a_p)
#else
void fe_sq(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_sq(fe r, const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2648,9 +2649,9 @@ void fe_sq(fe r, const fe a)
#ifdef HAVE_CURVE25519
#ifdef WOLFSSL_ARM_ARCH_7M
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul121666(fe r_p, fe a_p)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r_p, fe a_p)
#else
void fe_mul121666(fe r, fe a)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r, fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2708,9 +2709,9 @@ void fe_mul121666(fe r, fe a)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_mul121666(fe r_p, fe a_p)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r_p, fe a_p)
#else
void fe_mul121666(fe r, fe a)
WC_OMIT_FRAME_POINTER void fe_mul121666(fe r, fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -2756,9 +2757,10 @@ void fe_mul121666(fe r, fe a)
#endif /* WOLFSSL_ARM_ARCH_7M */
#ifndef WC_NO_CACHE_RESISTANT
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int curve25519(byte* r_p, const byte* n_p, const byte* a_p)
WC_OMIT_FRAME_POINTER int curve25519(byte* r_p, const byte* n_p,
const byte* a_p)
#else
int curve25519(byte* r, const byte* n, const byte* a)
WC_OMIT_FRAME_POINTER int curve25519(byte* r, const byte* n, const byte* a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3253,9 +3255,10 @@ int curve25519(byte* r, const byte* n, const byte* a)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
int curve25519(byte* r_p, const byte* n_p, const byte* a_p)
WC_OMIT_FRAME_POINTER int curve25519(byte* r_p, const byte* n_p,
const byte* a_p)
#else
int curve25519(byte* r, const byte* n, const byte* a)
WC_OMIT_FRAME_POINTER int curve25519(byte* r, const byte* n, const byte* a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3662,9 +3665,9 @@ int curve25519(byte* r, const byte* n, const byte* a)
#endif /* HAVE_CURVE25519 */
#ifdef HAVE_ED25519
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_invert(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_invert(fe r_p, const fe a_p)
#else
void fe_invert(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_invert(fe r, const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3920,9 +3923,9 @@ void fe_invert(fe r, const fe a)
#ifdef WOLFSSL_ARM_ARCH_7M
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq2(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r_p, const fe a_p)
#else
void fe_sq2(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r, const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4234,9 +4237,9 @@ void fe_sq2(fe r, const fe a)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_sq2(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r_p, const fe a_p)
#else
void fe_sq2(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_sq2(fe r, const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4397,9 +4400,9 @@ void fe_sq2(fe r, const fe a)
#endif /* WOLFSSL_ARM_ARCH_7M */
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void fe_pow22523(fe r_p, const fe a_p)
WC_OMIT_FRAME_POINTER void fe_pow22523(fe r_p, const fe a_p)
#else
void fe_pow22523(fe r, const fe a)
WC_OMIT_FRAME_POINTER void fe_pow22523(fe r, const fe a)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4654,9 +4657,9 @@ void fe_pow22523(fe r, const fe a)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_p1p1_to_p2(ge_p2 * r_p, const ge_p1p1 * p_p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p2(ge_p2 * r_p, const ge_p1p1 * p_p)
#else
void ge_p1p1_to_p2(ge_p2 * r, const ge_p1p1 * p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p2(ge_p2 * r, const ge_p1p1 * p)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4691,9 +4694,9 @@ void ge_p1p1_to_p2(ge_p2 * r, const ge_p1p1 * p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_p1p1_to_p3(ge_p3 * r_p, const ge_p1p1 * p_p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p3(ge_p3 * r_p, const ge_p1p1 * p_p)
#else
void ge_p1p1_to_p3(ge_p3 * r, const ge_p1p1 * p)
WC_OMIT_FRAME_POINTER void ge_p1p1_to_p3(ge_p3 * r, const ge_p1p1 * p)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4733,9 +4736,9 @@ void ge_p1p1_to_p3(ge_p3 * r, const ge_p1p1 * p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_p2_dbl(ge_p1p1 * r_p, const ge_p2 * p_p)
WC_OMIT_FRAME_POINTER void ge_p2_dbl(ge_p1p1 * r_p, const ge_p2 * p_p)
#else
void ge_p2_dbl(ge_p1p1 * r, const ge_p2 * p)
WC_OMIT_FRAME_POINTER void ge_p2_dbl(ge_p1p1 * r, const ge_p2 * p)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4787,9 +4790,11 @@ void ge_p2_dbl(ge_p1p1 * r, const ge_p2 * p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_madd(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_precomp * q_p)
WC_OMIT_FRAME_POINTER void ge_madd(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_precomp * q_p)
#else
void ge_madd(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
WC_OMIT_FRAME_POINTER void ge_madd(ge_p1p1 * r, const ge_p3 * p,
const ge_precomp * q)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4876,9 +4881,11 @@ void ge_madd(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_msub(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_precomp * q_p)
WC_OMIT_FRAME_POINTER void ge_msub(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_precomp * q_p)
#else
void ge_msub(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
WC_OMIT_FRAME_POINTER void ge_msub(ge_p1p1 * r, const ge_p3 * p,
const ge_precomp * q)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -4966,9 +4973,11 @@ void ge_msub(ge_p1p1 * r, const ge_p3 * p, const ge_precomp * q)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_add(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_cached* q_p)
WC_OMIT_FRAME_POINTER void ge_add(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_cached* q_p)
#else
void ge_add(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
WC_OMIT_FRAME_POINTER void ge_add(ge_p1p1 * r, const ge_p3 * p,
const ge_cached* q)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5056,9 +5065,11 @@ void ge_add(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void ge_sub(ge_p1p1 * r_p, const ge_p3 * p_p, const ge_cached* q_p)
WC_OMIT_FRAME_POINTER void ge_sub(ge_p1p1 * r_p, const ge_p3 * p_p,
const ge_cached* q_p)
#else
void ge_sub(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
WC_OMIT_FRAME_POINTER void ge_sub(ge_p1p1 * r, const ge_p3 * p,
const ge_cached* q)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5147,9 +5158,9 @@ void ge_sub(ge_p1p1 * r, const ge_p3 * p, const ge_cached* q)
#ifdef WOLFSSL_ARM_ARCH_7M
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_reduce(byte* s_p)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s_p)
#else
void sc_reduce(byte* s)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5582,9 +5593,9 @@ void sc_reduce(byte* s)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_reduce(byte* s_p)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s_p)
#else
void sc_reduce(byte* s)
WC_OMIT_FRAME_POINTER void sc_reduce(byte* s)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -5890,9 +5901,11 @@ void sc_reduce(byte* s)
#ifdef HAVE_ED25519_SIGN
#ifdef WOLFSSL_ARM_ARCH_7M
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_muladd(byte* s_p, const byte* a_p, const byte* b_p, const byte* c_p)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s_p, const byte* a_p,
const byte* b_p, const byte* c_p)
#else
void sc_muladd(byte* s, const byte* a, const byte* b, const byte* c)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s, const byte* a, const byte* b,
const byte* c)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -6685,9 +6698,11 @@ void sc_muladd(byte* s, const byte* a, const byte* b, const byte* c)
#else
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void sc_muladd(byte* s_p, const byte* a_p, const byte* b_p, const byte* c_p)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s_p, const byte* a_p,
const byte* b_p, const byte* c_p)
#else
void sc_muladd(byte* s, const byte* a, const byte* b, const byte* c)
WC_OMIT_FRAME_POINTER void sc_muladd(byte* s, const byte* a, const byte* b,
const byte* c)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -7130,4 +7145,5 @@ void sc_muladd(byte* s, const byte* a, const byte* b, const byte* c)
#endif /* HAVE_CURVE25519 || HAVE_ED25519 */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -41,6 +41,7 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
#include <wolfssl/wolfcrypt/wc_mlkem.h>
#ifdef WOLFSSL_WC_MLKEM
@@ -64,9 +65,9 @@ XALIGNED(16) static const word16 L_mlkem_thumb2_ntt_zetas[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_thumb2_ntt(sword16* r_p)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_ntt(sword16* r_p)
#else
void mlkem_thumb2_ntt(sword16* r)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_ntt(sword16* r)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1387,9 +1388,9 @@ XALIGNED(16) static const word16 L_mlkem_invntt_zetas_inv[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_thumb2_invntt(sword16* r_p)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_invntt(sword16* r_p)
#else
void mlkem_thumb2_invntt(sword16* r)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_invntt(sword16* r)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3077,10 +3078,11 @@ XALIGNED(16) static const word16 L_mlkem_basemul_mont_zetas[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_thumb2_basemul_mont(sword16* r_p, const sword16* a_p,
const sword16* b_p)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_basemul_mont(sword16* r_p,
const sword16* a_p, const sword16* b_p)
#else
void mlkem_thumb2_basemul_mont(sword16* r, const sword16* a, const sword16* b)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_basemul_mont(sword16* r,
const sword16* a, const sword16* b)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3227,11 +3229,11 @@ void mlkem_thumb2_basemul_mont(sword16* r, const sword16* a, const sword16* b)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_thumb2_basemul_mont_add(sword16* r_p, const sword16* a_p,
const sword16* b_p)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_basemul_mont_add(sword16* r_p,
const sword16* a_p, const sword16* b_p)
#else
void mlkem_thumb2_basemul_mont_add(sword16* r, const sword16* a,
const sword16* b)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_basemul_mont_add(sword16* r,
const sword16* a, const sword16* b)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3390,9 +3392,9 @@ void mlkem_thumb2_basemul_mont_add(sword16* r, const sword16* a,
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void mlkem_thumb2_csubq(sword16* p_p)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_csubq(sword16* p_p)
#else
void mlkem_thumb2_csubq(sword16* p)
WC_OMIT_FRAME_POINTER void mlkem_thumb2_csubq(sword16* p)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3503,11 +3505,11 @@ void mlkem_thumb2_csubq(sword16* p)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
unsigned int mlkem_thumb2_rej_uniform(sword16* p_p, unsigned int len_p,
const byte* r_p, unsigned int rLen_p)
WC_OMIT_FRAME_POINTER unsigned int mlkem_thumb2_rej_uniform(sword16* p_p,
unsigned int len_p, const byte* r_p, unsigned int rLen_p)
#else
unsigned int mlkem_thumb2_rej_uniform(sword16* p, unsigned int len,
const byte* r, unsigned int rLen)
WC_OMIT_FRAME_POINTER unsigned int mlkem_thumb2_rej_uniform(sword16* p,
unsigned int len, const byte* r, unsigned int rLen)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3856,4 +3858,5 @@ unsigned int mlkem_thumb2_rej_uniform(sword16* p, unsigned int len,
#endif /* WOLFSSL_WC_MLKEM */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -41,15 +41,16 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
#ifdef HAVE_POLY1305
#include <wolfssl/wolfcrypt/poly1305.h>
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_blocks_thumb2_16(Poly1305* ctx_p, const byte* m_p, word32 len_p,
int notLast_p)
WC_OMIT_FRAME_POINTER void poly1305_blocks_thumb2_16(Poly1305* ctx_p,
const byte* m_p, word32 len_p, int notLast_p)
#else
void poly1305_blocks_thumb2_16(Poly1305* ctx, const byte* m, word32 len,
int notLast)
WC_OMIT_FRAME_POINTER void poly1305_blocks_thumb2_16(Poly1305* ctx,
const byte* m, word32 len, int notLast)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -301,9 +302,9 @@ XALIGNED(16) static const word32 L_poly1305_thumb2_clamp[] = {
};
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_set_key(Poly1305* ctx_p, const byte* key_p)
WC_OMIT_FRAME_POINTER void poly1305_set_key(Poly1305* ctx_p, const byte* key_p)
#else
void poly1305_set_key(Poly1305* ctx, const byte* key)
WC_OMIT_FRAME_POINTER void poly1305_set_key(Poly1305* ctx, const byte* key)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -358,9 +359,9 @@ void poly1305_set_key(Poly1305* ctx, const byte* key)
}
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void poly1305_final(Poly1305* ctx_p, byte* mac_p)
WC_OMIT_FRAME_POINTER void poly1305_final(Poly1305* ctx_p, byte* mac_p)
#else
void poly1305_final(Poly1305* ctx, byte* mac)
WC_OMIT_FRAME_POINTER void poly1305_final(Poly1305* ctx, byte* mac)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -422,4 +423,5 @@ void poly1305_final(Poly1305* ctx, byte* mac)
#endif /* HAVE_POLY1305 */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -41,6 +41,7 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
#ifndef NO_SHA256
#include <wolfssl/wolfcrypt/sha256.h>
@@ -66,9 +67,11 @@ XALIGNED(16) static const word32 L_SHA256_transform_len_k[] = {
void Transform_Sha256_Len(wc_Sha256* sha256, const byte* data, word32 len);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void Transform_Sha256_Len(wc_Sha256* sha256_p, const byte* data_p, word32 len_p)
WC_OMIT_FRAME_POINTER void Transform_Sha256_Len(wc_Sha256* sha256_p,
const byte* data_p, word32 len_p)
#else
void Transform_Sha256_Len(wc_Sha256* sha256, const byte* data, word32 len)
WC_OMIT_FRAME_POINTER void Transform_Sha256_Len(wc_Sha256* sha256,
const byte* data, word32 len)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1476,4 +1479,5 @@ void Transform_Sha256_Len(wc_Sha256* sha256, const byte* data, word32 len)
#endif /* !NO_SHA256 */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -41,6 +41,7 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
#ifdef WOLFSSL_SHA3
static const word64 L_sha3_thumb2_rt[] = {
0x0000000000000001UL, 0x0000000000008082UL,
@@ -60,9 +61,9 @@ static const word64 L_sha3_thumb2_rt[] = {
#include <wolfssl/wolfcrypt/sha3.h>
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void BlockSha3(word64* state_p)
WC_OMIT_FRAME_POINTER void BlockSha3(word64* state_p)
#else
void BlockSha3(word64* state)
WC_OMIT_FRAME_POINTER void BlockSha3(word64* state)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -1162,4 +1163,5 @@ void BlockSha3(word64* state)
#endif /* WOLFSSL_SHA3 */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -41,6 +41,7 @@
#define __asm__ __asm
#define __volatile__ volatile
#endif /* __KEIL__ */
#if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
#include <wolfssl/wolfcrypt/sha512.h>
@@ -90,9 +91,11 @@ static const word64 L_SHA512_transform_len_k[] = {
void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
void Transform_Sha512_Len(wc_Sha512* sha512_p, const byte* data_p, word32 len_p)
WC_OMIT_FRAME_POINTER void Transform_Sha512_Len(wc_Sha512* sha512_p,
const byte* data_p, word32 len_p)
#else
void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len)
WC_OMIT_FRAME_POINTER void Transform_Sha512_Len(wc_Sha512* sha512,
const byte* data, word32 len)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
@@ -3591,4 +3594,5 @@ void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len)
#endif /* WOLFSSL_SHA512 || WOLFSSL_SHA384 */
#endif /* WOLFSSL_ARMASM_THUMB2 */
#endif /* WOLFSSL_ARMASM */
#endif /* WOLFSSL_ARMASM_INLINE */

View File

@@ -452,8 +452,8 @@ static WC_INLINE void AddLength(wc_Sha256* sha256, word32 len)
* @param [in] data Buffer of data to hash.
* @param [in] blocks Number of blocks of data to hash.
*/
static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
word32 blocks)
static WC_OMIT_FRAME_POINTER WC_INLINE void Sha256Transform(wc_Sha256* sha256,
const byte* data, word32 blocks)
{
word32* k = (word32*)K;
@@ -567,6 +567,7 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10",
"s11"
);
}
#else

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -138,6 +138,15 @@
#endif
#endif
#ifndef WC_OMIT_FRAME_POINTER
#if defined(__GNUC__)
#define WC_OMIT_FRAME_POINTER \
__attribute__((optimize("-fomit-frame-pointer")))
#else
#define WC_OMIT_FRAME_POINTER
#endif
#endif
/* THREADING/MUTEX SECTION */
#if defined(SINGLE_THREADED) && defined(NO_FILESYSTEM)
/* No system headers required for build. */