Skip to content

Commit 089648f

Browse files
committed
Improvements to SP code
Fixed left shifts to be on unsigned types. Mod exp change to correctly get the highest indeces of exponent - corrected in some places and now the same in all.
1 parent f6f2765 commit 089648f

8 files changed

Lines changed: 1981 additions & 1981 deletions

File tree

wolfcrypt/src/sp_arm32.c

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

wolfcrypt/src/sp_arm64.c

Lines changed: 142 additions & 142 deletions
Large diffs are not rendered by default.

wolfcrypt/src/sp_armthumb.c

Lines changed: 166 additions & 166 deletions
Large diffs are not rendered by default.

wolfcrypt/src/sp_c32.c

Lines changed: 637 additions & 637 deletions
Large diffs are not rendered by default.

wolfcrypt/src/sp_c64.c

Lines changed: 627 additions & 627 deletions
Large diffs are not rendered by default.

wolfcrypt/src/sp_cortexm.c

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

wolfcrypt/src/sp_x86_64.c

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

wolfcrypt/src/sp_x86_64_asm.asm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57932,25 +57932,25 @@ L_256_mod_inv_avx2_4_store_done:
5793257932
and edi, 67108863
5793357933
sar edx, 26
5793457934
add esi, edx
57935-
movsxd r9, r9d
57936-
movsxd r11, r11d
57937-
movsxd r13, r13d
57938-
movsxd r15, r15d
57939-
movsxd rsi, esi
57935+
movsx r9, r9d
57936+
movsx r11, r11d
57937+
movsx r13, r13d
57938+
movsx r15, r15d
57939+
movsx rsi, esi
5794057940
shl r9, 26
5794157941
shl r11, 26
5794257942
shl r13, 26
5794357943
shl r15, 26
5794457944
shl rsi, 26
57945-
movsxd rax, eax
57945+
movsx rax, eax
5794657946
add rax, r9
57947-
movsxd r10, r10d
57947+
movsx r10, r10d
5794857948
adc r10, r11
57949-
movsxd r12, r12d
57949+
movsx r12, r12d
5795057950
adc r12, r13
57951-
movsxd r14, r14d
57951+
movsx r14, r14d
5795257952
adc r14, r15
57953-
movsxd rdi, edi
57953+
movsx rdi, edi
5795457954
adc rdi, rsi
5795557955
jge L_256_mod_inv_avx2_4_no_add_order
5795657956
mov r9, 2756213597218129

0 commit comments

Comments
 (0)