1# This file is generated from a similarly-named Perl script in the BoringSSL
2# source tree. Do not edit by hand.
3
4#if defined(__has_feature)
5#if __has_feature(memory_sanitizer) && !defined(OPENSSL_NO_ASM)
6#define OPENSSL_NO_ASM
7#endif
8#endif
9
10#if defined(__x86_64__) && !defined(OPENSSL_NO_ASM)
11#if defined(BORINGSSL_PREFIX)
12#include <boringssl_prefix_symbols_asm.h>
13#endif
14.text
15
16
17
18
19
20
21
22
23
24.globl	_abi_test_trampoline
25.private_extern _abi_test_trampoline
26.p2align	4
27_abi_test_trampoline:
28L$abi_test_trampoline_seh_begin:
29
30
31
32
33
34
35
36
37
38
39	subq	$120,%rsp
40
41L$abi_test_trampoline_seh_prolog_alloc:
42	movq	%r8,48(%rsp)
43	movq	%rbx,64(%rsp)
44
45L$abi_test_trampoline_seh_prolog_rbx:
46	movq	%rbp,72(%rsp)
47
48L$abi_test_trampoline_seh_prolog_rbp:
49	movq	%r12,80(%rsp)
50
51L$abi_test_trampoline_seh_prolog_r12:
52	movq	%r13,88(%rsp)
53
54L$abi_test_trampoline_seh_prolog_r13:
55	movq	%r14,96(%rsp)
56
57L$abi_test_trampoline_seh_prolog_r14:
58	movq	%r15,104(%rsp)
59
60L$abi_test_trampoline_seh_prolog_r15:
61L$abi_test_trampoline_seh_prolog_end:
62	movq	0(%rsi),%rbx
63	movq	8(%rsi),%rbp
64	movq	16(%rsi),%r12
65	movq	24(%rsi),%r13
66	movq	32(%rsi),%r14
67	movq	40(%rsi),%r15
68
69	movq	%rdi,32(%rsp)
70	movq	%rsi,40(%rsp)
71
72
73
74
75	movq	%rdx,%r10
76	movq	%rcx,%r11
77	decq	%r11
78	js	L$args_done
79	movq	(%r10),%rdi
80	addq	$8,%r10
81	decq	%r11
82	js	L$args_done
83	movq	(%r10),%rsi
84	addq	$8,%r10
85	decq	%r11
86	js	L$args_done
87	movq	(%r10),%rdx
88	addq	$8,%r10
89	decq	%r11
90	js	L$args_done
91	movq	(%r10),%rcx
92	addq	$8,%r10
93	decq	%r11
94	js	L$args_done
95	movq	(%r10),%r8
96	addq	$8,%r10
97	decq	%r11
98	js	L$args_done
99	movq	(%r10),%r9
100	addq	$8,%r10
101	leaq	0(%rsp),%rax
102L$args_loop:
103	decq	%r11
104	js	L$args_done
105
106
107
108
109
110
111	movq	%r11,56(%rsp)
112	movq	(%r10),%r11
113	movq	%r11,(%rax)
114	movq	56(%rsp),%r11
115
116	addq	$8,%r10
117	addq	$8,%rax
118	jmp	L$args_loop
119
120L$args_done:
121	movq	32(%rsp),%rax
122	movq	48(%rsp),%r10
123	testq	%r10,%r10
124	jz	L$no_unwind
125
126
127	pushfq
128	orq	$0x100,0(%rsp)
129	popfq
130
131
132
133	nop
134.globl	_abi_test_unwind_start
135.private_extern _abi_test_unwind_start
136_abi_test_unwind_start:
137
138	call	*%rax
139.globl	_abi_test_unwind_return
140.private_extern _abi_test_unwind_return
141_abi_test_unwind_return:
142
143
144
145
146	pushfq
147	andq	$-0x101,0(%rsp)
148	popfq
149.globl	_abi_test_unwind_stop
150.private_extern _abi_test_unwind_stop
151_abi_test_unwind_stop:
152
153	jmp	L$call_done
154
155L$no_unwind:
156	call	*%rax
157
158L$call_done:
159
160	movq	40(%rsp),%rsi
161	movq	%rbx,0(%rsi)
162	movq	%rbp,8(%rsi)
163	movq	%r12,16(%rsi)
164	movq	%r13,24(%rsi)
165	movq	%r14,32(%rsi)
166	movq	%r15,40(%rsi)
167	movq	64(%rsp),%rbx
168
169	movq	72(%rsp),%rbp
170
171	movq	80(%rsp),%r12
172
173	movq	88(%rsp),%r13
174
175	movq	96(%rsp),%r14
176
177	movq	104(%rsp),%r15
178
179	addq	$120,%rsp
180
181
182
183	.byte	0xf3,0xc3
184
185L$abi_test_trampoline_seh_end:
186
187
188.globl	_abi_test_clobber_rax
189.private_extern _abi_test_clobber_rax
190.p2align	4
191_abi_test_clobber_rax:
192	xorq	%rax,%rax
193	.byte	0xf3,0xc3
194
195
196.globl	_abi_test_clobber_rbx
197.private_extern _abi_test_clobber_rbx
198.p2align	4
199_abi_test_clobber_rbx:
200	xorq	%rbx,%rbx
201	.byte	0xf3,0xc3
202
203
204.globl	_abi_test_clobber_rcx
205.private_extern _abi_test_clobber_rcx
206.p2align	4
207_abi_test_clobber_rcx:
208	xorq	%rcx,%rcx
209	.byte	0xf3,0xc3
210
211
212.globl	_abi_test_clobber_rdx
213.private_extern _abi_test_clobber_rdx
214.p2align	4
215_abi_test_clobber_rdx:
216	xorq	%rdx,%rdx
217	.byte	0xf3,0xc3
218
219
220.globl	_abi_test_clobber_rdi
221.private_extern _abi_test_clobber_rdi
222.p2align	4
223_abi_test_clobber_rdi:
224	xorq	%rdi,%rdi
225	.byte	0xf3,0xc3
226
227
228.globl	_abi_test_clobber_rsi
229.private_extern _abi_test_clobber_rsi
230.p2align	4
231_abi_test_clobber_rsi:
232	xorq	%rsi,%rsi
233	.byte	0xf3,0xc3
234
235
236.globl	_abi_test_clobber_rbp
237.private_extern _abi_test_clobber_rbp
238.p2align	4
239_abi_test_clobber_rbp:
240	xorq	%rbp,%rbp
241	.byte	0xf3,0xc3
242
243
244.globl	_abi_test_clobber_r8
245.private_extern _abi_test_clobber_r8
246.p2align	4
247_abi_test_clobber_r8:
248	xorq	%r8,%r8
249	.byte	0xf3,0xc3
250
251
252.globl	_abi_test_clobber_r9
253.private_extern _abi_test_clobber_r9
254.p2align	4
255_abi_test_clobber_r9:
256	xorq	%r9,%r9
257	.byte	0xf3,0xc3
258
259
260.globl	_abi_test_clobber_r10
261.private_extern _abi_test_clobber_r10
262.p2align	4
263_abi_test_clobber_r10:
264	xorq	%r10,%r10
265	.byte	0xf3,0xc3
266
267
268.globl	_abi_test_clobber_r11
269.private_extern _abi_test_clobber_r11
270.p2align	4
271_abi_test_clobber_r11:
272	xorq	%r11,%r11
273	.byte	0xf3,0xc3
274
275
276.globl	_abi_test_clobber_r12
277.private_extern _abi_test_clobber_r12
278.p2align	4
279_abi_test_clobber_r12:
280	xorq	%r12,%r12
281	.byte	0xf3,0xc3
282
283
284.globl	_abi_test_clobber_r13
285.private_extern _abi_test_clobber_r13
286.p2align	4
287_abi_test_clobber_r13:
288	xorq	%r13,%r13
289	.byte	0xf3,0xc3
290
291
292.globl	_abi_test_clobber_r14
293.private_extern _abi_test_clobber_r14
294.p2align	4
295_abi_test_clobber_r14:
296	xorq	%r14,%r14
297	.byte	0xf3,0xc3
298
299
300.globl	_abi_test_clobber_r15
301.private_extern _abi_test_clobber_r15
302.p2align	4
303_abi_test_clobber_r15:
304	xorq	%r15,%r15
305	.byte	0xf3,0xc3
306
307
308.globl	_abi_test_clobber_xmm0
309.private_extern _abi_test_clobber_xmm0
310.p2align	4
311_abi_test_clobber_xmm0:
312	pxor	%xmm0,%xmm0
313	.byte	0xf3,0xc3
314
315
316.globl	_abi_test_clobber_xmm1
317.private_extern _abi_test_clobber_xmm1
318.p2align	4
319_abi_test_clobber_xmm1:
320	pxor	%xmm1,%xmm1
321	.byte	0xf3,0xc3
322
323
324.globl	_abi_test_clobber_xmm2
325.private_extern _abi_test_clobber_xmm2
326.p2align	4
327_abi_test_clobber_xmm2:
328	pxor	%xmm2,%xmm2
329	.byte	0xf3,0xc3
330
331
332.globl	_abi_test_clobber_xmm3
333.private_extern _abi_test_clobber_xmm3
334.p2align	4
335_abi_test_clobber_xmm3:
336	pxor	%xmm3,%xmm3
337	.byte	0xf3,0xc3
338
339
340.globl	_abi_test_clobber_xmm4
341.private_extern _abi_test_clobber_xmm4
342.p2align	4
343_abi_test_clobber_xmm4:
344	pxor	%xmm4,%xmm4
345	.byte	0xf3,0xc3
346
347
348.globl	_abi_test_clobber_xmm5
349.private_extern _abi_test_clobber_xmm5
350.p2align	4
351_abi_test_clobber_xmm5:
352	pxor	%xmm5,%xmm5
353	.byte	0xf3,0xc3
354
355
356.globl	_abi_test_clobber_xmm6
357.private_extern _abi_test_clobber_xmm6
358.p2align	4
359_abi_test_clobber_xmm6:
360	pxor	%xmm6,%xmm6
361	.byte	0xf3,0xc3
362
363
364.globl	_abi_test_clobber_xmm7
365.private_extern _abi_test_clobber_xmm7
366.p2align	4
367_abi_test_clobber_xmm7:
368	pxor	%xmm7,%xmm7
369	.byte	0xf3,0xc3
370
371
372.globl	_abi_test_clobber_xmm8
373.private_extern _abi_test_clobber_xmm8
374.p2align	4
375_abi_test_clobber_xmm8:
376	pxor	%xmm8,%xmm8
377	.byte	0xf3,0xc3
378
379
380.globl	_abi_test_clobber_xmm9
381.private_extern _abi_test_clobber_xmm9
382.p2align	4
383_abi_test_clobber_xmm9:
384	pxor	%xmm9,%xmm9
385	.byte	0xf3,0xc3
386
387
388.globl	_abi_test_clobber_xmm10
389.private_extern _abi_test_clobber_xmm10
390.p2align	4
391_abi_test_clobber_xmm10:
392	pxor	%xmm10,%xmm10
393	.byte	0xf3,0xc3
394
395
396.globl	_abi_test_clobber_xmm11
397.private_extern _abi_test_clobber_xmm11
398.p2align	4
399_abi_test_clobber_xmm11:
400	pxor	%xmm11,%xmm11
401	.byte	0xf3,0xc3
402
403
404.globl	_abi_test_clobber_xmm12
405.private_extern _abi_test_clobber_xmm12
406.p2align	4
407_abi_test_clobber_xmm12:
408	pxor	%xmm12,%xmm12
409	.byte	0xf3,0xc3
410
411
412.globl	_abi_test_clobber_xmm13
413.private_extern _abi_test_clobber_xmm13
414.p2align	4
415_abi_test_clobber_xmm13:
416	pxor	%xmm13,%xmm13
417	.byte	0xf3,0xc3
418
419
420.globl	_abi_test_clobber_xmm14
421.private_extern _abi_test_clobber_xmm14
422.p2align	4
423_abi_test_clobber_xmm14:
424	pxor	%xmm14,%xmm14
425	.byte	0xf3,0xc3
426
427
428.globl	_abi_test_clobber_xmm15
429.private_extern _abi_test_clobber_xmm15
430.p2align	4
431_abi_test_clobber_xmm15:
432	pxor	%xmm15,%xmm15
433	.byte	0xf3,0xc3
434
435
436
437
438
439.globl	_abi_test_bad_unwind_wrong_register
440.private_extern _abi_test_bad_unwind_wrong_register
441.p2align	4
442_abi_test_bad_unwind_wrong_register:
443
444L$abi_test_bad_unwind_wrong_register_seh_begin:
445	pushq	%r12
446
447L$abi_test_bad_unwind_wrong_register_seh_push_r13:
448
449
450
451	nop
452	popq	%r12
453
454	.byte	0xf3,0xc3
455L$abi_test_bad_unwind_wrong_register_seh_end:
456
457
458
459
460
461
462
463.globl	_abi_test_bad_unwind_temporary
464.private_extern _abi_test_bad_unwind_temporary
465.p2align	4
466_abi_test_bad_unwind_temporary:
467
468L$abi_test_bad_unwind_temporary_seh_begin:
469	pushq	%r12
470
471L$abi_test_bad_unwind_temporary_seh_push_r12:
472
473	movq	%r12,%rax
474	incq	%rax
475	movq	%rax,(%rsp)
476
477
478
479	movq	%r12,(%rsp)
480
481
482	popq	%r12
483
484	.byte	0xf3,0xc3
485L$abi_test_bad_unwind_temporary_seh_end:
486
487
488
489
490
491
492
493.globl	_abi_test_get_and_clear_direction_flag
494.private_extern _abi_test_get_and_clear_direction_flag
495_abi_test_get_and_clear_direction_flag:
496	pushfq
497	popq	%rax
498	andq	$0x400,%rax
499	shrq	$10,%rax
500	cld
501	.byte	0xf3,0xc3
502
503
504
505
506
507.globl	_abi_test_set_direction_flag
508.private_extern _abi_test_set_direction_flag
509_abi_test_set_direction_flag:
510	std
511	.byte	0xf3,0xc3
512
513#endif
514