Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
615 changes: 308 additions & 307 deletions wolfcrypt/src/aes_gcm_asm.S

Large diffs are not rendered by default.

615 changes: 308 additions & 307 deletions wolfcrypt/src/aes_gcm_asm.asm

Large diffs are not rendered by default.

264 changes: 132 additions & 132 deletions wolfcrypt/src/aes_gcm_x86_asm.S

Large diffs are not rendered by default.

264 changes: 132 additions & 132 deletions wolfcrypt/src/aes_gcm_x86_asm.asm

Large diffs are not rendered by default.

152 changes: 76 additions & 76 deletions wolfcrypt/src/aes_x86_64_asm.S

Large diffs are not rendered by default.

152 changes: 76 additions & 76 deletions wolfcrypt/src/aes_x86_64_asm.asm

Large diffs are not rendered by default.

212 changes: 106 additions & 106 deletions wolfcrypt/src/aes_xts_asm.S

Large diffs are not rendered by default.

212 changes: 106 additions & 106 deletions wolfcrypt/src/aes_xts_asm.asm

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions wolfcrypt/src/chacha_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _chacha_encrypt_x64:
pushq %r15
subq $0x48, %rsp
cmpl $0x40, %ecx
jl L_chacha_x64_small
jb L_chacha_x64_small
L_chacha_x64_start:
subq $48, %rsp
movq %rdx, 24(%rsp)
Expand Down Expand Up @@ -249,7 +249,7 @@ L_chacha_x64_block_crypt_start:
addq $0x40, %rsi
addq $0x40, %rdx
cmpl $0x40, %ecx
jge L_chacha_x64_start
jae L_chacha_x64_start
L_chacha_x64_small:
cmpl $0x00, %ecx
je L_chacha_x64_done
Expand Down Expand Up @@ -510,7 +510,7 @@ _chacha_encrypt_sse3:
leaq L_chacha20_sse3_rotl16(%rip), %r12
leaq L_chacha20_sse3_one(%rip), %r13
cmpl $0x80, %ecx
jl L_chacha20_sse3_128_done
jb L_chacha20_sse3_128_done
L_chacha20_sse3_128_start:
movdqu (%rdi), %xmm0
movdqu 16(%rdi), %xmm1
Expand Down Expand Up @@ -651,7 +651,7 @@ L_chacha20_sse3_128_crypt2_start:
addq $0x80, %rsi
addq $0x80, %rdx
cmpl $0x80, %ecx
jge L_chacha20_sse3_128_start
jae L_chacha20_sse3_128_start
L_chacha20_sse3_128_done:
cmpl $0x00, %ecx
je L_chacha20_sse3_last_done
Expand Down Expand Up @@ -766,7 +766,7 @@ L_chacha20_sse3_last_crypt2_start:
paddd %xmm13, %xmm7
paddd (%r13), %xmm7
cmpl $0x40, %ecx
jle L_chacha20_sse3_last_lt64
jbe L_chacha20_sse3_last_lt64
movdqu (%rsi), %xmm8
pxor %xmm8, %xmm0
movdqu %xmm0, (%rdx)
Expand Down Expand Up @@ -1201,7 +1201,7 @@ L_chacha20_avx1_loop128:
subl $0x100, %ecx
vmovdqa %xmm12, 192(%r9)
cmpl $0x100, %ecx
jl L_chacha20_avx1_done128
jb L_chacha20_avx1_done128
vmovdqa (%r9), %xmm0
vmovdqa 16(%r9), %xmm1
vmovdqa 32(%r9), %xmm2
Expand All @@ -1224,7 +1224,7 @@ L_chacha20_avx1_done128:
addl %eax, 48(%rdi)
L_chacha20_avx1_end128:
cmpl $0x40, %ecx
jl L_chacha20_avx1_block_done
jb L_chacha20_avx1_block_done
L_chacha20_avx1_block_start:
vmovdqu (%rdi), %xmm0
vmovdqu 16(%rdi), %xmm1
Expand Down Expand Up @@ -1297,7 +1297,7 @@ L_chacha20_avx1_block_crypt_start:
addq $0x40, %rsi
addq $0x40, %rdx
cmpl $0x40, %ecx
jge L_chacha20_avx1_block_start
jae L_chacha20_avx1_block_start
L_chacha20_avx1_block_done:
cmpl $0x00, %ecx
je L_chacha20_avx1_partial_done
Expand Down Expand Up @@ -1790,7 +1790,7 @@ L_chacha20_avx2_loop256:
subl $0x200, %ecx
vmovdqa %ymm12, 384(%r9)
cmpl $0x200, %ecx
jl L_chacha20_avx2_done256
jb L_chacha20_avx2_done256
vmovdqa (%r9), %ymm0
vmovdqa 32(%r9), %ymm1
vmovdqa 64(%r9), %ymm2
Expand Down Expand Up @@ -2133,7 +2133,7 @@ L_chacha20_avx512vl_loop128:
subl $0x100, %ecx
vmovdqa %xmm12, 192(%r9)
cmpl $0x100, %ecx
jl L_chacha20_avx512vl_done128
jb L_chacha20_avx512vl_done128
vmovdqa (%r9), %xmm0
vmovdqa 16(%r9), %xmm1
vmovdqa 32(%r9), %xmm2
Expand Down Expand Up @@ -2371,7 +2371,7 @@ L_chacha20_avx512vl_last_round:
vmovdqu %xmm6, 224(%r9)
vmovdqu %xmm7, 240(%r9)
cmpl $0x40, %ecx
jl L_chacha20_avx512vl_last_fdone
jb L_chacha20_avx512vl_last_fdone
L_chacha20_avx512vl_last_fstart:
vmovdqu (%rsi), %xmm0
vpxor (%r9), %xmm0, %xmm0
Expand All @@ -2391,7 +2391,7 @@ L_chacha20_avx512vl_last_fstart:
addq $0x40, %rdx
addq $0x40, %r9
cmpl $0x40, %ecx
jge L_chacha20_avx512vl_last_fstart
jae L_chacha20_avx512vl_last_fstart
L_chacha20_avx512vl_last_fdone:
cmpl $0x00, %ecx
je L_chacha20_avx512vl_last_done
Expand Down Expand Up @@ -2470,7 +2470,7 @@ _chacha_encrypt_avx512:
subq $8, %rsp
leaq L_chacha20_avx512_add(%rip), %r8
cmpl $0x400, %ecx
jl L_chacha20_avx512_end512
jb L_chacha20_avx512_end512
L_chacha20_avx512_start512:
vpbroadcastd (%rdi), %zmm0
vpbroadcastd 4(%rdi), %zmm1
Expand Down Expand Up @@ -2708,7 +2708,7 @@ L_chacha20_avx512_loop512:
addl $16, 48(%rdi)
subl $0x400, %ecx
cmpl $0x400, %ecx
jge L_chacha20_avx512_start512
jae L_chacha20_avx512_start512
L_chacha20_avx512_end512:
#ifndef __APPLE__
callq chacha_encrypt_avx2@plt
Expand Down
28 changes: 14 additions & 14 deletions wolfcrypt/src/chacha_asm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ chacha_encrypt_x64 PROC
push r15
sub rsp, 72
cmp r9d, 64
jl L_chacha_x64_small
jb L_chacha_x64_small
L_chacha_x64_start:
sub rsp, 48
mov QWORD PTR [rsp+24], r8
Expand Down Expand Up @@ -235,7 +235,7 @@ L_chacha_x64_block_crypt_start:
add rdx, 64
add r8, 64
cmp r9d, 64
jge L_chacha_x64_start
jae L_chacha_x64_start
L_chacha_x64_small:
cmp r9d, 0
je L_chacha_x64_done
Expand Down Expand Up @@ -475,7 +475,7 @@ chacha_encrypt_sse3 PROC
mov r14, QWORD PTR [ptr_L_chacha20_sse3_rotl16]
mov r15, QWORD PTR [ptr_L_chacha20_sse3_one]
cmp r9d, 128
jl L_chacha20_sse3_128_done
jb L_chacha20_sse3_128_done
L_chacha20_sse3_128_start:
movdqu xmm0, OWORD PTR [rcx]
movdqu xmm1, OWORD PTR [rcx+16]
Expand Down Expand Up @@ -616,7 +616,7 @@ L_chacha20_sse3_128_crypt2_start:
add rdx, 128
add r8, 128
cmp r9d, 128
jge L_chacha20_sse3_128_start
jae L_chacha20_sse3_128_start
L_chacha20_sse3_128_done:
cmp r9d, 0
je L_chacha20_sse3_last_done
Expand Down Expand Up @@ -731,7 +731,7 @@ L_chacha20_sse3_last_crypt2_start:
paddd xmm7, xmm13
paddd xmm7, OWORD PTR [r15]
cmp r9d, 64
jle L_chacha20_sse3_last_lt64
jbe L_chacha20_sse3_last_lt64
movdqu xmm8, OWORD PTR [rdx]
pxor xmm0, xmm8
movdqu OWORD PTR [r8], xmm0
Expand Down Expand Up @@ -1150,7 +1150,7 @@ L_chacha20_avx1_loop128:
sub r9d, 256
vmovdqa OWORD PTR [r11+192], xmm12
cmp r9d, 256
jl L_chacha20_avx1_done128
jb L_chacha20_avx1_done128
vmovdqa xmm0, OWORD PTR [r11]
vmovdqa xmm1, OWORD PTR [r11+16]
vmovdqa xmm2, OWORD PTR [r11+32]
Expand All @@ -1173,7 +1173,7 @@ L_chacha20_avx1_done128:
add DWORD PTR [rcx+48], eax
L_chacha20_avx1_end128:
cmp r9d, 64
jl L_chacha20_avx1_block_done
jb L_chacha20_avx1_block_done
L_chacha20_avx1_block_start:
vmovdqu xmm0, OWORD PTR [rcx]
vmovdqu xmm1, OWORD PTR [rcx+16]
Expand Down Expand Up @@ -1246,7 +1246,7 @@ L_chacha20_avx1_block_crypt_start:
add rdx, 64
add r8, 64
cmp r9d, 64
jge L_chacha20_avx1_block_start
jae L_chacha20_avx1_block_start
L_chacha20_avx1_block_done:
cmp r9d, 0
je L_chacha20_avx1_partial_done
Expand Down Expand Up @@ -1722,7 +1722,7 @@ L_chacha20_avx2_loop256:
sub r9d, 512
vmovdqu YMMWORD PTR [r11+384], ymm12
cmp r9d, 512
jl L_chacha20_avx2_done256
jb L_chacha20_avx2_done256
vmovdqu ymm0, YMMWORD PTR [r11]
vmovdqu ymm1, YMMWORD PTR [r11+32]
vmovdqu ymm2, YMMWORD PTR [r11+64]
Expand Down Expand Up @@ -2060,7 +2060,7 @@ L_chacha20_avx512vl_loop128:
sub r9d, 256
vmovdqa OWORD PTR [r11+192], xmm12
cmp r9d, 256
jl L_chacha20_avx512vl_done128
jb L_chacha20_avx512vl_done128
vmovdqa xmm0, OWORD PTR [r11]
vmovdqa xmm1, OWORD PTR [r11+16]
vmovdqa xmm2, OWORD PTR [r11+32]
Expand Down Expand Up @@ -2298,7 +2298,7 @@ L_chacha20_avx512vl_last_round:
vmovdqu OWORD PTR [r11+224], xmm6
vmovdqu OWORD PTR [r11+240], xmm7
cmp r9d, 64
jl L_chacha20_avx512vl_last_fdone
jb L_chacha20_avx512vl_last_fdone
L_chacha20_avx512vl_last_fstart:
vmovdqu xmm0, OWORD PTR [rdx]
vpxor xmm0, xmm0, [r11]
Expand All @@ -2318,7 +2318,7 @@ L_chacha20_avx512vl_last_fstart:
add r8, 64
add r11, 64
cmp r9d, 64
jge L_chacha20_avx512vl_last_fstart
jae L_chacha20_avx512vl_last_fstart
L_chacha20_avx512vl_last_fdone:
cmp r9d, 0
je L_chacha20_avx512vl_last_done
Expand Down Expand Up @@ -2399,7 +2399,7 @@ chacha_encrypt_avx512 PROC
vmovdqu OWORD PTR [rsp+152], xmm15
mov r10, QWORD PTR [ptr_L_chacha20_avx512_add]
cmp r9d, 1024
jl L_chacha20_avx512_end512
jb L_chacha20_avx512_end512
L_chacha20_avx512_start512:
vpbroadcastd zmm0, DWORD PTR [rcx]
vpbroadcastd zmm1, DWORD PTR [rcx+4]
Expand Down Expand Up @@ -2637,7 +2637,7 @@ L_chacha20_avx512_loop512:
add DWORD PTR [rcx+48], 16
sub r9d, 1024
cmp r9d, 1024
jge L_chacha20_avx512_start512
jae L_chacha20_avx512_start512
L_chacha20_avx512_end512:
sub rsp, 32
call chacha_encrypt_avx2
Expand Down
8 changes: 4 additions & 4 deletions wolfcrypt/src/port/arm/armv8-32-aes-asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -27199,7 +27199,7 @@ L_aes_gcm_encrypt_arm32_crypto_done_enc:
vld1.32 {q8}, [r8]
orr r10, r6, r2
cmp r10, #32
blt L_aes_gcm_encrypt_arm32_crypto_h_done
blo L_aes_gcm_encrypt_arm32_crypto_h_done
# Square H => H^2
vmull.p64 q1, d17, d17
vmull.p64 q0, d16, d16
Expand All @@ -27209,7 +27209,7 @@ L_aes_gcm_encrypt_arm32_crypto_done_enc:
vmull.p64 q9, d2, d26
veor.8 q9, q9, q0
cmp r10, #0x40
blt L_aes_gcm_encrypt_arm32_crypto_h_done
blo L_aes_gcm_encrypt_arm32_crypto_h_done
# Multiply H and H^2 => H^3
vmull.p64 q2, d17, d18
vmull.p64 q3, d16, d19
Expand Down Expand Up @@ -27797,7 +27797,7 @@ AES_GCM_decrypt_AARCH32:
vld1.32 {q8}, [r8]
orr r10, r6, r2
cmp r10, #32
blt L_aes_gcm_decrypt_arm32_crypto_h_done
blo L_aes_gcm_decrypt_arm32_crypto_h_done
# Square H => H^2
vmull.p64 q1, d17, d17
vmull.p64 q0, d16, d16
Expand All @@ -27807,7 +27807,7 @@ AES_GCM_decrypt_AARCH32:
vmull.p64 q9, d2, d26
veor.8 q9, q9, q0
cmp r10, #0x40
blt L_aes_gcm_decrypt_arm32_crypto_h_done
blo L_aes_gcm_decrypt_arm32_crypto_h_done
# Multiply H and H^2 => H^3
vmull.p64 q2, d17, d18
vmull.p64 q3, d16, d19
Expand Down
8 changes: 4 additions & 4 deletions wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -27889,7 +27889,7 @@ WC_OMIT_FRAME_POINTER void AES_GCM_encrypt_AARCH32(const byte* in, byte* out,
"vld1.32 {q8}, [r8]\n\t"
"orr r10, r6, %[sz]\n\t"
"cmp r10, #32\n\t"
"blt L_aes_gcm_encrypt_arm32_crypto_h_done_%=\n\t"
"blo L_aes_gcm_encrypt_arm32_crypto_h_done_%=\n\t"
/* Square H => H^2 */
"vmull.p64 q1, d17, d17\n\t"
"vmull.p64 q0, d16, d16\n\t"
Expand All @@ -27899,7 +27899,7 @@ WC_OMIT_FRAME_POINTER void AES_GCM_encrypt_AARCH32(const byte* in, byte* out,
"vmull.p64 q9, d2, d26\n\t"
"veor.8 q9, q9, q0\n\t"
"cmp r10, #0x40\n\t"
"blt L_aes_gcm_encrypt_arm32_crypto_h_done_%=\n\t"
"blo L_aes_gcm_encrypt_arm32_crypto_h_done_%=\n\t"
/* Multiply H and H^2 => H^3 */
"vmull.p64 q2, d17, d18\n\t"
"vmull.p64 q3, d16, d19\n\t"
Expand Down Expand Up @@ -28555,7 +28555,7 @@ WC_OMIT_FRAME_POINTER int AES_GCM_decrypt_AARCH32(const byte* in, byte* out,
"vld1.32 {q8}, [r8]\n\t"
"orr r10, r6, %[sz]\n\t"
"cmp r10, #32\n\t"
"blt L_aes_gcm_decrypt_arm32_crypto_h_done_%=\n\t"
"blo L_aes_gcm_decrypt_arm32_crypto_h_done_%=\n\t"
/* Square H => H^2 */
"vmull.p64 q1, d17, d17\n\t"
"vmull.p64 q0, d16, d16\n\t"
Expand All @@ -28565,7 +28565,7 @@ WC_OMIT_FRAME_POINTER int AES_GCM_decrypt_AARCH32(const byte* in, byte* out,
"vmull.p64 q9, d2, d26\n\t"
"veor.8 q9, q9, q0\n\t"
"cmp r10, #0x40\n\t"
"blt L_aes_gcm_decrypt_arm32_crypto_h_done_%=\n\t"
"blo L_aes_gcm_decrypt_arm32_crypto_h_done_%=\n\t"
/* Multiply H and H^2 => H^3 */
"vmull.p64 q2, d17, d18\n\t"
"vmull.p64 q3, d16, d19\n\t"
Expand Down
Loading
Loading