Skip to content

Commit d7b0aa9

Browse files
Merge pull request #7694 from SparkiDev/sp_x64_asm_fix_3
SP Intel x64 ASM: fix get_from_table ASM
2 parents 6409b68 + 4dc5248 commit d7b0aa9

1 file changed

Lines changed: 80 additions & 80 deletions

File tree

wolfcrypt/src/sp_x86_64_asm.asm

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -9712,14 +9712,14 @@ IFNDEF WC_NO_CACHE_RESISTANT
97129712
_text SEGMENT READONLY PARA
97139713
sp_2048_get_from_table_16 PROC
97149714
sub rsp, 128
9715-
vmovdqu OWORD PTR [rsp], xmm6
9716-
vmovdqu OWORD PTR [rsp+16], xmm7
9717-
vmovdqu OWORD PTR [rsp+32], xmm8
9718-
vmovdqu OWORD PTR [rsp+48], xmm9
9719-
vmovdqu OWORD PTR [rsp+64], xmm10
9720-
vmovdqu OWORD PTR [rsp+80], xmm11
9721-
vmovdqu OWORD PTR [rsp+96], xmm12
9722-
vmovdqu OWORD PTR [rsp+112], xmm13
9715+
movdqu OWORD PTR [rsp], xmm6
9716+
movdqu OWORD PTR [rsp+16], xmm7
9717+
movdqu OWORD PTR [rsp+32], xmm8
9718+
movdqu OWORD PTR [rsp+48], xmm9
9719+
movdqu OWORD PTR [rsp+64], xmm10
9720+
movdqu OWORD PTR [rsp+80], xmm11
9721+
movdqu OWORD PTR [rsp+96], xmm12
9722+
movdqu OWORD PTR [rsp+112], xmm13
97239723
mov rax, 1
97249724
movd xmm10, r8
97259725
movd xmm11, rax
@@ -10869,14 +10869,14 @@ sp_2048_get_from_table_16 PROC
1086910869
movdqu OWORD PTR [rcx+32], xmm6
1087010870
movdqu OWORD PTR [rcx+48], xmm7
1087110871
; END: 8-15
10872-
vmovdqu xmm6, OWORD PTR [rsp]
10873-
vmovdqu xmm7, OWORD PTR [rsp+16]
10874-
vmovdqu xmm8, OWORD PTR [rsp+32]
10875-
vmovdqu xmm9, OWORD PTR [rsp+48]
10876-
vmovdqu xmm10, OWORD PTR [rsp+64]
10877-
vmovdqu xmm11, OWORD PTR [rsp+80]
10878-
vmovdqu xmm12, OWORD PTR [rsp+96]
10879-
vmovdqu xmm13, OWORD PTR [rsp+112]
10872+
movdqu xmm6, OWORD PTR [rsp]
10873+
movdqu xmm7, OWORD PTR [rsp+16]
10874+
movdqu xmm8, OWORD PTR [rsp+32]
10875+
movdqu xmm9, OWORD PTR [rsp+48]
10876+
movdqu xmm10, OWORD PTR [rsp+64]
10877+
movdqu xmm11, OWORD PTR [rsp+80]
10878+
movdqu xmm12, OWORD PTR [rsp+96]
10879+
movdqu xmm13, OWORD PTR [rsp+112]
1088010880
add rsp, 128
1088110881
ret
1088210882
sp_2048_get_from_table_16 ENDP
@@ -13169,14 +13169,14 @@ IFNDEF WC_NO_CACHE_RESISTANT
1316913169
_text SEGMENT READONLY PARA
1317013170
sp_2048_get_from_table_32 PROC
1317113171
sub rsp, 128
13172-
vmovdqu OWORD PTR [rsp], xmm6
13173-
vmovdqu OWORD PTR [rsp+16], xmm7
13174-
vmovdqu OWORD PTR [rsp+32], xmm8
13175-
vmovdqu OWORD PTR [rsp+48], xmm9
13176-
vmovdqu OWORD PTR [rsp+64], xmm10
13177-
vmovdqu OWORD PTR [rsp+80], xmm11
13178-
vmovdqu OWORD PTR [rsp+96], xmm12
13179-
vmovdqu OWORD PTR [rsp+112], xmm13
13172+
movdqu OWORD PTR [rsp], xmm6
13173+
movdqu OWORD PTR [rsp+16], xmm7
13174+
movdqu OWORD PTR [rsp+32], xmm8
13175+
movdqu OWORD PTR [rsp+48], xmm9
13176+
movdqu OWORD PTR [rsp+64], xmm10
13177+
movdqu OWORD PTR [rsp+80], xmm11
13178+
movdqu OWORD PTR [rsp+96], xmm12
13179+
movdqu OWORD PTR [rsp+112], xmm13
1318013180
mov rax, 1
1318113181
movd xmm10, r8
1318213182
movd xmm11, rax
@@ -17774,14 +17774,14 @@ sp_2048_get_from_table_32 PROC
1777417774
movdqu OWORD PTR [rcx+32], xmm6
1777517775
movdqu OWORD PTR [rcx+48], xmm7
1777617776
; END: 24-31
17777-
vmovdqu xmm6, OWORD PTR [rsp]
17778-
vmovdqu xmm7, OWORD PTR [rsp+16]
17779-
vmovdqu xmm8, OWORD PTR [rsp+32]
17780-
vmovdqu xmm9, OWORD PTR [rsp+48]
17781-
vmovdqu xmm10, OWORD PTR [rsp+64]
17782-
vmovdqu xmm11, OWORD PTR [rsp+80]
17783-
vmovdqu xmm12, OWORD PTR [rsp+96]
17784-
vmovdqu xmm13, OWORD PTR [rsp+112]
17777+
movdqu xmm6, OWORD PTR [rsp]
17778+
movdqu xmm7, OWORD PTR [rsp+16]
17779+
movdqu xmm8, OWORD PTR [rsp+32]
17780+
movdqu xmm9, OWORD PTR [rsp+48]
17781+
movdqu xmm10, OWORD PTR [rsp+64]
17782+
movdqu xmm11, OWORD PTR [rsp+80]
17783+
movdqu xmm12, OWORD PTR [rsp+96]
17784+
movdqu xmm13, OWORD PTR [rsp+112]
1778517785
add rsp, 128
1778617786
ret
1778717787
sp_2048_get_from_table_32 ENDP
@@ -31837,14 +31837,14 @@ IFNDEF WC_NO_CACHE_RESISTANT
3183731837
_text SEGMENT READONLY PARA
3183831838
sp_3072_get_from_table_24 PROC
3183931839
sub rsp, 128
31840-
vmovdqu OWORD PTR [rsp], xmm6
31841-
vmovdqu OWORD PTR [rsp+16], xmm7
31842-
vmovdqu OWORD PTR [rsp+32], xmm8
31843-
vmovdqu OWORD PTR [rsp+48], xmm9
31844-
vmovdqu OWORD PTR [rsp+64], xmm10
31845-
vmovdqu OWORD PTR [rsp+80], xmm11
31846-
vmovdqu OWORD PTR [rsp+96], xmm12
31847-
vmovdqu OWORD PTR [rsp+112], xmm13
31840+
movdqu OWORD PTR [rsp], xmm6
31841+
movdqu OWORD PTR [rsp+16], xmm7
31842+
movdqu OWORD PTR [rsp+32], xmm8
31843+
movdqu OWORD PTR [rsp+48], xmm9
31844+
movdqu OWORD PTR [rsp+64], xmm10
31845+
movdqu OWORD PTR [rsp+80], xmm11
31846+
movdqu OWORD PTR [rsp+96], xmm12
31847+
movdqu OWORD PTR [rsp+112], xmm13
3184831848
mov rax, 1
3184931849
movd xmm10, r8
3185031850
movd xmm11, rax
@@ -33582,14 +33582,14 @@ sp_3072_get_from_table_24 PROC
3358233582
movdqu OWORD PTR [rcx+32], xmm6
3358333583
movdqu OWORD PTR [rcx+48], xmm7
3358433584
; END: 16-23
33585-
vmovdqu xmm6, OWORD PTR [rsp]
33586-
vmovdqu xmm7, OWORD PTR [rsp+16]
33587-
vmovdqu xmm8, OWORD PTR [rsp+32]
33588-
vmovdqu xmm9, OWORD PTR [rsp+48]
33589-
vmovdqu xmm10, OWORD PTR [rsp+64]
33590-
vmovdqu xmm11, OWORD PTR [rsp+80]
33591-
vmovdqu xmm12, OWORD PTR [rsp+96]
33592-
vmovdqu xmm13, OWORD PTR [rsp+112]
33585+
movdqu xmm6, OWORD PTR [rsp]
33586+
movdqu xmm7, OWORD PTR [rsp+16]
33587+
movdqu xmm8, OWORD PTR [rsp+32]
33588+
movdqu xmm9, OWORD PTR [rsp+48]
33589+
movdqu xmm10, OWORD PTR [rsp+64]
33590+
movdqu xmm11, OWORD PTR [rsp+80]
33591+
movdqu xmm12, OWORD PTR [rsp+96]
33592+
movdqu xmm13, OWORD PTR [rsp+112]
3359333593
add rsp, 128
3359433594
ret
3359533595
sp_3072_get_from_table_24 ENDP
@@ -36853,14 +36853,14 @@ IFNDEF WC_NO_CACHE_RESISTANT
3685336853
_text SEGMENT READONLY PARA
3685436854
sp_3072_get_from_table_48 PROC
3685536855
sub rsp, 128
36856-
vmovdqu OWORD PTR [rsp], xmm6
36857-
vmovdqu OWORD PTR [rsp+16], xmm7
36858-
vmovdqu OWORD PTR [rsp+32], xmm8
36859-
vmovdqu OWORD PTR [rsp+48], xmm9
36860-
vmovdqu OWORD PTR [rsp+64], xmm10
36861-
vmovdqu OWORD PTR [rsp+80], xmm11
36862-
vmovdqu OWORD PTR [rsp+96], xmm12
36863-
vmovdqu OWORD PTR [rsp+112], xmm13
36856+
movdqu OWORD PTR [rsp], xmm6
36857+
movdqu OWORD PTR [rsp+16], xmm7
36858+
movdqu OWORD PTR [rsp+32], xmm8
36859+
movdqu OWORD PTR [rsp+48], xmm9
36860+
movdqu OWORD PTR [rsp+64], xmm10
36861+
movdqu OWORD PTR [rsp+80], xmm11
36862+
movdqu OWORD PTR [rsp+96], xmm12
36863+
movdqu OWORD PTR [rsp+112], xmm13
3686436864
mov rax, 1
3686536865
movd xmm10, r8
3686636866
movd xmm11, rax
@@ -38650,14 +38650,14 @@ sp_3072_get_from_table_48 PROC
3865038650
movdqu OWORD PTR [rcx+32], xmm6
3865138651
movdqu OWORD PTR [rcx+48], xmm7
3865238652
; END: 40-47
38653-
vmovdqu xmm6, OWORD PTR [rsp]
38654-
vmovdqu xmm7, OWORD PTR [rsp+16]
38655-
vmovdqu xmm8, OWORD PTR [rsp+32]
38656-
vmovdqu xmm9, OWORD PTR [rsp+48]
38657-
vmovdqu xmm10, OWORD PTR [rsp+64]
38658-
vmovdqu xmm11, OWORD PTR [rsp+80]
38659-
vmovdqu xmm12, OWORD PTR [rsp+96]
38660-
vmovdqu xmm13, OWORD PTR [rsp+112]
38653+
movdqu xmm6, OWORD PTR [rsp]
38654+
movdqu xmm7, OWORD PTR [rsp+16]
38655+
movdqu xmm8, OWORD PTR [rsp+32]
38656+
movdqu xmm9, OWORD PTR [rsp+48]
38657+
movdqu xmm10, OWORD PTR [rsp+64]
38658+
movdqu xmm11, OWORD PTR [rsp+80]
38659+
movdqu xmm12, OWORD PTR [rsp+96]
38660+
movdqu xmm13, OWORD PTR [rsp+112]
3866138661
add rsp, 128
3866238662
ret
3866338663
sp_3072_get_from_table_48 ENDP
@@ -49224,14 +49224,14 @@ IFNDEF WC_NO_CACHE_RESISTANT
4922449224
_text SEGMENT READONLY PARA
4922549225
sp_4096_get_from_table_64 PROC
4922649226
sub rsp, 128
49227-
vmovdqu OWORD PTR [rsp], xmm6
49228-
vmovdqu OWORD PTR [rsp+16], xmm7
49229-
vmovdqu OWORD PTR [rsp+32], xmm8
49230-
vmovdqu OWORD PTR [rsp+48], xmm9
49231-
vmovdqu OWORD PTR [rsp+64], xmm10
49232-
vmovdqu OWORD PTR [rsp+80], xmm11
49233-
vmovdqu OWORD PTR [rsp+96], xmm12
49234-
vmovdqu OWORD PTR [rsp+112], xmm13
49227+
movdqu OWORD PTR [rsp], xmm6
49228+
movdqu OWORD PTR [rsp+16], xmm7
49229+
movdqu OWORD PTR [rsp+32], xmm8
49230+
movdqu OWORD PTR [rsp+48], xmm9
49231+
movdqu OWORD PTR [rsp+64], xmm10
49232+
movdqu OWORD PTR [rsp+80], xmm11
49233+
movdqu OWORD PTR [rsp+96], xmm12
49234+
movdqu OWORD PTR [rsp+112], xmm13
4923549235
mov rax, 1
4923649236
movd xmm10, r8
4923749237
movd xmm11, rax
@@ -51621,14 +51621,14 @@ sp_4096_get_from_table_64 PROC
5162151621
movdqu OWORD PTR [rcx+32], xmm6
5162251622
movdqu OWORD PTR [rcx+48], xmm7
5162351623
; END: 56-63
51624-
vmovdqu xmm6, OWORD PTR [rsp]
51625-
vmovdqu xmm7, OWORD PTR [rsp+16]
51626-
vmovdqu xmm8, OWORD PTR [rsp+32]
51627-
vmovdqu xmm9, OWORD PTR [rsp+48]
51628-
vmovdqu xmm10, OWORD PTR [rsp+64]
51629-
vmovdqu xmm11, OWORD PTR [rsp+80]
51630-
vmovdqu xmm12, OWORD PTR [rsp+96]
51631-
vmovdqu xmm13, OWORD PTR [rsp+112]
51624+
movdqu xmm6, OWORD PTR [rsp]
51625+
movdqu xmm7, OWORD PTR [rsp+16]
51626+
movdqu xmm8, OWORD PTR [rsp+32]
51627+
movdqu xmm9, OWORD PTR [rsp+48]
51628+
movdqu xmm10, OWORD PTR [rsp+64]
51629+
movdqu xmm11, OWORD PTR [rsp+80]
51630+
movdqu xmm12, OWORD PTR [rsp+96]
51631+
movdqu xmm13, OWORD PTR [rsp+112]
5163251632
add rsp, 128
5163351633
ret
5163451634
sp_4096_get_from_table_64 ENDP

0 commit comments

Comments
 (0)