Skip to content

Commit b7ade58

Browse files
committed
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.
1 parent 9c1526c commit b7ade58

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

wolfcrypt/src/sp_arm32.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79921,7 +79921,6 @@ WC_OMIT_FRAME_POINTER static int sp_256_num_bits_8(const sp_digit* a)
7992179921
#else
7992279922
register byte* L_sp_256_num_bits_8_table_c =
7992379923
(byte*)&L_sp_256_num_bits_8_table;
79924-
7992579924
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
7992679925

7992779926
__asm__ __volatile__ (
@@ -97962,7 +97961,6 @@ WC_OMIT_FRAME_POINTER static int sp_384_num_bits_12(const sp_digit* a)
9796297961
#else
9796397962
register byte* L_sp_384_num_bits_12_table_c =
9796497963
(byte*)&L_sp_384_num_bits_12_table;
97965-
9796697964
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
9796797965

9796897966
__asm__ __volatile__ (
@@ -126513,7 +126511,6 @@ WC_OMIT_FRAME_POINTER static int sp_521_num_bits_17(const sp_digit* a)
126513126511
#else
126514126512
register byte* L_sp_521_num_bits_17_table_c =
126515126513
(byte*)&L_sp_521_num_bits_17_table;
126516-
126517126514
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
126518126515

126519126516
__asm__ __volatile__ (

wolfcrypt/src/sp_arm64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71095,9 +71095,9 @@ SP_NOINLINE static void sp_521_mont_reduce_9(sp_digit* a, const sp_digit* m,
7109571095
"# mu = a[i] * mp\n\t"
7109671096
"mul x9, %[mp], x13\n\t"
7109771097
"cmp x4, #1\n\t"
71098-
"b.ne L_521_mont_reduce_9_nomask\n\t"
71098+
"b.ne L_521_mont_reduce_9_nomask_%=\n\t"
7109971099
"and x9, x9, #0x1ff\n\t"
71100-
"L_521_mont_reduce_9_nomask:\n\t"
71100+
"L_521_mont_reduce_9_nomask_%=:\n\t"
7110171101
"# a[i+0] += m[0] * mu\n\t"
7110271102
"ldp x10, x11, [%[m], 0]\n\t"
7110371103
"mul x7, x10, x9\n\t"

0 commit comments

Comments
 (0)