aws-lc-fips-sys 0.13.13

AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. This is the FIPS validated version of AWS-LC.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
; This file is generated from a similarly-named Perl script in the BoringSSL
; source tree. Do not edit by hand.

%ifidn __OUTPUT_FORMAT__, win64
default	rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
%define _CET_ENDBR

%include "openssl/boringssl_prefix_symbols_nasm.inc"
section	.text code align=64










global	abi_test_trampoline
ALIGN	16
abi_test_trampoline:

$L$SEH_begin_abi_test_trampoline_1:
_CET_ENDBR









	sub	rsp,344

$L$SEH_prolog_abi_test_trampoline_2:
	mov	QWORD[112+rsp],rbx

$L$SEH_prolog_abi_test_trampoline_3:
	mov	QWORD[120+rsp],rbp

$L$SEH_prolog_abi_test_trampoline_4:
	mov	QWORD[128+rsp],rdi

$L$SEH_prolog_abi_test_trampoline_5:
	mov	QWORD[136+rsp],rsi

$L$SEH_prolog_abi_test_trampoline_6:
	mov	QWORD[144+rsp],r12

$L$SEH_prolog_abi_test_trampoline_7:
	mov	QWORD[152+rsp],r13

$L$SEH_prolog_abi_test_trampoline_8:
	mov	QWORD[160+rsp],r14

$L$SEH_prolog_abi_test_trampoline_9:
	mov	QWORD[168+rsp],r15

$L$SEH_prolog_abi_test_trampoline_10:
	movdqa	XMMWORD[176+rsp],xmm6

$L$SEH_prolog_abi_test_trampoline_11:
	movdqa	XMMWORD[192+rsp],xmm7

$L$SEH_prolog_abi_test_trampoline_12:
	movdqa	XMMWORD[208+rsp],xmm8

$L$SEH_prolog_abi_test_trampoline_13:
	movdqa	XMMWORD[224+rsp],xmm9

$L$SEH_prolog_abi_test_trampoline_14:
	movdqa	XMMWORD[240+rsp],xmm10

$L$SEH_prolog_abi_test_trampoline_15:
	movdqa	XMMWORD[256+rsp],xmm11

$L$SEH_prolog_abi_test_trampoline_16:
	movdqa	XMMWORD[272+rsp],xmm12

$L$SEH_prolog_abi_test_trampoline_17:
	movdqa	XMMWORD[288+rsp],xmm13

$L$SEH_prolog_abi_test_trampoline_18:
	movdqa	XMMWORD[304+rsp],xmm14

$L$SEH_prolog_abi_test_trampoline_19:
	movdqa	XMMWORD[320+rsp],xmm15

$L$SEH_prolog_abi_test_trampoline_20:
	mov	rbx,QWORD[rdx]
	mov	rbp,QWORD[8+rdx]
	mov	rdi,QWORD[16+rdx]
	mov	rsi,QWORD[24+rdx]
	mov	r12,QWORD[32+rdx]
	mov	r13,QWORD[40+rdx]
	mov	r14,QWORD[48+rdx]
	mov	r15,QWORD[56+rdx]
	movdqa	xmm6,XMMWORD[64+rdx]
	movdqa	xmm7,XMMWORD[80+rdx]
	movdqa	xmm8,XMMWORD[96+rdx]
	movdqa	xmm9,XMMWORD[112+rdx]
	movdqa	xmm10,XMMWORD[128+rdx]
	movdqa	xmm11,XMMWORD[144+rdx]
	movdqa	xmm12,XMMWORD[160+rdx]
	movdqa	xmm13,XMMWORD[176+rdx]
	movdqa	xmm14,XMMWORD[192+rdx]
	movdqa	xmm15,XMMWORD[208+rdx]

	mov	QWORD[88+rsp],rcx
	mov	QWORD[96+rsp],rdx




	mov	r10,r8
	mov	r11,r9
	dec	r11
	js	NEAR $L$args_done
	mov	rcx,QWORD[r10]
	add	r10,8
	dec	r11
	js	NEAR $L$args_done
	mov	rdx,QWORD[r10]
	add	r10,8
	dec	r11
	js	NEAR $L$args_done
	mov	r8,QWORD[r10]
	add	r10,8
	dec	r11
	js	NEAR $L$args_done
	mov	r9,QWORD[r10]
	add	r10,8
	lea	rax,[32+rsp]
$L$args_loop:
	dec	r11
	js	NEAR $L$args_done






	mov	QWORD[104+rsp],r11
	mov	r11,QWORD[r10]
	mov	QWORD[rax],r11
	mov	r11,QWORD[104+rsp]

	add	r10,8
	add	rax,8
	jmp	NEAR $L$args_loop

$L$args_done:
	mov	rax,QWORD[88+rsp]
	mov	r10,QWORD[384+rsp]
	test	r10,r10
	jz	NEAR $L$no_unwind


	pushfq
	or	QWORD[rsp],0x100
	popfq



	nop
global	abi_test_unwind_start
abi_test_unwind_start:

	call	rax
global	abi_test_unwind_return
abi_test_unwind_return:




	pushfq
	and	QWORD[rsp],-0x101
	popfq
global	abi_test_unwind_stop
abi_test_unwind_stop:

	jmp	NEAR $L$call_done

$L$no_unwind:
	call	rax

$L$call_done:

	mov	rdx,QWORD[96+rsp]
	mov	QWORD[rdx],rbx
	mov	QWORD[8+rdx],rbp
	mov	QWORD[16+rdx],rdi
	mov	QWORD[24+rdx],rsi
	mov	QWORD[32+rdx],r12
	mov	QWORD[40+rdx],r13
	mov	QWORD[48+rdx],r14
	mov	QWORD[56+rdx],r15
	movdqa	XMMWORD[64+rdx],xmm6
	movdqa	XMMWORD[80+rdx],xmm7
	movdqa	XMMWORD[96+rdx],xmm8
	movdqa	XMMWORD[112+rdx],xmm9
	movdqa	XMMWORD[128+rdx],xmm10
	movdqa	XMMWORD[144+rdx],xmm11
	movdqa	XMMWORD[160+rdx],xmm12
	movdqa	XMMWORD[176+rdx],xmm13
	movdqa	XMMWORD[192+rdx],xmm14
	movdqa	XMMWORD[208+rdx],xmm15
	mov	rbx,QWORD[112+rsp]

	mov	rbp,QWORD[120+rsp]

	mov	rdi,QWORD[128+rsp]

	mov	rsi,QWORD[136+rsp]

	mov	r12,QWORD[144+rsp]

	mov	r13,QWORD[152+rsp]

	mov	r14,QWORD[160+rsp]

	mov	r15,QWORD[168+rsp]

	movdqa	xmm6,XMMWORD[176+rsp]

	movdqa	xmm7,XMMWORD[192+rsp]

	movdqa	xmm8,XMMWORD[208+rsp]

	movdqa	xmm9,XMMWORD[224+rsp]

	movdqa	xmm10,XMMWORD[240+rsp]

	movdqa	xmm11,XMMWORD[256+rsp]

	movdqa	xmm12,XMMWORD[272+rsp]

	movdqa	xmm13,XMMWORD[288+rsp]

	movdqa	xmm14,XMMWORD[304+rsp]

	movdqa	xmm15,XMMWORD[320+rsp]

	add	rsp,344



	DB	0F3h,0C3h		;repret

$L$SEH_end_abi_test_trampoline_21:


global	abi_test_clobber_rax
ALIGN	16
abi_test_clobber_rax:
_CET_ENDBR
	xor	rax,rax
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_rbx
ALIGN	16
abi_test_clobber_rbx:
_CET_ENDBR
	xor	rbx,rbx
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_rcx
ALIGN	16
abi_test_clobber_rcx:
_CET_ENDBR
	xor	rcx,rcx
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_rdx
ALIGN	16
abi_test_clobber_rdx:
_CET_ENDBR
	xor	rdx,rdx
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_rdi
ALIGN	16
abi_test_clobber_rdi:
_CET_ENDBR
	xor	rdi,rdi
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_rsi
ALIGN	16
abi_test_clobber_rsi:
_CET_ENDBR
	xor	rsi,rsi
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_rbp
ALIGN	16
abi_test_clobber_rbp:
_CET_ENDBR
	xor	rbp,rbp
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r8
ALIGN	16
abi_test_clobber_r8:
_CET_ENDBR
	xor	r8,r8
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r9
ALIGN	16
abi_test_clobber_r9:
_CET_ENDBR
	xor	r9,r9
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r10
ALIGN	16
abi_test_clobber_r10:
_CET_ENDBR
	xor	r10,r10
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r11
ALIGN	16
abi_test_clobber_r11:
_CET_ENDBR
	xor	r11,r11
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r12
ALIGN	16
abi_test_clobber_r12:
_CET_ENDBR
	xor	r12,r12
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r13
ALIGN	16
abi_test_clobber_r13:
_CET_ENDBR
	xor	r13,r13
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r14
ALIGN	16
abi_test_clobber_r14:
_CET_ENDBR
	xor	r14,r14
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_r15
ALIGN	16
abi_test_clobber_r15:
_CET_ENDBR
	xor	r15,r15
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm0
ALIGN	16
abi_test_clobber_xmm0:
_CET_ENDBR
	pxor	xmm0,xmm0
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm1
ALIGN	16
abi_test_clobber_xmm1:
_CET_ENDBR
	pxor	xmm1,xmm1
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm2
ALIGN	16
abi_test_clobber_xmm2:
_CET_ENDBR
	pxor	xmm2,xmm2
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm3
ALIGN	16
abi_test_clobber_xmm3:
_CET_ENDBR
	pxor	xmm3,xmm3
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm4
ALIGN	16
abi_test_clobber_xmm4:
_CET_ENDBR
	pxor	xmm4,xmm4
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm5
ALIGN	16
abi_test_clobber_xmm5:
_CET_ENDBR
	pxor	xmm5,xmm5
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm6
ALIGN	16
abi_test_clobber_xmm6:
_CET_ENDBR
	pxor	xmm6,xmm6
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm7
ALIGN	16
abi_test_clobber_xmm7:
_CET_ENDBR
	pxor	xmm7,xmm7
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm8
ALIGN	16
abi_test_clobber_xmm8:
_CET_ENDBR
	pxor	xmm8,xmm8
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm9
ALIGN	16
abi_test_clobber_xmm9:
_CET_ENDBR
	pxor	xmm9,xmm9
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm10
ALIGN	16
abi_test_clobber_xmm10:
_CET_ENDBR
	pxor	xmm10,xmm10
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm11
ALIGN	16
abi_test_clobber_xmm11:
_CET_ENDBR
	pxor	xmm11,xmm11
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm12
ALIGN	16
abi_test_clobber_xmm12:
_CET_ENDBR
	pxor	xmm12,xmm12
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm13
ALIGN	16
abi_test_clobber_xmm13:
_CET_ENDBR
	pxor	xmm13,xmm13
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm14
ALIGN	16
abi_test_clobber_xmm14:
_CET_ENDBR
	pxor	xmm14,xmm14
	DB	0F3h,0C3h		;repret


global	abi_test_clobber_xmm15
ALIGN	16
abi_test_clobber_xmm15:
_CET_ENDBR
	pxor	xmm15,xmm15
	DB	0F3h,0C3h		;repret





global	abi_test_bad_unwind_wrong_register
ALIGN	16
abi_test_bad_unwind_wrong_register:

$L$SEH_begin_abi_test_bad_unwind_wrong_register_1:
_CET_ENDBR
	push	r12

$L$SEH_prolog_abi_test_bad_unwind_wrong_register_2:



	nop
	pop	r12

	DB	0F3h,0C3h		;repret
$L$SEH_end_abi_test_bad_unwind_wrong_register_3:







global	abi_test_bad_unwind_temporary
ALIGN	16
abi_test_bad_unwind_temporary:

$L$SEH_begin_abi_test_bad_unwind_temporary_1:
_CET_ENDBR
	push	r12

$L$SEH_prolog_abi_test_bad_unwind_temporary_2:

	mov	rax,r12
	inc	rax
	mov	QWORD[rsp],rax



	mov	QWORD[rsp],r12


	pop	r12

	DB	0F3h,0C3h		;repret

$L$SEH_end_abi_test_bad_unwind_temporary_3:






global	abi_test_get_and_clear_direction_flag
abi_test_get_and_clear_direction_flag:
_CET_ENDBR
	pushfq
	pop	rax
	and	rax,0x400
	shr	rax,10
	cld
	DB	0F3h,0C3h		;repret





global	abi_test_set_direction_flag
abi_test_set_direction_flag:
_CET_ENDBR
	std
	DB	0F3h,0C3h		;repret






global	abi_test_bad_unwind_epilog
ALIGN	16
abi_test_bad_unwind_epilog:
$L$SEH_begin_abi_test_bad_unwind_epilog_1:
	push	r12
$L$SEH_prolog_abi_test_bad_unwind_epilog_2:

	nop


	pop	r12
	nop
	DB	0F3h,0C3h		;repret
$L$SEH_end_abi_test_bad_unwind_epilog_3:

section	.pdata rdata align=4
ALIGN	4
	DD	$L$SEH_begin_abi_test_trampoline_1 wrt ..imagebase
	DD	$L$SEH_end_abi_test_trampoline_21 wrt ..imagebase
	DD	$L$SEH_info_abi_test_trampoline_0 wrt ..imagebase

	DD	$L$SEH_begin_abi_test_bad_unwind_wrong_register_1 wrt ..imagebase
	DD	$L$SEH_end_abi_test_bad_unwind_wrong_register_3 wrt ..imagebase
	DD	$L$SEH_info_abi_test_bad_unwind_wrong_register_0 wrt ..imagebase

	DD	$L$SEH_begin_abi_test_bad_unwind_temporary_1 wrt ..imagebase
	DD	$L$SEH_end_abi_test_bad_unwind_temporary_3 wrt ..imagebase
	DD	$L$SEH_info_abi_test_bad_unwind_temporary_0 wrt ..imagebase

	DD	$L$SEH_begin_abi_test_bad_unwind_epilog_1 wrt ..imagebase
	DD	$L$SEH_end_abi_test_bad_unwind_epilog_3 wrt ..imagebase
	DD	$L$SEH_info_abi_test_bad_unwind_epilog_0 wrt ..imagebase


section	.xdata rdata align=8
ALIGN	4
$L$SEH_info_abi_test_trampoline_0:
	DB	1
	DB	$L$SEH_prolog_abi_test_trampoline_20-$L$SEH_begin_abi_test_trampoline_1
	DB	38
	DB	0
	DB	$L$SEH_prolog_abi_test_trampoline_20-$L$SEH_begin_abi_test_trampoline_1
	DB	248
	DW	20
	DB	$L$SEH_prolog_abi_test_trampoline_19-$L$SEH_begin_abi_test_trampoline_1
	DB	232
	DW	19
	DB	$L$SEH_prolog_abi_test_trampoline_18-$L$SEH_begin_abi_test_trampoline_1
	DB	216
	DW	18
	DB	$L$SEH_prolog_abi_test_trampoline_17-$L$SEH_begin_abi_test_trampoline_1
	DB	200
	DW	17
	DB	$L$SEH_prolog_abi_test_trampoline_16-$L$SEH_begin_abi_test_trampoline_1
	DB	184
	DW	16
	DB	$L$SEH_prolog_abi_test_trampoline_15-$L$SEH_begin_abi_test_trampoline_1
	DB	168
	DW	15
	DB	$L$SEH_prolog_abi_test_trampoline_14-$L$SEH_begin_abi_test_trampoline_1
	DB	152
	DW	14
	DB	$L$SEH_prolog_abi_test_trampoline_13-$L$SEH_begin_abi_test_trampoline_1
	DB	136
	DW	13
	DB	$L$SEH_prolog_abi_test_trampoline_12-$L$SEH_begin_abi_test_trampoline_1
	DB	120
	DW	12
	DB	$L$SEH_prolog_abi_test_trampoline_11-$L$SEH_begin_abi_test_trampoline_1
	DB	104
	DW	11
	DB	$L$SEH_prolog_abi_test_trampoline_10-$L$SEH_begin_abi_test_trampoline_1
	DB	244
	DW	21
	DB	$L$SEH_prolog_abi_test_trampoline_9-$L$SEH_begin_abi_test_trampoline_1
	DB	228
	DW	20
	DB	$L$SEH_prolog_abi_test_trampoline_8-$L$SEH_begin_abi_test_trampoline_1
	DB	212
	DW	19
	DB	$L$SEH_prolog_abi_test_trampoline_7-$L$SEH_begin_abi_test_trampoline_1
	DB	196
	DW	18
	DB	$L$SEH_prolog_abi_test_trampoline_6-$L$SEH_begin_abi_test_trampoline_1
	DB	100
	DW	17
	DB	$L$SEH_prolog_abi_test_trampoline_5-$L$SEH_begin_abi_test_trampoline_1
	DB	116
	DW	16
	DB	$L$SEH_prolog_abi_test_trampoline_4-$L$SEH_begin_abi_test_trampoline_1
	DB	84
	DW	15
	DB	$L$SEH_prolog_abi_test_trampoline_3-$L$SEH_begin_abi_test_trampoline_1
	DB	52
	DW	14
	DB	$L$SEH_prolog_abi_test_trampoline_2-$L$SEH_begin_abi_test_trampoline_1
	DB	1
	DW	43

$L$SEH_info_abi_test_bad_unwind_wrong_register_0:
	DB	1
	DB	$L$SEH_prolog_abi_test_bad_unwind_wrong_register_2-$L$SEH_begin_abi_test_bad_unwind_wrong_register_1
	DB	1
	DB	0
	DB	$L$SEH_prolog_abi_test_bad_unwind_wrong_register_2-$L$SEH_begin_abi_test_bad_unwind_wrong_register_1
	DB	208

$L$SEH_info_abi_test_bad_unwind_temporary_0:
	DB	1
	DB	$L$SEH_prolog_abi_test_bad_unwind_temporary_2-$L$SEH_begin_abi_test_bad_unwind_temporary_1
	DB	1
	DB	0
	DB	$L$SEH_prolog_abi_test_bad_unwind_temporary_2-$L$SEH_begin_abi_test_bad_unwind_temporary_1
	DB	192

$L$SEH_info_abi_test_bad_unwind_epilog_0:
	DB	1
	DB	$L$SEH_prolog_abi_test_bad_unwind_epilog_2-$L$SEH_begin_abi_test_bad_unwind_epilog_1
	DB	1
	DB	0
	DB	$L$SEH_prolog_abi_test_bad_unwind_epilog_2-$L$SEH_begin_abi_test_bad_unwind_epilog_1
	DB	192
%else
; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738
ret
%endif