Skip to content

Commit a6de9cd

Browse files
Merge pull request #6942 from SparkiDev/sp_int_sqr_volatile
SP int: ARM64 optimization issue
2 parents c852347 + cfb6560 commit a6de9cd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

wolfcrypt/src/sp_int.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14594,9 +14594,15 @@ static int _sp_sqr(const sp_int* a, sp_int* r)
1459414594
}
1459514595
#endif
1459614596
if (err == MP_OKAY) {
14597+
#ifndef WOLFSSL_SP_INT_SQR_VOLATILE
1459714598
sp_int_word w;
1459814599
sp_int_word l;
1459914600
sp_int_word h;
14601+
#else
14602+
volatile sp_int_word w;
14603+
volatile sp_int_word l;
14604+
volatile sp_int_word h;
14605+
#endif
1460014606
#ifdef SP_WORD_OVERFLOW
1460114607
sp_int_word o;
1460214608
#endif

0 commit comments

Comments
 (0)