Import OpenSSL 1.0.2s
This commit is contained in:
5728
tmp64/aes-x86_64.asm
5728
tmp64/aes-x86_64.asm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1552
tmp64/md5-x86_64.asm
1552
tmp64/md5-x86_64.asm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1536
tmp64/rc4-x86_64.asm
1536
tmp64/rc4-x86_64.asm
File diff suppressed because it is too large
Load Diff
3856
tmp64/rsaz-avx2.asm
3856
tmp64/rsaz-avx2.asm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
15056
tmp64/sha1-mb-x86_64.asm
15056
tmp64/sha1-mb-x86_64.asm
File diff suppressed because it is too large
Load Diff
11428
tmp64/sha1-x86_64.asm
11428
tmp64/sha1-x86_64.asm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
11268
tmp64/sha256-x86_64.asm
11268
tmp64/sha256-x86_64.asm
File diff suppressed because it is too large
Load Diff
11180
tmp64/sha512-x86_64.asm
11180
tmp64/sha512-x86_64.asm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1944
tmp64/wp-x86_64.asm
1944
tmp64/wp-x86_64.asm
File diff suppressed because it is too large
Load Diff
@@ -1,398 +1,398 @@
|
||||
default rel
|
||||
%define XMMWORD
|
||||
%define YMMWORD
|
||||
%define ZMMWORD
|
||||
section .text code align=64
|
||||
|
||||
|
||||
|
||||
ALIGN 16
|
||||
_mul_1x1:
|
||||
sub rsp,128+8
|
||||
mov r9,-1
|
||||
lea rsi,[rax*1+rax]
|
||||
shr r9,3
|
||||
lea rdi,[rax*4]
|
||||
and r9,rax
|
||||
lea r12,[rax*8]
|
||||
sar rax,63
|
||||
lea r10,[r9*1+r9]
|
||||
sar rsi,63
|
||||
lea r11,[r9*4]
|
||||
and rax,rbp
|
||||
sar rdi,63
|
||||
mov rdx,rax
|
||||
shl rax,63
|
||||
and rsi,rbp
|
||||
shr rdx,1
|
||||
mov rcx,rsi
|
||||
shl rsi,62
|
||||
and rdi,rbp
|
||||
shr rcx,2
|
||||
xor rax,rsi
|
||||
mov rbx,rdi
|
||||
shl rdi,61
|
||||
xor rdx,rcx
|
||||
shr rbx,3
|
||||
xor rax,rdi
|
||||
xor rdx,rbx
|
||||
|
||||
mov r13,r9
|
||||
mov QWORD[rsp],0
|
||||
xor r13,r10
|
||||
mov QWORD[8+rsp],r9
|
||||
mov r14,r11
|
||||
mov QWORD[16+rsp],r10
|
||||
xor r14,r12
|
||||
mov QWORD[24+rsp],r13
|
||||
|
||||
xor r9,r11
|
||||
mov QWORD[32+rsp],r11
|
||||
xor r10,r11
|
||||
mov QWORD[40+rsp],r9
|
||||
xor r13,r11
|
||||
mov QWORD[48+rsp],r10
|
||||
xor r9,r14
|
||||
mov QWORD[56+rsp],r13
|
||||
xor r10,r14
|
||||
|
||||
mov QWORD[64+rsp],r12
|
||||
xor r13,r14
|
||||
mov QWORD[72+rsp],r9
|
||||
xor r9,r11
|
||||
mov QWORD[80+rsp],r10
|
||||
xor r10,r11
|
||||
mov QWORD[88+rsp],r13
|
||||
|
||||
xor r13,r11
|
||||
mov QWORD[96+rsp],r14
|
||||
mov rsi,r8
|
||||
mov QWORD[104+rsp],r9
|
||||
and rsi,rbp
|
||||
mov QWORD[112+rsp],r10
|
||||
shr rbp,4
|
||||
mov QWORD[120+rsp],r13
|
||||
mov rdi,r8
|
||||
and rdi,rbp
|
||||
shr rbp,4
|
||||
|
||||
movq xmm0,QWORD[rsi*8+rsp]
|
||||
mov rsi,r8
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,4
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,60
|
||||
xor rax,rcx
|
||||
pslldq xmm1,1
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,12
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,52
|
||||
xor rax,rcx
|
||||
pslldq xmm1,2
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,20
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,44
|
||||
xor rax,rcx
|
||||
pslldq xmm1,3
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,28
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,36
|
||||
xor rax,rcx
|
||||
pslldq xmm1,4
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,36
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,28
|
||||
xor rax,rcx
|
||||
pslldq xmm1,5
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,44
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,20
|
||||
xor rax,rcx
|
||||
pslldq xmm1,6
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,52
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,12
|
||||
xor rax,rcx
|
||||
pslldq xmm1,7
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rbx,rcx
|
||||
shl rcx,60
|
||||
DB 102,72,15,126,198
|
||||
shr rbx,4
|
||||
xor rax,rcx
|
||||
psrldq xmm0,8
|
||||
xor rdx,rbx
|
||||
DB 102,72,15,126,199
|
||||
xor rax,rsi
|
||||
xor rdx,rdi
|
||||
|
||||
add rsp,128+8
|
||||
DB 0F3h,0C3h ;repret
|
||||
$L$end_mul_1x1:
|
||||
|
||||
EXTERN OPENSSL_ia32cap_P
|
||||
global bn_GF2m_mul_2x2
|
||||
|
||||
ALIGN 16
|
||||
bn_GF2m_mul_2x2:
|
||||
mov rax,QWORD[OPENSSL_ia32cap_P]
|
||||
bt rax,33
|
||||
jnc NEAR $L$vanilla_mul_2x2
|
||||
|
||||
DB 102,72,15,110,194
|
||||
DB 102,73,15,110,201
|
||||
DB 102,73,15,110,208
|
||||
movq xmm3,QWORD[40+rsp]
|
||||
movdqa xmm4,xmm0
|
||||
movdqa xmm5,xmm1
|
||||
DB 102,15,58,68,193,0
|
||||
pxor xmm4,xmm2
|
||||
pxor xmm5,xmm3
|
||||
DB 102,15,58,68,211,0
|
||||
DB 102,15,58,68,229,0
|
||||
xorps xmm4,xmm0
|
||||
xorps xmm4,xmm2
|
||||
movdqa xmm5,xmm4
|
||||
pslldq xmm4,8
|
||||
psrldq xmm5,8
|
||||
pxor xmm2,xmm4
|
||||
pxor xmm0,xmm5
|
||||
movdqu XMMWORD[rcx],xmm2
|
||||
movdqu XMMWORD[16+rcx],xmm0
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
ALIGN 16
|
||||
$L$vanilla_mul_2x2:
|
||||
lea rsp,[((-136))+rsp]
|
||||
mov r10,QWORD[176+rsp]
|
||||
mov QWORD[120+rsp],rdi
|
||||
mov QWORD[128+rsp],rsi
|
||||
mov QWORD[80+rsp],r14
|
||||
mov QWORD[88+rsp],r13
|
||||
mov QWORD[96+rsp],r12
|
||||
mov QWORD[104+rsp],rbp
|
||||
mov QWORD[112+rsp],rbx
|
||||
$L$body_mul_2x2:
|
||||
mov QWORD[32+rsp],rcx
|
||||
mov QWORD[40+rsp],rdx
|
||||
mov QWORD[48+rsp],r8
|
||||
mov QWORD[56+rsp],r9
|
||||
mov QWORD[64+rsp],r10
|
||||
|
||||
mov r8,0xf
|
||||
mov rax,rdx
|
||||
mov rbp,r9
|
||||
call _mul_1x1
|
||||
mov QWORD[16+rsp],rax
|
||||
mov QWORD[24+rsp],rdx
|
||||
|
||||
mov rax,QWORD[48+rsp]
|
||||
mov rbp,QWORD[64+rsp]
|
||||
call _mul_1x1
|
||||
mov QWORD[rsp],rax
|
||||
mov QWORD[8+rsp],rdx
|
||||
|
||||
mov rax,QWORD[40+rsp]
|
||||
mov rbp,QWORD[56+rsp]
|
||||
xor rax,QWORD[48+rsp]
|
||||
xor rbp,QWORD[64+rsp]
|
||||
call _mul_1x1
|
||||
mov rbx,QWORD[rsp]
|
||||
mov rcx,QWORD[8+rsp]
|
||||
mov rdi,QWORD[16+rsp]
|
||||
mov rsi,QWORD[24+rsp]
|
||||
mov rbp,QWORD[32+rsp]
|
||||
|
||||
xor rax,rdx
|
||||
xor rdx,rcx
|
||||
xor rax,rbx
|
||||
mov QWORD[rbp],rbx
|
||||
xor rdx,rdi
|
||||
mov QWORD[24+rbp],rsi
|
||||
xor rax,rsi
|
||||
xor rdx,rsi
|
||||
xor rax,rdx
|
||||
mov QWORD[16+rbp],rdx
|
||||
mov QWORD[8+rbp],rax
|
||||
|
||||
mov r14,QWORD[80+rsp]
|
||||
mov r13,QWORD[88+rsp]
|
||||
mov r12,QWORD[96+rsp]
|
||||
mov rbp,QWORD[104+rsp]
|
||||
mov rbx,QWORD[112+rsp]
|
||||
mov rdi,QWORD[120+rsp]
|
||||
mov rsi,QWORD[128+rsp]
|
||||
lea rsp,[136+rsp]
|
||||
DB 0F3h,0C3h ;repret
|
||||
$L$end_mul_2x2:
|
||||
|
||||
DB 71,70,40,50,94,109,41,32,77,117,108,116,105,112,108,105
|
||||
DB 99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54
|
||||
DB 52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
|
||||
DB 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
|
||||
DB 111,114,103,62,0
|
||||
ALIGN 16
|
||||
EXTERN __imp_RtlVirtualUnwind
|
||||
|
||||
|
||||
ALIGN 16
|
||||
se_handler:
|
||||
push rsi
|
||||
push rdi
|
||||
push rbx
|
||||
push rbp
|
||||
push r12
|
||||
push r13
|
||||
push r14
|
||||
push r15
|
||||
pushfq
|
||||
sub rsp,64
|
||||
|
||||
mov rax,QWORD[152+r8]
|
||||
mov rbx,QWORD[248+r8]
|
||||
|
||||
lea r10,[$L$body_mul_2x2]
|
||||
cmp rbx,r10
|
||||
jb NEAR $L$in_prologue
|
||||
|
||||
mov r14,QWORD[80+rax]
|
||||
mov r13,QWORD[88+rax]
|
||||
mov r12,QWORD[96+rax]
|
||||
mov rbp,QWORD[104+rax]
|
||||
mov rbx,QWORD[112+rax]
|
||||
mov rdi,QWORD[120+rax]
|
||||
mov rsi,QWORD[128+rax]
|
||||
|
||||
mov QWORD[144+r8],rbx
|
||||
mov QWORD[160+r8],rbp
|
||||
mov QWORD[168+r8],rsi
|
||||
mov QWORD[176+r8],rdi
|
||||
mov QWORD[216+r8],r12
|
||||
mov QWORD[224+r8],r13
|
||||
mov QWORD[232+r8],r14
|
||||
|
||||
$L$in_prologue:
|
||||
lea rax,[136+rax]
|
||||
mov QWORD[152+r8],rax
|
||||
|
||||
mov rdi,QWORD[40+r9]
|
||||
mov rsi,r8
|
||||
mov ecx,154
|
||||
DD 0xa548f3fc
|
||||
|
||||
mov rsi,r9
|
||||
xor rcx,rcx
|
||||
mov rdx,QWORD[8+rsi]
|
||||
mov r8,QWORD[rsi]
|
||||
mov r9,QWORD[16+rsi]
|
||||
mov r10,QWORD[40+rsi]
|
||||
lea r11,[56+rsi]
|
||||
lea r12,[24+rsi]
|
||||
mov QWORD[32+rsp],r10
|
||||
mov QWORD[40+rsp],r11
|
||||
mov QWORD[48+rsp],r12
|
||||
mov QWORD[56+rsp],rcx
|
||||
call QWORD[__imp_RtlVirtualUnwind]
|
||||
|
||||
mov eax,1
|
||||
add rsp,64
|
||||
popfq
|
||||
pop r15
|
||||
pop r14
|
||||
pop r13
|
||||
pop r12
|
||||
pop rbp
|
||||
pop rbx
|
||||
pop rdi
|
||||
pop rsi
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
section .pdata rdata align=4
|
||||
ALIGN 4
|
||||
DD _mul_1x1 wrt ..imagebase
|
||||
DD $L$end_mul_1x1 wrt ..imagebase
|
||||
DD $L$SEH_info_1x1 wrt ..imagebase
|
||||
|
||||
DD $L$vanilla_mul_2x2 wrt ..imagebase
|
||||
DD $L$end_mul_2x2 wrt ..imagebase
|
||||
DD $L$SEH_info_2x2 wrt ..imagebase
|
||||
section .xdata rdata align=8
|
||||
ALIGN 8
|
||||
$L$SEH_info_1x1:
|
||||
DB 0x01,0x07,0x02,0x00
|
||||
DB 0x07,0x01,0x11,0x00
|
||||
$L$SEH_info_2x2:
|
||||
DB 9,0,0,0
|
||||
DD se_handler wrt ..imagebase
|
||||
default rel
|
||||
%define XMMWORD
|
||||
%define YMMWORD
|
||||
%define ZMMWORD
|
||||
section .text code align=64
|
||||
|
||||
|
||||
|
||||
ALIGN 16
|
||||
_mul_1x1:
|
||||
sub rsp,128+8
|
||||
mov r9,-1
|
||||
lea rsi,[rax*1+rax]
|
||||
shr r9,3
|
||||
lea rdi,[rax*4]
|
||||
and r9,rax
|
||||
lea r12,[rax*8]
|
||||
sar rax,63
|
||||
lea r10,[r9*1+r9]
|
||||
sar rsi,63
|
||||
lea r11,[r9*4]
|
||||
and rax,rbp
|
||||
sar rdi,63
|
||||
mov rdx,rax
|
||||
shl rax,63
|
||||
and rsi,rbp
|
||||
shr rdx,1
|
||||
mov rcx,rsi
|
||||
shl rsi,62
|
||||
and rdi,rbp
|
||||
shr rcx,2
|
||||
xor rax,rsi
|
||||
mov rbx,rdi
|
||||
shl rdi,61
|
||||
xor rdx,rcx
|
||||
shr rbx,3
|
||||
xor rax,rdi
|
||||
xor rdx,rbx
|
||||
|
||||
mov r13,r9
|
||||
mov QWORD[rsp],0
|
||||
xor r13,r10
|
||||
mov QWORD[8+rsp],r9
|
||||
mov r14,r11
|
||||
mov QWORD[16+rsp],r10
|
||||
xor r14,r12
|
||||
mov QWORD[24+rsp],r13
|
||||
|
||||
xor r9,r11
|
||||
mov QWORD[32+rsp],r11
|
||||
xor r10,r11
|
||||
mov QWORD[40+rsp],r9
|
||||
xor r13,r11
|
||||
mov QWORD[48+rsp],r10
|
||||
xor r9,r14
|
||||
mov QWORD[56+rsp],r13
|
||||
xor r10,r14
|
||||
|
||||
mov QWORD[64+rsp],r12
|
||||
xor r13,r14
|
||||
mov QWORD[72+rsp],r9
|
||||
xor r9,r11
|
||||
mov QWORD[80+rsp],r10
|
||||
xor r10,r11
|
||||
mov QWORD[88+rsp],r13
|
||||
|
||||
xor r13,r11
|
||||
mov QWORD[96+rsp],r14
|
||||
mov rsi,r8
|
||||
mov QWORD[104+rsp],r9
|
||||
and rsi,rbp
|
||||
mov QWORD[112+rsp],r10
|
||||
shr rbp,4
|
||||
mov QWORD[120+rsp],r13
|
||||
mov rdi,r8
|
||||
and rdi,rbp
|
||||
shr rbp,4
|
||||
|
||||
movq xmm0,QWORD[rsi*8+rsp]
|
||||
mov rsi,r8
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,4
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,60
|
||||
xor rax,rcx
|
||||
pslldq xmm1,1
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,12
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,52
|
||||
xor rax,rcx
|
||||
pslldq xmm1,2
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,20
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,44
|
||||
xor rax,rcx
|
||||
pslldq xmm1,3
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,28
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,36
|
||||
xor rax,rcx
|
||||
pslldq xmm1,4
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,36
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,28
|
||||
xor rax,rcx
|
||||
pslldq xmm1,5
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,44
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,20
|
||||
xor rax,rcx
|
||||
pslldq xmm1,6
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rdi,r8
|
||||
mov rbx,rcx
|
||||
shl rcx,52
|
||||
and rdi,rbp
|
||||
movq xmm1,QWORD[rsi*8+rsp]
|
||||
shr rbx,12
|
||||
xor rax,rcx
|
||||
pslldq xmm1,7
|
||||
mov rsi,r8
|
||||
shr rbp,4
|
||||
xor rdx,rbx
|
||||
and rsi,rbp
|
||||
shr rbp,4
|
||||
pxor xmm0,xmm1
|
||||
mov rcx,QWORD[rdi*8+rsp]
|
||||
mov rbx,rcx
|
||||
shl rcx,60
|
||||
DB 102,72,15,126,198
|
||||
shr rbx,4
|
||||
xor rax,rcx
|
||||
psrldq xmm0,8
|
||||
xor rdx,rbx
|
||||
DB 102,72,15,126,199
|
||||
xor rax,rsi
|
||||
xor rdx,rdi
|
||||
|
||||
add rsp,128+8
|
||||
DB 0F3h,0C3h ;repret
|
||||
$L$end_mul_1x1:
|
||||
|
||||
EXTERN OPENSSL_ia32cap_P
|
||||
global bn_GF2m_mul_2x2
|
||||
|
||||
ALIGN 16
|
||||
bn_GF2m_mul_2x2:
|
||||
mov rax,QWORD[OPENSSL_ia32cap_P]
|
||||
bt rax,33
|
||||
jnc NEAR $L$vanilla_mul_2x2
|
||||
|
||||
DB 102,72,15,110,194
|
||||
DB 102,73,15,110,201
|
||||
DB 102,73,15,110,208
|
||||
movq xmm3,QWORD[40+rsp]
|
||||
movdqa xmm4,xmm0
|
||||
movdqa xmm5,xmm1
|
||||
DB 102,15,58,68,193,0
|
||||
pxor xmm4,xmm2
|
||||
pxor xmm5,xmm3
|
||||
DB 102,15,58,68,211,0
|
||||
DB 102,15,58,68,229,0
|
||||
xorps xmm4,xmm0
|
||||
xorps xmm4,xmm2
|
||||
movdqa xmm5,xmm4
|
||||
pslldq xmm4,8
|
||||
psrldq xmm5,8
|
||||
pxor xmm2,xmm4
|
||||
pxor xmm0,xmm5
|
||||
movdqu XMMWORD[rcx],xmm2
|
||||
movdqu XMMWORD[16+rcx],xmm0
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
ALIGN 16
|
||||
$L$vanilla_mul_2x2:
|
||||
lea rsp,[((-136))+rsp]
|
||||
mov r10,QWORD[176+rsp]
|
||||
mov QWORD[120+rsp],rdi
|
||||
mov QWORD[128+rsp],rsi
|
||||
mov QWORD[80+rsp],r14
|
||||
mov QWORD[88+rsp],r13
|
||||
mov QWORD[96+rsp],r12
|
||||
mov QWORD[104+rsp],rbp
|
||||
mov QWORD[112+rsp],rbx
|
||||
$L$body_mul_2x2:
|
||||
mov QWORD[32+rsp],rcx
|
||||
mov QWORD[40+rsp],rdx
|
||||
mov QWORD[48+rsp],r8
|
||||
mov QWORD[56+rsp],r9
|
||||
mov QWORD[64+rsp],r10
|
||||
|
||||
mov r8,0xf
|
||||
mov rax,rdx
|
||||
mov rbp,r9
|
||||
call _mul_1x1
|
||||
mov QWORD[16+rsp],rax
|
||||
mov QWORD[24+rsp],rdx
|
||||
|
||||
mov rax,QWORD[48+rsp]
|
||||
mov rbp,QWORD[64+rsp]
|
||||
call _mul_1x1
|
||||
mov QWORD[rsp],rax
|
||||
mov QWORD[8+rsp],rdx
|
||||
|
||||
mov rax,QWORD[40+rsp]
|
||||
mov rbp,QWORD[56+rsp]
|
||||
xor rax,QWORD[48+rsp]
|
||||
xor rbp,QWORD[64+rsp]
|
||||
call _mul_1x1
|
||||
mov rbx,QWORD[rsp]
|
||||
mov rcx,QWORD[8+rsp]
|
||||
mov rdi,QWORD[16+rsp]
|
||||
mov rsi,QWORD[24+rsp]
|
||||
mov rbp,QWORD[32+rsp]
|
||||
|
||||
xor rax,rdx
|
||||
xor rdx,rcx
|
||||
xor rax,rbx
|
||||
mov QWORD[rbp],rbx
|
||||
xor rdx,rdi
|
||||
mov QWORD[24+rbp],rsi
|
||||
xor rax,rsi
|
||||
xor rdx,rsi
|
||||
xor rax,rdx
|
||||
mov QWORD[16+rbp],rdx
|
||||
mov QWORD[8+rbp],rax
|
||||
|
||||
mov r14,QWORD[80+rsp]
|
||||
mov r13,QWORD[88+rsp]
|
||||
mov r12,QWORD[96+rsp]
|
||||
mov rbp,QWORD[104+rsp]
|
||||
mov rbx,QWORD[112+rsp]
|
||||
mov rdi,QWORD[120+rsp]
|
||||
mov rsi,QWORD[128+rsp]
|
||||
lea rsp,[136+rsp]
|
||||
DB 0F3h,0C3h ;repret
|
||||
$L$end_mul_2x2:
|
||||
|
||||
DB 71,70,40,50,94,109,41,32,77,117,108,116,105,112,108,105
|
||||
DB 99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54
|
||||
DB 52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
|
||||
DB 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
|
||||
DB 111,114,103,62,0
|
||||
ALIGN 16
|
||||
EXTERN __imp_RtlVirtualUnwind
|
||||
|
||||
|
||||
ALIGN 16
|
||||
se_handler:
|
||||
push rsi
|
||||
push rdi
|
||||
push rbx
|
||||
push rbp
|
||||
push r12
|
||||
push r13
|
||||
push r14
|
||||
push r15
|
||||
pushfq
|
||||
sub rsp,64
|
||||
|
||||
mov rax,QWORD[152+r8]
|
||||
mov rbx,QWORD[248+r8]
|
||||
|
||||
lea r10,[$L$body_mul_2x2]
|
||||
cmp rbx,r10
|
||||
jb NEAR $L$in_prologue
|
||||
|
||||
mov r14,QWORD[80+rax]
|
||||
mov r13,QWORD[88+rax]
|
||||
mov r12,QWORD[96+rax]
|
||||
mov rbp,QWORD[104+rax]
|
||||
mov rbx,QWORD[112+rax]
|
||||
mov rdi,QWORD[120+rax]
|
||||
mov rsi,QWORD[128+rax]
|
||||
|
||||
mov QWORD[144+r8],rbx
|
||||
mov QWORD[160+r8],rbp
|
||||
mov QWORD[168+r8],rsi
|
||||
mov QWORD[176+r8],rdi
|
||||
mov QWORD[216+r8],r12
|
||||
mov QWORD[224+r8],r13
|
||||
mov QWORD[232+r8],r14
|
||||
|
||||
$L$in_prologue:
|
||||
lea rax,[136+rax]
|
||||
mov QWORD[152+r8],rax
|
||||
|
||||
mov rdi,QWORD[40+r9]
|
||||
mov rsi,r8
|
||||
mov ecx,154
|
||||
DD 0xa548f3fc
|
||||
|
||||
mov rsi,r9
|
||||
xor rcx,rcx
|
||||
mov rdx,QWORD[8+rsi]
|
||||
mov r8,QWORD[rsi]
|
||||
mov r9,QWORD[16+rsi]
|
||||
mov r10,QWORD[40+rsi]
|
||||
lea r11,[56+rsi]
|
||||
lea r12,[24+rsi]
|
||||
mov QWORD[32+rsp],r10
|
||||
mov QWORD[40+rsp],r11
|
||||
mov QWORD[48+rsp],r12
|
||||
mov QWORD[56+rsp],rcx
|
||||
call QWORD[__imp_RtlVirtualUnwind]
|
||||
|
||||
mov eax,1
|
||||
add rsp,64
|
||||
popfq
|
||||
pop r15
|
||||
pop r14
|
||||
pop r13
|
||||
pop r12
|
||||
pop rbp
|
||||
pop rbx
|
||||
pop rdi
|
||||
pop rsi
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
section .pdata rdata align=4
|
||||
ALIGN 4
|
||||
DD _mul_1x1 wrt ..imagebase
|
||||
DD $L$end_mul_1x1 wrt ..imagebase
|
||||
DD $L$SEH_info_1x1 wrt ..imagebase
|
||||
|
||||
DD $L$vanilla_mul_2x2 wrt ..imagebase
|
||||
DD $L$end_mul_2x2 wrt ..imagebase
|
||||
DD $L$SEH_info_2x2 wrt ..imagebase
|
||||
section .xdata rdata align=8
|
||||
ALIGN 8
|
||||
$L$SEH_info_1x1:
|
||||
DB 0x01,0x07,0x02,0x00
|
||||
DB 0x07,0x01,0x11,0x00
|
||||
$L$SEH_info_2x2:
|
||||
DB 9,0,0,0
|
||||
DD se_handler wrt ..imagebase
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,277 +1,277 @@
|
||||
default rel
|
||||
%define XMMWORD
|
||||
%define YMMWORD
|
||||
%define ZMMWORD
|
||||
EXTERN OPENSSL_cpuid_setup
|
||||
|
||||
section .CRT$XCU rdata align=8
|
||||
DQ OPENSSL_cpuid_setup
|
||||
|
||||
|
||||
common OPENSSL_ia32cap_P 16
|
||||
|
||||
section .text code align=64
|
||||
|
||||
|
||||
global OPENSSL_atomic_add
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_atomic_add:
|
||||
mov eax,DWORD[rcx]
|
||||
$L$spin: lea r8,[rax*1+rdx]
|
||||
DB 0xf0
|
||||
cmpxchg DWORD[rcx],r8d
|
||||
jne NEAR $L$spin
|
||||
mov eax,r8d
|
||||
DB 0x48,0x98
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
global OPENSSL_rdtsc
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_rdtsc:
|
||||
rdtsc
|
||||
shl rdx,32
|
||||
or rax,rdx
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
global OPENSSL_ia32_cpuid
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_ia32_cpuid:
|
||||
mov QWORD[8+rsp],rdi ;WIN64 prologue
|
||||
mov QWORD[16+rsp],rsi
|
||||
mov rax,rsp
|
||||
$L$SEH_begin_OPENSSL_ia32_cpuid:
|
||||
mov rdi,rcx
|
||||
|
||||
|
||||
mov r8,rbx
|
||||
|
||||
xor eax,eax
|
||||
mov DWORD[8+rdi],eax
|
||||
cpuid
|
||||
mov r11d,eax
|
||||
|
||||
xor eax,eax
|
||||
cmp ebx,0x756e6547
|
||||
setne al
|
||||
mov r9d,eax
|
||||
cmp edx,0x49656e69
|
||||
setne al
|
||||
or r9d,eax
|
||||
cmp ecx,0x6c65746e
|
||||
setne al
|
||||
or r9d,eax
|
||||
jz NEAR $L$intel
|
||||
|
||||
cmp ebx,0x68747541
|
||||
setne al
|
||||
mov r10d,eax
|
||||
cmp edx,0x69746E65
|
||||
setne al
|
||||
or r10d,eax
|
||||
cmp ecx,0x444D4163
|
||||
setne al
|
||||
or r10d,eax
|
||||
jnz NEAR $L$intel
|
||||
|
||||
|
||||
mov eax,0x80000000
|
||||
cpuid
|
||||
cmp eax,0x80000001
|
||||
jb NEAR $L$intel
|
||||
mov r10d,eax
|
||||
mov eax,0x80000001
|
||||
cpuid
|
||||
or r9d,ecx
|
||||
and r9d,0x00000801
|
||||
|
||||
cmp r10d,0x80000008
|
||||
jb NEAR $L$intel
|
||||
|
||||
mov eax,0x80000008
|
||||
cpuid
|
||||
movzx r10,cl
|
||||
inc r10
|
||||
|
||||
mov eax,1
|
||||
cpuid
|
||||
bt edx,28
|
||||
jnc NEAR $L$generic
|
||||
shr ebx,16
|
||||
cmp bl,r10b
|
||||
ja NEAR $L$generic
|
||||
and edx,0xefffffff
|
||||
jmp NEAR $L$generic
|
||||
|
||||
$L$intel:
|
||||
cmp r11d,4
|
||||
mov r10d,-1
|
||||
jb NEAR $L$nocacheinfo
|
||||
|
||||
mov eax,4
|
||||
mov ecx,0
|
||||
cpuid
|
||||
mov r10d,eax
|
||||
shr r10d,14
|
||||
and r10d,0xfff
|
||||
|
||||
$L$nocacheinfo:
|
||||
mov eax,1
|
||||
cpuid
|
||||
and edx,0xbfefffff
|
||||
cmp r9d,0
|
||||
jne NEAR $L$notintel
|
||||
or edx,0x40000000
|
||||
and ah,15
|
||||
cmp ah,15
|
||||
jne NEAR $L$notP4
|
||||
or edx,0x00100000
|
||||
$L$notP4:
|
||||
cmp ah,6
|
||||
jne NEAR $L$notintel
|
||||
and eax,0x0fff0ff0
|
||||
cmp eax,0x00050670
|
||||
je NEAR $L$knights
|
||||
cmp eax,0x00080650
|
||||
jne NEAR $L$notintel
|
||||
$L$knights:
|
||||
and ecx,0xfbffffff
|
||||
|
||||
$L$notintel:
|
||||
bt edx,28
|
||||
jnc NEAR $L$generic
|
||||
and edx,0xefffffff
|
||||
cmp r10d,0
|
||||
je NEAR $L$generic
|
||||
|
||||
or edx,0x10000000
|
||||
shr ebx,16
|
||||
cmp bl,1
|
||||
ja NEAR $L$generic
|
||||
and edx,0xefffffff
|
||||
$L$generic:
|
||||
and r9d,0x00000800
|
||||
and ecx,0xfffff7ff
|
||||
or r9d,ecx
|
||||
|
||||
mov r10d,edx
|
||||
|
||||
cmp r11d,7
|
||||
jb NEAR $L$no_extended_info
|
||||
mov eax,7
|
||||
xor ecx,ecx
|
||||
cpuid
|
||||
bt r9d,26
|
||||
jc NEAR $L$notknights
|
||||
and ebx,0xfff7ffff
|
||||
$L$notknights:
|
||||
mov DWORD[8+rdi],ebx
|
||||
$L$no_extended_info:
|
||||
|
||||
bt r9d,27
|
||||
jnc NEAR $L$clear_avx
|
||||
xor ecx,ecx
|
||||
DB 0x0f,0x01,0xd0
|
||||
and eax,6
|
||||
cmp eax,6
|
||||
je NEAR $L$done
|
||||
$L$clear_avx:
|
||||
mov eax,0xefffe7ff
|
||||
and r9d,eax
|
||||
and DWORD[8+rdi],0xffffffdf
|
||||
$L$done:
|
||||
shl r9,32
|
||||
mov eax,r10d
|
||||
mov rbx,r8
|
||||
or rax,r9
|
||||
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
|
||||
mov rsi,QWORD[16+rsp]
|
||||
DB 0F3h,0C3h ;repret
|
||||
$L$SEH_end_OPENSSL_ia32_cpuid:
|
||||
|
||||
global OPENSSL_cleanse
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_cleanse:
|
||||
xor rax,rax
|
||||
cmp rdx,15
|
||||
jae NEAR $L$ot
|
||||
cmp rdx,0
|
||||
je NEAR $L$ret
|
||||
$L$ittle:
|
||||
mov BYTE[rcx],al
|
||||
sub rdx,1
|
||||
lea rcx,[1+rcx]
|
||||
jnz NEAR $L$ittle
|
||||
$L$ret:
|
||||
DB 0F3h,0C3h ;repret
|
||||
ALIGN 16
|
||||
$L$ot:
|
||||
test rcx,7
|
||||
jz NEAR $L$aligned
|
||||
mov BYTE[rcx],al
|
||||
lea rdx,[((-1))+rdx]
|
||||
lea rcx,[1+rcx]
|
||||
jmp NEAR $L$ot
|
||||
$L$aligned:
|
||||
mov QWORD[rcx],rax
|
||||
lea rdx,[((-8))+rdx]
|
||||
test rdx,-8
|
||||
lea rcx,[8+rcx]
|
||||
jnz NEAR $L$aligned
|
||||
cmp rdx,0
|
||||
jne NEAR $L$ittle
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
global OPENSSL_wipe_cpu
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_wipe_cpu:
|
||||
pxor xmm0,xmm0
|
||||
pxor xmm1,xmm1
|
||||
pxor xmm2,xmm2
|
||||
pxor xmm3,xmm3
|
||||
pxor xmm4,xmm4
|
||||
pxor xmm5,xmm5
|
||||
xor rcx,rcx
|
||||
xor rdx,rdx
|
||||
xor r8,r8
|
||||
xor r9,r9
|
||||
xor r10,r10
|
||||
xor r11,r11
|
||||
lea rax,[8+rsp]
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
global OPENSSL_ia32_rdrand
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_ia32_rdrand:
|
||||
mov ecx,8
|
||||
$L$oop_rdrand:
|
||||
DB 72,15,199,240
|
||||
jc NEAR $L$break_rdrand
|
||||
loop $L$oop_rdrand
|
||||
$L$break_rdrand:
|
||||
cmp rax,0
|
||||
cmove rax,rcx
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
global OPENSSL_ia32_rdseed
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_ia32_rdseed:
|
||||
mov ecx,8
|
||||
$L$oop_rdseed:
|
||||
DB 72,15,199,248
|
||||
jc NEAR $L$break_rdseed
|
||||
loop $L$oop_rdseed
|
||||
$L$break_rdseed:
|
||||
cmp rax,0
|
||||
cmove rax,rcx
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
default rel
|
||||
%define XMMWORD
|
||||
%define YMMWORD
|
||||
%define ZMMWORD
|
||||
EXTERN OPENSSL_cpuid_setup
|
||||
|
||||
section .CRT$XCU rdata align=8
|
||||
DQ OPENSSL_cpuid_setup
|
||||
|
||||
|
||||
common OPENSSL_ia32cap_P 16
|
||||
|
||||
section .text code align=64
|
||||
|
||||
|
||||
global OPENSSL_atomic_add
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_atomic_add:
|
||||
mov eax,DWORD[rcx]
|
||||
$L$spin: lea r8,[rax*1+rdx]
|
||||
DB 0xf0
|
||||
cmpxchg DWORD[rcx],r8d
|
||||
jne NEAR $L$spin
|
||||
mov eax,r8d
|
||||
DB 0x48,0x98
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
global OPENSSL_rdtsc
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_rdtsc:
|
||||
rdtsc
|
||||
shl rdx,32
|
||||
or rax,rdx
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
global OPENSSL_ia32_cpuid
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_ia32_cpuid:
|
||||
mov QWORD[8+rsp],rdi ;WIN64 prologue
|
||||
mov QWORD[16+rsp],rsi
|
||||
mov rax,rsp
|
||||
$L$SEH_begin_OPENSSL_ia32_cpuid:
|
||||
mov rdi,rcx
|
||||
|
||||
|
||||
mov r8,rbx
|
||||
|
||||
xor eax,eax
|
||||
mov DWORD[8+rdi],eax
|
||||
cpuid
|
||||
mov r11d,eax
|
||||
|
||||
xor eax,eax
|
||||
cmp ebx,0x756e6547
|
||||
setne al
|
||||
mov r9d,eax
|
||||
cmp edx,0x49656e69
|
||||
setne al
|
||||
or r9d,eax
|
||||
cmp ecx,0x6c65746e
|
||||
setne al
|
||||
or r9d,eax
|
||||
jz NEAR $L$intel
|
||||
|
||||
cmp ebx,0x68747541
|
||||
setne al
|
||||
mov r10d,eax
|
||||
cmp edx,0x69746E65
|
||||
setne al
|
||||
or r10d,eax
|
||||
cmp ecx,0x444D4163
|
||||
setne al
|
||||
or r10d,eax
|
||||
jnz NEAR $L$intel
|
||||
|
||||
|
||||
mov eax,0x80000000
|
||||
cpuid
|
||||
cmp eax,0x80000001
|
||||
jb NEAR $L$intel
|
||||
mov r10d,eax
|
||||
mov eax,0x80000001
|
||||
cpuid
|
||||
or r9d,ecx
|
||||
and r9d,0x00000801
|
||||
|
||||
cmp r10d,0x80000008
|
||||
jb NEAR $L$intel
|
||||
|
||||
mov eax,0x80000008
|
||||
cpuid
|
||||
movzx r10,cl
|
||||
inc r10
|
||||
|
||||
mov eax,1
|
||||
cpuid
|
||||
bt edx,28
|
||||
jnc NEAR $L$generic
|
||||
shr ebx,16
|
||||
cmp bl,r10b
|
||||
ja NEAR $L$generic
|
||||
and edx,0xefffffff
|
||||
jmp NEAR $L$generic
|
||||
|
||||
$L$intel:
|
||||
cmp r11d,4
|
||||
mov r10d,-1
|
||||
jb NEAR $L$nocacheinfo
|
||||
|
||||
mov eax,4
|
||||
mov ecx,0
|
||||
cpuid
|
||||
mov r10d,eax
|
||||
shr r10d,14
|
||||
and r10d,0xfff
|
||||
|
||||
$L$nocacheinfo:
|
||||
mov eax,1
|
||||
cpuid
|
||||
and edx,0xbfefffff
|
||||
cmp r9d,0
|
||||
jne NEAR $L$notintel
|
||||
or edx,0x40000000
|
||||
and ah,15
|
||||
cmp ah,15
|
||||
jne NEAR $L$notP4
|
||||
or edx,0x00100000
|
||||
$L$notP4:
|
||||
cmp ah,6
|
||||
jne NEAR $L$notintel
|
||||
and eax,0x0fff0ff0
|
||||
cmp eax,0x00050670
|
||||
je NEAR $L$knights
|
||||
cmp eax,0x00080650
|
||||
jne NEAR $L$notintel
|
||||
$L$knights:
|
||||
and ecx,0xfbffffff
|
||||
|
||||
$L$notintel:
|
||||
bt edx,28
|
||||
jnc NEAR $L$generic
|
||||
and edx,0xefffffff
|
||||
cmp r10d,0
|
||||
je NEAR $L$generic
|
||||
|
||||
or edx,0x10000000
|
||||
shr ebx,16
|
||||
cmp bl,1
|
||||
ja NEAR $L$generic
|
||||
and edx,0xefffffff
|
||||
$L$generic:
|
||||
and r9d,0x00000800
|
||||
and ecx,0xfffff7ff
|
||||
or r9d,ecx
|
||||
|
||||
mov r10d,edx
|
||||
|
||||
cmp r11d,7
|
||||
jb NEAR $L$no_extended_info
|
||||
mov eax,7
|
||||
xor ecx,ecx
|
||||
cpuid
|
||||
bt r9d,26
|
||||
jc NEAR $L$notknights
|
||||
and ebx,0xfff7ffff
|
||||
$L$notknights:
|
||||
mov DWORD[8+rdi],ebx
|
||||
$L$no_extended_info:
|
||||
|
||||
bt r9d,27
|
||||
jnc NEAR $L$clear_avx
|
||||
xor ecx,ecx
|
||||
DB 0x0f,0x01,0xd0
|
||||
and eax,6
|
||||
cmp eax,6
|
||||
je NEAR $L$done
|
||||
$L$clear_avx:
|
||||
mov eax,0xefffe7ff
|
||||
and r9d,eax
|
||||
and DWORD[8+rdi],0xffffffdf
|
||||
$L$done:
|
||||
shl r9,32
|
||||
mov eax,r10d
|
||||
mov rbx,r8
|
||||
or rax,r9
|
||||
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
|
||||
mov rsi,QWORD[16+rsp]
|
||||
DB 0F3h,0C3h ;repret
|
||||
$L$SEH_end_OPENSSL_ia32_cpuid:
|
||||
|
||||
global OPENSSL_cleanse
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_cleanse:
|
||||
xor rax,rax
|
||||
cmp rdx,15
|
||||
jae NEAR $L$ot
|
||||
cmp rdx,0
|
||||
je NEAR $L$ret
|
||||
$L$ittle:
|
||||
mov BYTE[rcx],al
|
||||
sub rdx,1
|
||||
lea rcx,[1+rcx]
|
||||
jnz NEAR $L$ittle
|
||||
$L$ret:
|
||||
DB 0F3h,0C3h ;repret
|
||||
ALIGN 16
|
||||
$L$ot:
|
||||
test rcx,7
|
||||
jz NEAR $L$aligned
|
||||
mov BYTE[rcx],al
|
||||
lea rdx,[((-1))+rdx]
|
||||
lea rcx,[1+rcx]
|
||||
jmp NEAR $L$ot
|
||||
$L$aligned:
|
||||
mov QWORD[rcx],rax
|
||||
lea rdx,[((-8))+rdx]
|
||||
test rdx,-8
|
||||
lea rcx,[8+rcx]
|
||||
jnz NEAR $L$aligned
|
||||
cmp rdx,0
|
||||
jne NEAR $L$ittle
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
global OPENSSL_wipe_cpu
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_wipe_cpu:
|
||||
pxor xmm0,xmm0
|
||||
pxor xmm1,xmm1
|
||||
pxor xmm2,xmm2
|
||||
pxor xmm3,xmm3
|
||||
pxor xmm4,xmm4
|
||||
pxor xmm5,xmm5
|
||||
xor rcx,rcx
|
||||
xor rdx,rdx
|
||||
xor r8,r8
|
||||
xor r9,r9
|
||||
xor r10,r10
|
||||
xor r11,r11
|
||||
lea rax,[8+rsp]
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
global OPENSSL_ia32_rdrand
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_ia32_rdrand:
|
||||
mov ecx,8
|
||||
$L$oop_rdrand:
|
||||
DB 72,15,199,240
|
||||
jc NEAR $L$break_rdrand
|
||||
loop $L$oop_rdrand
|
||||
$L$break_rdrand:
|
||||
cmp rax,0
|
||||
cmove rax,rcx
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
global OPENSSL_ia32_rdseed
|
||||
|
||||
ALIGN 16
|
||||
OPENSSL_ia32_rdseed:
|
||||
mov ecx,8
|
||||
$L$oop_rdseed:
|
||||
DB 72,15,199,248
|
||||
jc NEAR $L$break_rdseed
|
||||
loop $L$oop_rdseed
|
||||
$L$break_rdseed:
|
||||
cmp rax,0
|
||||
cmove rax,rcx
|
||||
DB 0F3h,0C3h ;repret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user