Source release 15.2.0

This commit is contained in:
John W. Bruce
2019-06-28 16:02:52 -07:00
parent 2b26dee09c
commit 2990f23065
1236 changed files with 166886 additions and 142315 deletions

View File

@@ -601,6 +601,12 @@ $L$SEH_begin_aesni_gcm_encrypt:
%ifndef NDEBUG
%ifndef BORINGSSL_FIPS
EXTERN BORINGSSL_function_hit
mov BYTE[((BORINGSSL_function_hit+2))],1
%endif
%endif
xor r10,r10

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,495 @@
; This file is generated from a similarly-named Perl script in the BoringSSL
; source tree. Do not edit by hand.
default rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
%ifdef BORINGSSL_PREFIX
%include "boringssl_prefix_symbols_nasm.inc"
%endif
section .text code align=64
global gcm_gmult_ssse3
ALIGN 16
gcm_gmult_ssse3:
$L$gmult_seh_begin:
sub rsp,40
$L$gmult_seh_allocstack:
movdqa XMMWORD[rsp],xmm6
$L$gmult_seh_save_xmm6:
movdqa XMMWORD[16+rsp],xmm10
$L$gmult_seh_save_xmm10:
$L$gmult_seh_prolog_end:
movdqu xmm0,XMMWORD[rcx]
movdqa xmm10,XMMWORD[$L$reverse_bytes]
movdqa xmm2,XMMWORD[$L$low4_mask]
DB 102,65,15,56,0,194
movdqa xmm1,xmm2
pandn xmm1,xmm0
psrld xmm1,4
pand xmm0,xmm2
pxor xmm2,xmm2
pxor xmm3,xmm3
mov rax,5
$L$oop_row_1:
movdqa xmm4,XMMWORD[rdx]
lea rdx,[16+rdx]
movdqa xmm6,xmm2
DB 102,15,58,15,243,1
movdqa xmm3,xmm6
psrldq xmm2,1
movdqa xmm5,xmm4
DB 102,15,56,0,224
DB 102,15,56,0,233
pxor xmm2,xmm5
movdqa xmm5,xmm4
psllq xmm5,60
movdqa xmm6,xmm5
pslldq xmm6,8
pxor xmm3,xmm6
psrldq xmm5,8
pxor xmm2,xmm5
psrlq xmm4,4
pxor xmm2,xmm4
sub rax,1
jnz NEAR $L$oop_row_1
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,5
pxor xmm2,xmm3
pxor xmm3,xmm3
mov rax,5
$L$oop_row_2:
movdqa xmm4,XMMWORD[rdx]
lea rdx,[16+rdx]
movdqa xmm6,xmm2
DB 102,15,58,15,243,1
movdqa xmm3,xmm6
psrldq xmm2,1
movdqa xmm5,xmm4
DB 102,15,56,0,224
DB 102,15,56,0,233
pxor xmm2,xmm5
movdqa xmm5,xmm4
psllq xmm5,60
movdqa xmm6,xmm5
pslldq xmm6,8
pxor xmm3,xmm6
psrldq xmm5,8
pxor xmm2,xmm5
psrlq xmm4,4
pxor xmm2,xmm4
sub rax,1
jnz NEAR $L$oop_row_2
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,5
pxor xmm2,xmm3
pxor xmm3,xmm3
mov rax,6
$L$oop_row_3:
movdqa xmm4,XMMWORD[rdx]
lea rdx,[16+rdx]
movdqa xmm6,xmm2
DB 102,15,58,15,243,1
movdqa xmm3,xmm6
psrldq xmm2,1
movdqa xmm5,xmm4
DB 102,15,56,0,224
DB 102,15,56,0,233
pxor xmm2,xmm5
movdqa xmm5,xmm4
psllq xmm5,60
movdqa xmm6,xmm5
pslldq xmm6,8
pxor xmm3,xmm6
psrldq xmm5,8
pxor xmm2,xmm5
psrlq xmm4,4
pxor xmm2,xmm4
sub rax,1
jnz NEAR $L$oop_row_3
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,5
pxor xmm2,xmm3
pxor xmm3,xmm3
DB 102,65,15,56,0,210
movdqu XMMWORD[rcx],xmm2
pxor xmm0,xmm0
pxor xmm1,xmm1
pxor xmm2,xmm2
pxor xmm3,xmm3
pxor xmm4,xmm4
pxor xmm5,xmm5
pxor xmm6,xmm6
movdqa xmm6,XMMWORD[rsp]
movdqa xmm10,XMMWORD[16+rsp]
add rsp,40
DB 0F3h,0C3h ;repret
$L$gmult_seh_end:
global gcm_ghash_ssse3
ALIGN 16
gcm_ghash_ssse3:
$L$ghash_seh_begin:
sub rsp,56
$L$ghash_seh_allocstack:
movdqa XMMWORD[rsp],xmm6
$L$ghash_seh_save_xmm6:
movdqa XMMWORD[16+rsp],xmm10
$L$ghash_seh_save_xmm10:
movdqa XMMWORD[32+rsp],xmm11
$L$ghash_seh_save_xmm11:
$L$ghash_seh_prolog_end:
movdqu xmm0,XMMWORD[rcx]
movdqa xmm10,XMMWORD[$L$reverse_bytes]
movdqa xmm11,XMMWORD[$L$low4_mask]
and r9,-16
DB 102,65,15,56,0,194
pxor xmm3,xmm3
$L$oop_ghash:
movdqu xmm1,XMMWORD[r8]
DB 102,65,15,56,0,202
pxor xmm0,xmm1
movdqa xmm1,xmm11
pandn xmm1,xmm0
psrld xmm1,4
pand xmm0,xmm11
pxor xmm2,xmm2
mov rax,5
$L$oop_row_4:
movdqa xmm4,XMMWORD[rdx]
lea rdx,[16+rdx]
movdqa xmm6,xmm2
DB 102,15,58,15,243,1
movdqa xmm3,xmm6
psrldq xmm2,1
movdqa xmm5,xmm4
DB 102,15,56,0,224
DB 102,15,56,0,233
pxor xmm2,xmm5
movdqa xmm5,xmm4
psllq xmm5,60
movdqa xmm6,xmm5
pslldq xmm6,8
pxor xmm3,xmm6
psrldq xmm5,8
pxor xmm2,xmm5
psrlq xmm4,4
pxor xmm2,xmm4
sub rax,1
jnz NEAR $L$oop_row_4
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,5
pxor xmm2,xmm3
pxor xmm3,xmm3
mov rax,5
$L$oop_row_5:
movdqa xmm4,XMMWORD[rdx]
lea rdx,[16+rdx]
movdqa xmm6,xmm2
DB 102,15,58,15,243,1
movdqa xmm3,xmm6
psrldq xmm2,1
movdqa xmm5,xmm4
DB 102,15,56,0,224
DB 102,15,56,0,233
pxor xmm2,xmm5
movdqa xmm5,xmm4
psllq xmm5,60
movdqa xmm6,xmm5
pslldq xmm6,8
pxor xmm3,xmm6
psrldq xmm5,8
pxor xmm2,xmm5
psrlq xmm4,4
pxor xmm2,xmm4
sub rax,1
jnz NEAR $L$oop_row_5
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,5
pxor xmm2,xmm3
pxor xmm3,xmm3
mov rax,6
$L$oop_row_6:
movdqa xmm4,XMMWORD[rdx]
lea rdx,[16+rdx]
movdqa xmm6,xmm2
DB 102,15,58,15,243,1
movdqa xmm3,xmm6
psrldq xmm2,1
movdqa xmm5,xmm4
DB 102,15,56,0,224
DB 102,15,56,0,233
pxor xmm2,xmm5
movdqa xmm5,xmm4
psllq xmm5,60
movdqa xmm6,xmm5
pslldq xmm6,8
pxor xmm3,xmm6
psrldq xmm5,8
pxor xmm2,xmm5
psrlq xmm4,4
pxor xmm2,xmm4
sub rax,1
jnz NEAR $L$oop_row_6
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,1
pxor xmm2,xmm3
psrlq xmm3,5
pxor xmm2,xmm3
pxor xmm3,xmm3
movdqa xmm0,xmm2
lea rdx,[((-256))+rdx]
lea r8,[16+r8]
sub r9,16
jnz NEAR $L$oop_ghash
DB 102,65,15,56,0,194
movdqu XMMWORD[rcx],xmm0
pxor xmm0,xmm0
pxor xmm1,xmm1
pxor xmm2,xmm2
pxor xmm3,xmm3
pxor xmm4,xmm4
pxor xmm5,xmm5
pxor xmm6,xmm6
movdqa xmm6,XMMWORD[rsp]
movdqa xmm10,XMMWORD[16+rsp]
movdqa xmm11,XMMWORD[32+rsp]
add rsp,56
DB 0F3h,0C3h ;repret
$L$ghash_seh_end:
ALIGN 16
$L$reverse_bytes:
DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
$L$low4_mask:
DQ 0x0f0f0f0f0f0f0f0f,0x0f0f0f0f0f0f0f0f
section .pdata rdata align=4
ALIGN 4
DD $L$gmult_seh_begin wrt ..imagebase
DD $L$gmult_seh_end wrt ..imagebase
DD $L$gmult_seh_info wrt ..imagebase
DD $L$ghash_seh_begin wrt ..imagebase
DD $L$ghash_seh_end wrt ..imagebase
DD $L$ghash_seh_info wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$gmult_seh_info:
DB 1
DB $L$gmult_seh_prolog_end-$L$gmult_seh_begin
DB 5
DB 0
DB $L$gmult_seh_save_xmm10-$L$gmult_seh_begin
DB 168
DW 1
DB $L$gmult_seh_save_xmm6-$L$gmult_seh_begin
DB 104
DW 0
DB $L$gmult_seh_allocstack-$L$gmult_seh_begin
DB 66
ALIGN 8
$L$ghash_seh_info:
DB 1
DB $L$ghash_seh_prolog_end-$L$ghash_seh_begin
DB 7
DB 0
DB $L$ghash_seh_save_xmm11-$L$ghash_seh_begin
DB 184
DW 2
DB $L$ghash_seh_save_xmm10-$L$ghash_seh_begin
DB 168
DW 1
DB $L$ghash_seh_save_xmm6-$L$ghash_seh_begin
DB 104
DW 0
DB $L$ghash_seh_allocstack-$L$ghash_seh_begin
DB 98

View File

@@ -727,6 +727,7 @@ global gcm_init_clmul
ALIGN 16
gcm_init_clmul:
$L$_init_clmul:
$L$SEH_begin_gcm_init_clmul:
@@ -886,10 +887,12 @@ DB 102,15,58,15,227,8
$L$SEH_end_gcm_init_clmul:
DB 0F3h,0C3h ;repret
global gcm_gmult_clmul
ALIGN 16
gcm_gmult_clmul:
$L$_gmult_clmul:
movdqu xmm0,XMMWORD[rcx]
movdqa xmm5,XMMWORD[$L$bswap_mask]
@@ -937,10 +940,12 @@ DB 102,15,56,0,197
movdqu XMMWORD[rcx],xmm0
DB 0F3h,0C3h ;repret
global gcm_ghash_clmul
ALIGN 32
gcm_ghash_clmul:
$L$_ghash_clmul:
lea rax,[((-136))+rsp]
$L$SEH_begin_gcm_ghash_clmul:
@@ -1347,10 +1352,12 @@ DB 102,65,15,56,0,194
$L$SEH_end_gcm_ghash_clmul:
DB 0F3h,0C3h ;repret
global gcm_init_avx
ALIGN 32
gcm_init_avx:
$L$SEH_begin_gcm_init_avx:
DB 0x48,0x83,0xec,0x18
@@ -1461,16 +1468,20 @@ $L$init_start_avx:
$L$SEH_end_gcm_init_avx:
DB 0F3h,0C3h ;repret
global gcm_gmult_avx
ALIGN 32
gcm_gmult_avx:
jmp NEAR $L$_gmult_clmul
global gcm_ghash_avx
ALIGN 32
gcm_ghash_avx:
lea rax,[((-136))+rsp]
$L$SEH_begin_gcm_ghash_avx:
@@ -1869,6 +1880,7 @@ $L$tail_no_xor_avx:
$L$SEH_end_gcm_ghash_avx:
DB 0F3h,0C3h ;repret
ALIGN 64
$L$bswap_mask:
DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0

View File

@@ -19,23 +19,12 @@ global CRYPTO_rdrand
ALIGN 16
CRYPTO_rdrand:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_CRYPTO_rdrand:
mov rdi,rcx
xor rax,rax
DB 0x48,0x0f,0xc7,0xf1
DB 73,15,199,240
adc rax,rax
mov QWORD[rdi],rcx
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
mov QWORD[rcx],r8
DB 0F3h,0C3h ;repret
@@ -43,39 +32,27 @@ DB 0x48,0x0f,0xc7,0xf1
global CRYPTO_rdrand_multiple8_buf
ALIGN 16
CRYPTO_rdrand_multiple8_buf:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_CRYPTO_rdrand_multiple8_buf:
mov rdi,rcx
mov rsi,rdx
test rsi,rsi
test rdx,rdx
jz NEAR $L$out
mov rdx,8
mov r8,8
$L$loop:
DB 0x48,0x0f,0xc7,0xf1
DB 73,15,199,241
jnc NEAR $L$err
mov QWORD[rdi],rcx
add rdi,rdx
sub rsi,rdx
mov QWORD[rcx],r9
add rcx,r8
sub rdx,r8
jnz NEAR $L$loop
$L$out:
mov rax,1
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$err:
xor rax,rax
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret

View File

@@ -1297,6 +1297,7 @@ global rsaz_1024_red2norm_avx2
ALIGN 32
rsaz_1024_red2norm_avx2:
sub rdx,-128
xor rax,rax
mov r8,QWORD[((-128))+rdx]
@@ -1490,10 +1491,12 @@ rsaz_1024_red2norm_avx2:
DB 0F3h,0C3h ;repret
global rsaz_1024_norm2red_avx2
ALIGN 32
rsaz_1024_norm2red_avx2:
sub rcx,-128
mov r8,QWORD[rdx]
mov eax,0x1fffffff
@@ -1647,10 +1650,12 @@ rsaz_1024_norm2red_avx2:
mov QWORD[184+rcx],r8
DB 0F3h,0C3h ;repret
global rsaz_1024_scatter5_avx2
ALIGN 32
rsaz_1024_scatter5_avx2:
vzeroupper
vmovdqu ymm5,YMMWORD[$L$scatter_permd]
shl r8d,4
@@ -1672,6 +1677,7 @@ $L$oop_scatter_1024:
DB 0F3h,0C3h ;repret
global rsaz_1024_gather5_avx2
ALIGN 32
@@ -1817,23 +1823,6 @@ $L$oop_gather_1024:
$L$SEH_end_rsaz_1024_gather5:
EXTERN OPENSSL_ia32cap_P
global rsaz_avx2_eligible
ALIGN 32
rsaz_avx2_eligible:
lea rax,[OPENSSL_ia32cap_P]
mov eax,DWORD[8+rax]
mov ecx,524544
mov edx,0
and ecx,eax
cmp ecx,524544
cmove eax,edx
and eax,32
shr eax,5
DB 0F3h,0C3h ;repret
ALIGN 64
$L$and_mask:
DQ 0x1fffffff,0x1fffffff,0x1fffffff,0x1fffffff

View File

@@ -120,6 +120,181 @@ DB 102,15,56,0,193
ALIGN 16
_vpaes_encrypt_core_2x:
mov r9,rdx
mov r11,16
mov eax,DWORD[240+rdx]
movdqa xmm1,xmm9
movdqa xmm7,xmm9
movdqa xmm2,XMMWORD[$L$k_ipt]
movdqa xmm8,xmm2
pandn xmm1,xmm0
pandn xmm7,xmm6
movdqu xmm5,XMMWORD[r9]
psrld xmm1,4
psrld xmm7,4
pand xmm0,xmm9
pand xmm6,xmm9
DB 102,15,56,0,208
DB 102,68,15,56,0,198
movdqa xmm0,XMMWORD[(($L$k_ipt+16))]
movdqa xmm6,xmm0
DB 102,15,56,0,193
DB 102,15,56,0,247
pxor xmm2,xmm5
pxor xmm8,xmm5
add r9,16
pxor xmm0,xmm2
pxor xmm6,xmm8
lea r10,[$L$k_mc_backward]
jmp NEAR $L$enc2x_entry
ALIGN 16
$L$enc2x_loop:
movdqa xmm4,XMMWORD[$L$k_sb1]
movdqa xmm0,XMMWORD[(($L$k_sb1+16))]
movdqa xmm12,xmm4
movdqa xmm6,xmm0
DB 102,15,56,0,226
DB 102,69,15,56,0,224
DB 102,15,56,0,195
DB 102,65,15,56,0,243
pxor xmm4,xmm5
pxor xmm12,xmm5
movdqa xmm5,XMMWORD[$L$k_sb2]
movdqa xmm13,xmm5
pxor xmm0,xmm4
pxor xmm6,xmm12
movdqa xmm1,XMMWORD[((-64))+r10*1+r11]
DB 102,15,56,0,234
DB 102,69,15,56,0,232
movdqa xmm4,XMMWORD[r10*1+r11]
movdqa xmm2,XMMWORD[(($L$k_sb2+16))]
movdqa xmm8,xmm2
DB 102,15,56,0,211
DB 102,69,15,56,0,195
movdqa xmm3,xmm0
movdqa xmm11,xmm6
pxor xmm2,xmm5
pxor xmm8,xmm13
DB 102,15,56,0,193
DB 102,15,56,0,241
add r9,16
pxor xmm0,xmm2
pxor xmm6,xmm8
DB 102,15,56,0,220
DB 102,68,15,56,0,220
add r11,16
pxor xmm3,xmm0
pxor xmm11,xmm6
DB 102,15,56,0,193
DB 102,15,56,0,241
and r11,0x30
sub rax,1
pxor xmm0,xmm3
pxor xmm6,xmm11
$L$enc2x_entry:
movdqa xmm1,xmm9
movdqa xmm7,xmm9
movdqa xmm5,XMMWORD[(($L$k_inv+16))]
movdqa xmm13,xmm5
pandn xmm1,xmm0
pandn xmm7,xmm6
psrld xmm1,4
psrld xmm7,4
pand xmm0,xmm9
pand xmm6,xmm9
DB 102,15,56,0,232
DB 102,68,15,56,0,238
movdqa xmm3,xmm10
movdqa xmm11,xmm10
pxor xmm0,xmm1
pxor xmm6,xmm7
DB 102,15,56,0,217
DB 102,68,15,56,0,223
movdqa xmm4,xmm10
movdqa xmm12,xmm10
pxor xmm3,xmm5
pxor xmm11,xmm13
DB 102,15,56,0,224
DB 102,68,15,56,0,230
movdqa xmm2,xmm10
movdqa xmm8,xmm10
pxor xmm4,xmm5
pxor xmm12,xmm13
DB 102,15,56,0,211
DB 102,69,15,56,0,195
movdqa xmm3,xmm10
movdqa xmm11,xmm10
pxor xmm2,xmm0
pxor xmm8,xmm6
DB 102,15,56,0,220
DB 102,69,15,56,0,220
movdqu xmm5,XMMWORD[r9]
pxor xmm3,xmm1
pxor xmm11,xmm7
jnz NEAR $L$enc2x_loop
movdqa xmm4,XMMWORD[((-96))+r10]
movdqa xmm0,XMMWORD[((-80))+r10]
movdqa xmm12,xmm4
movdqa xmm6,xmm0
DB 102,15,56,0,226
DB 102,69,15,56,0,224
pxor xmm4,xmm5
pxor xmm12,xmm5
DB 102,15,56,0,195
DB 102,65,15,56,0,243
movdqa xmm1,XMMWORD[64+r10*1+r11]
pxor xmm0,xmm4
pxor xmm6,xmm12
DB 102,15,56,0,193
DB 102,15,56,0,241
DB 0F3h,0C3h ;repret
ALIGN 16
_vpaes_decrypt_core:
@@ -644,6 +819,13 @@ $L$SEH_begin_vpaes_set_encrypt_key:
%ifndef NDEBUG
%ifndef BORINGSSL_FIPS
EXTERN BORINGSSL_function_hit
mov BYTE[((BORINGSSL_function_hit+5))],1
%endif
%endif
lea rsp,[((-184))+rsp]
movaps XMMWORD[16+rsp],xmm6
movaps XMMWORD[32+rsp],xmm7
@@ -755,6 +937,12 @@ $L$SEH_begin_vpaes_encrypt:
%ifndef NDEBUG
%ifndef BORINGSSL_FIPS
EXTERN BORINGSSL_function_hit
mov BYTE[((BORINGSSL_function_hit+4))],1
%endif
%endif
lea rsp,[((-184))+rsp]
movaps XMMWORD[16+rsp],xmm6
movaps XMMWORD[32+rsp],xmm7
@@ -916,6 +1104,105 @@ $L$cbc_abort:
DB 0F3h,0C3h ;repret
$L$SEH_end_vpaes_cbc_encrypt:
global vpaes_ctr32_encrypt_blocks
ALIGN 16
vpaes_ctr32_encrypt_blocks:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_vpaes_ctr32_encrypt_blocks:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov rcx,r9
mov r8,QWORD[40+rsp]
xchg rdx,rcx
test rcx,rcx
jz NEAR $L$ctr32_abort
lea rsp,[((-184))+rsp]
movaps XMMWORD[16+rsp],xmm6
movaps XMMWORD[32+rsp],xmm7
movaps XMMWORD[48+rsp],xmm8
movaps XMMWORD[64+rsp],xmm9
movaps XMMWORD[80+rsp],xmm10
movaps XMMWORD[96+rsp],xmm11
movaps XMMWORD[112+rsp],xmm12
movaps XMMWORD[128+rsp],xmm13
movaps XMMWORD[144+rsp],xmm14
movaps XMMWORD[160+rsp],xmm15
$L$ctr32_body:
movdqu xmm0,XMMWORD[r8]
movdqa xmm8,XMMWORD[$L$ctr_add_one]
sub rsi,rdi
call _vpaes_preheat
movdqa xmm6,xmm0
pshufb xmm6,XMMWORD[$L$rev_ctr]
test rcx,1
jz NEAR $L$ctr32_prep_loop
movdqu xmm7,XMMWORD[rdi]
call _vpaes_encrypt_core
pxor xmm0,xmm7
paddd xmm6,xmm8
movdqu XMMWORD[rdi*1+rsi],xmm0
sub rcx,1
lea rdi,[16+rdi]
jz NEAR $L$ctr32_done
$L$ctr32_prep_loop:
movdqa xmm14,xmm6
movdqa xmm15,xmm6
paddd xmm15,xmm8
$L$ctr32_loop:
movdqa xmm1,XMMWORD[$L$rev_ctr]
movdqa xmm0,xmm14
movdqa xmm6,xmm15
DB 102,15,56,0,193
DB 102,15,56,0,241
call _vpaes_encrypt_core_2x
movdqu xmm1,XMMWORD[rdi]
movdqu xmm2,XMMWORD[16+rdi]
movdqa xmm3,XMMWORD[$L$ctr_add_two]
pxor xmm0,xmm1
pxor xmm6,xmm2
paddd xmm14,xmm3
paddd xmm15,xmm3
movdqu XMMWORD[rdi*1+rsi],xmm0
movdqu XMMWORD[16+rdi*1+rsi],xmm6
sub rcx,2
lea rdi,[32+rdi]
jnz NEAR $L$ctr32_loop
$L$ctr32_done:
movaps xmm6,XMMWORD[16+rsp]
movaps xmm7,XMMWORD[32+rsp]
movaps xmm8,XMMWORD[48+rsp]
movaps xmm9,XMMWORD[64+rsp]
movaps xmm10,XMMWORD[80+rsp]
movaps xmm11,XMMWORD[96+rsp]
movaps xmm12,XMMWORD[112+rsp]
movaps xmm13,XMMWORD[128+rsp]
movaps xmm14,XMMWORD[144+rsp]
movaps xmm15,XMMWORD[160+rsp]
lea rsp,[184+rsp]
$L$ctr32_epilogue:
$L$ctr32_abort:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_vpaes_ctr32_encrypt_blocks:
@@ -1038,6 +1325,17 @@ $L$k_dsbe:
$L$k_dsbo:
DQ 0x1387EA537EF94000,0xC7AA6DB9D4943E2D
DQ 0x12D7560F93441D00,0xCA4B8159D8C58E9C
$L$rev_ctr:
DQ 0x0706050403020100,0x0c0d0e0f0b0a0908
$L$ctr_add_one:
DQ 0x0000000000000000,0x0000000100000000
$L$ctr_add_two:
DQ 0x0000000000000000,0x0000000200000000
DB 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
DB 111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54
DB 52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97
@@ -1146,6 +1444,10 @@ ALIGN 4
DD $L$SEH_end_vpaes_cbc_encrypt wrt ..imagebase
DD $L$SEH_info_vpaes_cbc_encrypt wrt ..imagebase
DD $L$SEH_begin_vpaes_ctr32_encrypt_blocks wrt ..imagebase
DD $L$SEH_end_vpaes_ctr32_encrypt_blocks wrt ..imagebase
DD $L$SEH_info_vpaes_ctr32_encrypt_blocks wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$SEH_info_vpaes_set_encrypt_key:
@@ -1168,3 +1470,7 @@ $L$SEH_info_vpaes_cbc_encrypt:
DB 9,0,0,0
DD se_handler wrt ..imagebase
DD $L$cbc_body wrt ..imagebase,$L$cbc_epilogue wrt ..imagebase
$L$SEH_info_vpaes_ctr32_encrypt_blocks:
DB 9,0,0,0
DD se_handler wrt ..imagebase
DD $L$ctr32_body wrt ..imagebase,$L$ctr32_epilogue wrt ..imagebase

View File

@@ -591,6 +591,7 @@ $L$SEH_end_bn_mul4x_mont_gather5:
ALIGN 32
mul4x_internal:
shl r9,5
movd xmm5,DWORD[56+rax]
lea rax,[$L$inc]
@@ -1113,6 +1114,7 @@ $L$inner4x:
mov r15,QWORD[24+rbp]
jmp NEAR $L$sqr4x_sub_entry
global bn_power5
ALIGN 32
@@ -1340,6 +1342,7 @@ __bn_sqr8x_internal:
lea rbp,[32+r10]
@@ -2045,8 +2048,10 @@ DB 102,73,15,126,217
DB 0F3h,0C3h ;repret
ALIGN 32
__bn_post4x_internal:
mov r12,QWORD[rbp]
lea rbx,[r9*1+rdi]
mov rcx,r9
@@ -2098,10 +2103,12 @@ $L$sqr4x_sub_entry:
neg r9
DB 0F3h,0C3h ;repret
global bn_from_montgomery
ALIGN 32
bn_from_montgomery:
test DWORD[48+rsp],7
jz NEAR bn_from_mont8x
xor eax,eax
@@ -2109,6 +2116,7 @@ bn_from_montgomery:
ALIGN 32
bn_from_mont8x:
mov QWORD[8+rsp],rdi ;WIN64 prologue
@@ -2418,6 +2426,7 @@ $L$SEH_end_bn_mulx4x_mont_gather5:
ALIGN 32
mulx4x_internal:
mov QWORD[8+rsp],r9
mov r10,r9
neg r9
@@ -2838,6 +2847,7 @@ $L$mulx4x_inner:
jmp NEAR $L$sqrx4x_sub_entry
ALIGN 32
bn_powerx5:
mov QWORD[8+rsp],rdi ;WIN64 prologue
@@ -3607,7 +3617,9 @@ DB 102,72,15,126,213
ALIGN 32
__bn_postx4x_internal:
mov r12,QWORD[rbp]
mov r10,rcx
mov r9,rcx
@@ -3656,10 +3668,12 @@ $L$sqrx4x_sub_entry:
DB 0F3h,0C3h ;repret
global bn_scatter5
ALIGN 16
bn_scatter5:
cmp edx,0
jz NEAR $L$scatter_epilogue
lea r8,[r9*8+r8]
@@ -3674,13 +3688,16 @@ $L$scatter_epilogue:
DB 0F3h,0C3h ;repret
global bn_gather5
ALIGN 32
bn_gather5:
$L$SEH_begin_bn_gather5:
DB 0x4c,0x8d,0x14,0x24
DB 0x48,0x81,0xec,0x08,0x01,0x00,0x00
lea rax,[$L$inc]
and rsp,-16
@@ -3834,9 +3851,11 @@ $L$gather:
jnz NEAR $L$gather
lea rsp,[r10]
DB 0F3h,0C3h ;repret
$L$SEH_end_bn_gather5:
ALIGN 64
$L$inc:
DD 0,0,1,1

View File

@@ -23,7 +23,7 @@ section .text code align=64
global abi_test_trampoline
ALIGN 16
abi_test_trampoline:
$L$abi_test_trampoline_begin:
$L$abi_test_trampoline_seh_begin:
@@ -36,62 +36,62 @@ $L$abi_test_trampoline_begin:
sub rsp,344
$L$abi_test_trampoline_prolog_alloc:
$L$abi_test_trampoline_seh_prolog_alloc:
mov QWORD[112+rsp],rbx
$L$abi_test_trampoline_prolog_rbx:
$L$abi_test_trampoline_seh_prolog_rbx:
mov QWORD[120+rsp],rbp
$L$abi_test_trampoline_prolog_rbp:
$L$abi_test_trampoline_seh_prolog_rbp:
mov QWORD[128+rsp],rdi
$L$abi_test_trampoline_prolog_rdi:
$L$abi_test_trampoline_seh_prolog_rdi:
mov QWORD[136+rsp],rsi
$L$abi_test_trampoline_prolog_rsi:
$L$abi_test_trampoline_seh_prolog_rsi:
mov QWORD[144+rsp],r12
$L$abi_test_trampoline_prolog_r12:
$L$abi_test_trampoline_seh_prolog_r12:
mov QWORD[152+rsp],r13
$L$abi_test_trampoline_prolog_r13:
$L$abi_test_trampoline_seh_prolog_r13:
mov QWORD[160+rsp],r14
$L$abi_test_trampoline_prolog_r14:
$L$abi_test_trampoline_seh_prolog_r14:
mov QWORD[168+rsp],r15
$L$abi_test_trampoline_prolog_r15:
$L$abi_test_trampoline_seh_prolog_r15:
movdqa XMMWORD[176+rsp],xmm6
$L$abi_test_trampoline_prolog_xmm6:
$L$abi_test_trampoline_seh_prolog_xmm6:
movdqa XMMWORD[192+rsp],xmm7
$L$abi_test_trampoline_prolog_xmm7:
$L$abi_test_trampoline_seh_prolog_xmm7:
movdqa XMMWORD[208+rsp],xmm8
$L$abi_test_trampoline_prolog_xmm8:
$L$abi_test_trampoline_seh_prolog_xmm8:
movdqa XMMWORD[224+rsp],xmm9
$L$abi_test_trampoline_prolog_xmm9:
$L$abi_test_trampoline_seh_prolog_xmm9:
movdqa XMMWORD[240+rsp],xmm10
$L$abi_test_trampoline_prolog_xmm10:
$L$abi_test_trampoline_seh_prolog_xmm10:
movdqa XMMWORD[256+rsp],xmm11
$L$abi_test_trampoline_prolog_xmm11:
$L$abi_test_trampoline_seh_prolog_xmm11:
movdqa XMMWORD[272+rsp],xmm12
$L$abi_test_trampoline_prolog_xmm12:
$L$abi_test_trampoline_seh_prolog_xmm12:
movdqa XMMWORD[288+rsp],xmm13
$L$abi_test_trampoline_prolog_xmm13:
$L$abi_test_trampoline_seh_prolog_xmm13:
movdqa XMMWORD[304+rsp],xmm14
$L$abi_test_trampoline_prolog_xmm14:
$L$abi_test_trampoline_seh_prolog_xmm14:
movdqa XMMWORD[320+rsp],xmm15
$L$abi_test_trampoline_prolog_xmm15:
$L$abi_test_trampoline_prolog_end:
$L$abi_test_trampoline_seh_prolog_xmm15:
$L$abi_test_trampoline_seh_prolog_end:
mov rbx,QWORD[rdx]
mov rbp,QWORD[8+rdx]
mov rdi,QWORD[16+rdx]
@@ -252,7 +252,7 @@ $L$call_done:
DB 0F3h,0C3h ;repret
$L$abi_test_trampoline_end:
$L$abi_test_trampoline_seh_end:
global abi_test_clobber_rax
@@ -479,11 +479,18 @@ global abi_test_bad_unwind_wrong_register
ALIGN 16
abi_test_bad_unwind_wrong_register:
$L$abi_test_bad_unwind_wrong_register_seh_begin:
push r12
$L$abi_test_bad_unwind_wrong_register_seh_push_r13:
nop
pop r12
DB 0F3h,0C3h ;repret
$L$abi_test_bad_unwind_wrong_register_seh_end:
@@ -495,20 +502,24 @@ global abi_test_bad_unwind_temporary
ALIGN 16
abi_test_bad_unwind_temporary:
$L$abi_test_bad_unwind_temporary_seh_begin:
push r12
$L$abi_test_bad_unwind_temporary_seh_push_r12:
mov rax,r12
inc rax
mov QWORD[rsp],rax
inc r12
mov QWORD[rsp],r12
dec r12
mov QWORD[rsp],r12
pop r12
DB 0F3h,0C3h ;repret
$L$abi_test_bad_unwind_temporary_seh_end:
@@ -521,7 +532,7 @@ abi_test_get_and_clear_direction_flag:
pushfq
pop rax
and rax,0x400
shl rax,10
shr rax,10
cld
DB 0F3h,0C3h ;repret
@@ -534,76 +545,138 @@ abi_test_set_direction_flag:
std
DB 0F3h,0C3h ;repret
global abi_test_bad_unwind_epilog
ALIGN 16
abi_test_bad_unwind_epilog:
$L$abi_test_bad_unwind_epilog_seh_begin:
push r12
$L$abi_test_bad_unwind_epilog_seh_push_r12:
nop
pop r12
nop
DB 0F3h,0C3h ;repret
$L$abi_test_bad_unwind_epilog_seh_end:
section .pdata rdata align=4
ALIGN 4
DD $L$abi_test_trampoline_begin wrt ..imagebase
DD $L$abi_test_trampoline_end wrt ..imagebase
DD $L$abi_test_trampoline_info wrt ..imagebase
DD $L$abi_test_trampoline_seh_begin wrt ..imagebase
DD $L$abi_test_trampoline_seh_end wrt ..imagebase
DD $L$abi_test_trampoline_seh_info wrt ..imagebase
DD $L$abi_test_bad_unwind_wrong_register_seh_begin wrt ..imagebase
DD $L$abi_test_bad_unwind_wrong_register_seh_end wrt ..imagebase
DD $L$abi_test_bad_unwind_wrong_register_seh_info wrt ..imagebase
DD $L$abi_test_bad_unwind_temporary_seh_begin wrt ..imagebase
DD $L$abi_test_bad_unwind_temporary_seh_end wrt ..imagebase
DD $L$abi_test_bad_unwind_temporary_seh_info wrt ..imagebase
DD $L$abi_test_bad_unwind_epilog_seh_begin wrt ..imagebase
DD $L$abi_test_bad_unwind_epilog_seh_end wrt ..imagebase
DD $L$abi_test_bad_unwind_epilog_seh_info wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$abi_test_trampoline_info:
$L$abi_test_trampoline_seh_info:
DB 1
DB $L$abi_test_trampoline_prolog_end-$L$abi_test_trampoline_begin
DB $L$abi_test_trampoline_seh_prolog_end-$L$abi_test_trampoline_seh_begin
DB 38
DB 0
DB $L$abi_test_trampoline_prolog_alloc-$L$abi_test_trampoline_begin
DB 1
DW 43
DB $L$abi_test_trampoline_prolog_rbx-$L$abi_test_trampoline_begin
DB 52
DW 14
DB $L$abi_test_trampoline_prolog_rbp-$L$abi_test_trampoline_begin
DB 84
DW 15
DB $L$abi_test_trampoline_prolog_rdi-$L$abi_test_trampoline_begin
DB 116
DW 16
DB $L$abi_test_trampoline_prolog_rsi-$L$abi_test_trampoline_begin
DB 100
DW 17
DB $L$abi_test_trampoline_prolog_r12-$L$abi_test_trampoline_begin
DB 196
DW 18
DB $L$abi_test_trampoline_prolog_r13-$L$abi_test_trampoline_begin
DB 212
DW 19
DB $L$abi_test_trampoline_prolog_r14-$L$abi_test_trampoline_begin
DB 228
DW 20
DB $L$abi_test_trampoline_prolog_r15-$L$abi_test_trampoline_begin
DB 244
DW 21
DB $L$abi_test_trampoline_prolog_xmm6-$L$abi_test_trampoline_begin
DB 104
DW 11
DB $L$abi_test_trampoline_prolog_xmm7-$L$abi_test_trampoline_begin
DB 120
DW 12
DB $L$abi_test_trampoline_prolog_xmm8-$L$abi_test_trampoline_begin
DB 136
DW 13
DB $L$abi_test_trampoline_prolog_xmm9-$L$abi_test_trampoline_begin
DB 152
DW 14
DB $L$abi_test_trampoline_prolog_xmm10-$L$abi_test_trampoline_begin
DB 168
DW 15
DB $L$abi_test_trampoline_prolog_xmm11-$L$abi_test_trampoline_begin
DB 184
DW 16
DB $L$abi_test_trampoline_prolog_xmm12-$L$abi_test_trampoline_begin
DB 200
DW 17
DB $L$abi_test_trampoline_prolog_xmm13-$L$abi_test_trampoline_begin
DB 216
DW 18
DB $L$abi_test_trampoline_prolog_xmm14-$L$abi_test_trampoline_begin
DB 232
DW 19
DB $L$abi_test_trampoline_prolog_xmm15-$L$abi_test_trampoline_begin
DB $L$abi_test_trampoline_seh_prolog_xmm15-$L$abi_test_trampoline_seh_begin
DB 248
DW 20
DB $L$abi_test_trampoline_seh_prolog_xmm14-$L$abi_test_trampoline_seh_begin
DB 232
DW 19
DB $L$abi_test_trampoline_seh_prolog_xmm13-$L$abi_test_trampoline_seh_begin
DB 216
DW 18
DB $L$abi_test_trampoline_seh_prolog_xmm12-$L$abi_test_trampoline_seh_begin
DB 200
DW 17
DB $L$abi_test_trampoline_seh_prolog_xmm11-$L$abi_test_trampoline_seh_begin
DB 184
DW 16
DB $L$abi_test_trampoline_seh_prolog_xmm10-$L$abi_test_trampoline_seh_begin
DB 168
DW 15
DB $L$abi_test_trampoline_seh_prolog_xmm9-$L$abi_test_trampoline_seh_begin
DB 152
DW 14
DB $L$abi_test_trampoline_seh_prolog_xmm8-$L$abi_test_trampoline_seh_begin
DB 136
DW 13
DB $L$abi_test_trampoline_seh_prolog_xmm7-$L$abi_test_trampoline_seh_begin
DB 120
DW 12
DB $L$abi_test_trampoline_seh_prolog_xmm6-$L$abi_test_trampoline_seh_begin
DB 104
DW 11
DB $L$abi_test_trampoline_seh_prolog_r15-$L$abi_test_trampoline_seh_begin
DB 244
DW 21
DB $L$abi_test_trampoline_seh_prolog_r14-$L$abi_test_trampoline_seh_begin
DB 228
DW 20
DB $L$abi_test_trampoline_seh_prolog_r13-$L$abi_test_trampoline_seh_begin
DB 212
DW 19
DB $L$abi_test_trampoline_seh_prolog_r12-$L$abi_test_trampoline_seh_begin
DB 196
DW 18
DB $L$abi_test_trampoline_seh_prolog_rsi-$L$abi_test_trampoline_seh_begin
DB 100
DW 17
DB $L$abi_test_trampoline_seh_prolog_rdi-$L$abi_test_trampoline_seh_begin
DB 116
DW 16
DB $L$abi_test_trampoline_seh_prolog_rbp-$L$abi_test_trampoline_seh_begin
DB 84
DW 15
DB $L$abi_test_trampoline_seh_prolog_rbx-$L$abi_test_trampoline_seh_begin
DB 52
DW 14
DB $L$abi_test_trampoline_seh_prolog_alloc-$L$abi_test_trampoline_seh_begin
DB 1
DW 43
ALIGN 8
$L$abi_test_bad_unwind_wrong_register_seh_info:
DB 1
DB $L$abi_test_bad_unwind_wrong_register_seh_push_r13-$L$abi_test_bad_unwind_wrong_register_seh_begin
DB 1
DB 0
DB $L$abi_test_bad_unwind_wrong_register_seh_push_r13-$L$abi_test_bad_unwind_wrong_register_seh_begin
DB 208
ALIGN 8
$L$abi_test_bad_unwind_temporary_seh_info:
DB 1
DB $L$abi_test_bad_unwind_temporary_seh_push_r12-$L$abi_test_bad_unwind_temporary_seh_begin
DB 1
DB 0
DB $L$abi_test_bad_unwind_temporary_seh_push_r12-$L$abi_test_bad_unwind_temporary_seh_begin
DB 192
ALIGN 8
$L$abi_test_bad_unwind_epilog_seh_info:
DB 1
DB $L$abi_test_bad_unwind_epilog_seh_push_r12-$L$abi_test_bad_unwind_epilog_seh_begin
DB 1
DB 0
DB $L$abi_test_bad_unwind_epilog_seh_push_r12-$L$abi_test_bad_unwind_epilog_seh_begin
DB 192

File diff suppressed because it is too large Load Diff