Skip to content

Commit 18aa2b8

Browse files
authored
Merge pull request #7843 from dgarske/fix_sp_small_gcc
Fix for SP small calling label with GCC
2 parents 6116d5e + 91ea7ab commit 18aa2b8

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

wolfcrypt/src/sp_cortexm.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4780,7 +4780,11 @@ static sp_int32 sp_2048_cmp_32(const sp_digit* a, const sp_digit* b)
47804780
"IT ne\n\t"
47814781
"movne r3, r7\n\t"
47824782
"SUBS r6, r6, #0x4\n\t"
4783+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
47834784
"bcs L_sp_2048_cmp_32_words\n\t"
4785+
#else
4786+
"bcs L_sp_2048_cmp_32_words_%=\n\t"
4787+
#endif
47844788
"EOR r2, r2, r3\n\t"
47854789
#else
47864790
"LDR r4, [%[a], #124]\n\t"
@@ -7549,7 +7553,11 @@ static sp_int32 sp_2048_cmp_64(const sp_digit* a, const sp_digit* b)
75497553
"IT ne\n\t"
75507554
"movne r3, r7\n\t"
75517555
"SUBS r6, r6, #0x4\n\t"
7556+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
75527557
"bcs L_sp_2048_cmp_64_words\n\t"
7558+
#else
7559+
"bcs L_sp_2048_cmp_64_words_%=\n\t"
7560+
#endif
75537561
"EOR r2, r2, r3\n\t"
75547562
#else
75557563
"LDR r4, [%[a], #252]\n\t"
@@ -16277,7 +16285,11 @@ static sp_int32 sp_3072_cmp_48(const sp_digit* a, const sp_digit* b)
1627716285
"IT ne\n\t"
1627816286
"movne r3, r7\n\t"
1627916287
"SUBS r6, r6, #0x4\n\t"
16288+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
1628016289
"bcs L_sp_3072_cmp_48_words\n\t"
16290+
#else
16291+
"bcs L_sp_3072_cmp_48_words_%=\n\t"
16292+
#endif
1628116293
"EOR r2, r2, r3\n\t"
1628216294
#else
1628316295
"LDR r4, [%[a], #188]\n\t"
@@ -19806,7 +19818,11 @@ static sp_int32 sp_3072_cmp_96(const sp_digit* a, const sp_digit* b)
1980619818
"IT ne\n\t"
1980719819
"movne r3, r7\n\t"
1980819820
"SUBS r6, r6, #0x4\n\t"
19821+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
1980919822
"bcs L_sp_3072_cmp_96_words\n\t"
19823+
#else
19824+
"bcs L_sp_3072_cmp_96_words_%=\n\t"
19825+
#endif
1981019826
"EOR r2, r2, r3\n\t"
1981119827
#else
1981219828
"LDR r4, [%[a], #380]\n\t"
@@ -27837,7 +27853,11 @@ static sp_int32 sp_4096_cmp_128(const sp_digit* a, const sp_digit* b)
2783727853
"IT ne\n\t"
2783827854
"movne r3, r7\n\t"
2783927855
"SUBS r6, r6, #0x4\n\t"
27856+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
2784027857
"bcs L_sp_4096_cmp_128_words\n\t"
27858+
#else
27859+
"bcs L_sp_4096_cmp_128_words_%=\n\t"
27860+
#endif
2784127861
"EOR r2, r2, r3\n\t"
2784227862
#else
2784327863
"LDR r4, [%[a], #508]\n\t"
@@ -34655,7 +34675,11 @@ static sp_int32 sp_256_cmp_8(const sp_digit* a, const sp_digit* b)
3465534675
"IT ne\n\t"
3465634676
"movne r3, r7\n\t"
3465734677
"SUBS r6, r6, #0x4\n\t"
34678+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
3465834679
"bcs L_sp_256_cmp_8_words\n\t"
34680+
#else
34681+
"bcs L_sp_256_cmp_8_words_%=\n\t"
34682+
#endif
3465934683
"EOR r2, r2, r3\n\t"
3466034684
#else
3466134685
"LDR r4, [%[a], #28]\n\t"
@@ -45288,7 +45312,11 @@ static sp_int32 sp_384_cmp_12(const sp_digit* a, const sp_digit* b)
4528845312
"IT ne\n\t"
4528945313
"movne r3, r7\n\t"
4529045314
"SUBS r6, r6, #0x4\n\t"
45315+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
4529145316
"bcs L_sp_384_cmp_12_words\n\t"
45317+
#else
45318+
"bcs L_sp_384_cmp_12_words_%=\n\t"
45319+
#endif
4529245320
"EOR r2, r2, r3\n\t"
4529345321
#else
4529445322
"LDR r4, [%[a], #44]\n\t"
@@ -57343,7 +57371,11 @@ static sp_int32 sp_521_cmp_17(const sp_digit* a, const sp_digit* b)
5734357371
"IT ne\n\t"
5734457372
"movne r3, r7\n\t"
5734557373
"SUBS r6, r6, #0x4\n\t"
57374+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
5734657375
"bcs L_sp_521_cmp_17_words\n\t"
57376+
#else
57377+
"bcs L_sp_521_cmp_17_words_%=\n\t"
57378+
#endif
5734757379
"EOR r2, r2, r3\n\t"
5734857380
#else
5734957381
"LDR r4, [%[a], #64]\n\t"
@@ -70364,7 +70396,11 @@ static sp_int32 sp_1024_cmp_32(const sp_digit* a, const sp_digit* b)
7036470396
"IT ne\n\t"
7036570397
"movne r3, r7\n\t"
7036670398
"SUBS r6, r6, #0x4\n\t"
70399+
#if defined(__IAR_SYSTEMS_ICC__) && (__VER__ < 9000000)
7036770400
"bcs L_sp_1024_cmp_32_words\n\t"
70401+
#else
70402+
"bcs L_sp_1024_cmp_32_words_%=\n\t"
70403+
#endif
7036870404
"EOR r2, r2, r3\n\t"
7036970405
#else
7037070406
"LDR r4, [%[a], #124]\n\t"

wolfcrypt/src/sp_x86_64_asm.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; /* sp_x86_64_asm.asm */
22
; /*
3-
; * Copyright (C) 2006-2024 wolfSSL Inc.
3+
; * Copyright (C) 2006-2024 wolfSSL Inc.
44
; *
55
; * This file is part of wolfSSL.
66
; *

0 commit comments

Comments
 (0)