SP label noinline: function inlined even when asked not to

The label L_521_mont_reduce_9_nomask is therefore appearing more than
once in the compiled code.
Adding '%=' to the end of the label ensure it has a unique number
appended to it even when inlined.
This commit is contained in:
Sean Parkinson
2025-11-10 19:58:16 +10:00
parent 9c1526c90d
commit b7ade58c52
2 changed files with 2 additions and 5 deletions

View File

@@ -79921,7 +79921,6 @@ WC_OMIT_FRAME_POINTER static int sp_256_num_bits_8(const sp_digit* a)
#else
register byte* L_sp_256_num_bits_8_table_c =
(byte*)&L_sp_256_num_bits_8_table;
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
__asm__ __volatile__ (
@@ -97962,7 +97961,6 @@ WC_OMIT_FRAME_POINTER static int sp_384_num_bits_12(const sp_digit* a)
#else
register byte* L_sp_384_num_bits_12_table_c =
(byte*)&L_sp_384_num_bits_12_table;
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
__asm__ __volatile__ (
@@ -126513,7 +126511,6 @@ WC_OMIT_FRAME_POINTER static int sp_521_num_bits_17(const sp_digit* a)
#else
register byte* L_sp_521_num_bits_17_table_c =
(byte*)&L_sp_521_num_bits_17_table;
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
__asm__ __volatile__ (

View File

@@ -71095,9 +71095,9 @@ SP_NOINLINE static void sp_521_mont_reduce_9(sp_digit* a, const sp_digit* m,
"# mu = a[i] * mp\n\t"
"mul x9, %[mp], x13\n\t"
"cmp x4, #1\n\t"
"b.ne L_521_mont_reduce_9_nomask\n\t"
"b.ne L_521_mont_reduce_9_nomask_%=\n\t"
"and x9, x9, #0x1ff\n\t"
"L_521_mont_reduce_9_nomask:\n\t"
"L_521_mont_reduce_9_nomask_%=:\n\t"
"# a[i+0] += m[0] * mu\n\t"
"ldp x10, x11, [%[m], 0]\n\t"
"mul x7, x10, x9\n\t"