Make redbean ssl handshake go a little faster

This commit is contained in:
Justine Tunney 2021-07-03 05:51:04 -07:00
parent 87222aad35
commit 74200a0ea0
6 changed files with 33 additions and 18 deletions

View file

@ -640,6 +640,9 @@ BSWAP_SHUFB_CTL:
.text
sha1_transform_avx2:
push %rbp
mov %rsp,%rbp
.profilable
push %rbx
push %r12
push %r13
@ -677,5 +680,6 @@ sha1_transform_avx2:
pop %r13
pop %r12
pop %rbx
pop %rbp
ret
.endfn sha1_transform_avx2,globl

View file

@ -529,8 +529,11 @@ STACK_SIZE = _RSP + _RSP_SIZE
## arg 3 : Num blocks
########################################################################
.text
sha256_transform_rorx:
.align 32
sha256_transform_rorx:
push %rbp
mov %rsp,%rbp
.profilable
pushq %rbx
pushq %r12
pushq %r13
@ -715,6 +718,7 @@ sha256_transform_rorx:
popq %r13
popq %r12
popq %rbx
pop %rbp
ret
.endfn sha256_transform_rorx,globl

View file

@ -572,6 +572,9 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
# "blocks" is the message length in SHA512 blocks
########################################################################
sha512_transform_rorx:
push %rbp
mov %rsp,%rbp
.profilable
# Allocate Stack Space
mov %rsp, %rax
sub $frame_size, %rsp
@ -683,6 +686,7 @@ sha512_transform_rorx:
# Restore Stack Pointer
mov frame_RSPSAVE(%rsp), %rsp
pop %rbp
ret
.endfn sha512_transform_rorx,globl