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.type abi_test_trampoline, @function
24.globl abi_test_trampoline
25.hidden abi_test_trampoline
26.align 16
27abi_test_trampoline:
28.Labi_test_trampoline_seh_begin:
29.cfi_startproc
30
31
32
33
34
35
36
37
38
39 subq $120,%rsp
40.cfi_adjust_cfa_offset 120
41.Labi_test_trampoline_seh_prolog_alloc:
42 movq %r8,48(%rsp)
43 movq %rbx,64(%rsp)
44.cfi_offset rbx, -64
45.Labi_test_trampoline_seh_prolog_rbx:
46 movq %rbp,72(%rsp)
47.cfi_offset rbp, -56
48.Labi_test_trampoline_seh_prolog_rbp:
49 movq %r12,80(%rsp)
50.cfi_offset r12, -48
51.Labi_test_trampoline_seh_prolog_r12:
52 movq %r13,88(%rsp)
53.cfi_offset r13, -40
54.Labi_test_trampoline_seh_prolog_r13:
55 movq %r14,96(%rsp)
56.cfi_offset r14, -32
57.Labi_test_trampoline_seh_prolog_r14:
58 movq %r15,104(%rsp)
59.cfi_offset r15, -24
60.Labi_test_trampoline_seh_prolog_r15:
61.Labi_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 .Largs_done
79 movq (%r10),%rdi
80 addq $8,%r10
81 decq %r11
82 js .Largs_done
83 movq (%r10),%rsi
84 addq $8,%r10
85 decq %r11
86 js .Largs_done
87 movq (%r10),%rdx
88 addq $8,%r10
89 decq %r11
90 js .Largs_done
91 movq (%r10),%rcx
92 addq $8,%r10
93 decq %r11
94 js .Largs_done
95 movq (%r10),%r8
96 addq $8,%r10
97 decq %r11
98 js .Largs_done
99 movq (%r10),%r9
100 addq $8,%r10
101 leaq 0(%rsp),%rax
102.Largs_loop:
103 decq %r11
104 js .Largs_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 .Largs_loop
119
120.Largs_done:
121 movq 32(%rsp),%rax
122 movq 48(%rsp),%r10
123 testq %r10,%r10
124 jz .Lno_unwind
125
126
127 pushfq
128 orq $0x100,0(%rsp)
129 popfq
130
131
132
133 nop
134.globl abi_test_unwind_start
135.hidden abi_test_unwind_start
136abi_test_unwind_start:
137
138 call *%rax
139.globl abi_test_unwind_return
140.hidden abi_test_unwind_return
141abi_test_unwind_return:
142
143
144
145
146 pushfq
147 andq $-0x101,0(%rsp)
148 popfq
149.globl abi_test_unwind_stop
150.hidden abi_test_unwind_stop
151abi_test_unwind_stop:
152
153 jmp .Lcall_done
154
155.Lno_unwind:
156 call *%rax
157
158.Lcall_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.cfi_restore rbx
169 movq 72(%rsp),%rbp
170.cfi_restore rbp
171 movq 80(%rsp),%r12
172.cfi_restore r12
173 movq 88(%rsp),%r13
174.cfi_restore r13
175 movq 96(%rsp),%r14
176.cfi_restore r14
177 movq 104(%rsp),%r15
178.cfi_restore r15
179 addq $120,%rsp
180.cfi_adjust_cfa_offset -120
181
182
183 .byte 0xf3,0xc3
184.cfi_endproc
185.Labi_test_trampoline_seh_end:
186.size abi_test_trampoline,.-abi_test_trampoline
187.type abi_test_clobber_rax, @function
188.globl abi_test_clobber_rax
189.hidden abi_test_clobber_rax
190.align 16
191abi_test_clobber_rax:
192 xorq %rax,%rax
193 .byte 0xf3,0xc3
194.size abi_test_clobber_rax,.-abi_test_clobber_rax
195.type abi_test_clobber_rbx, @function
196.globl abi_test_clobber_rbx
197.hidden abi_test_clobber_rbx
198.align 16
199abi_test_clobber_rbx:
200 xorq %rbx,%rbx
201 .byte 0xf3,0xc3
202.size abi_test_clobber_rbx,.-abi_test_clobber_rbx
203.type abi_test_clobber_rcx, @function
204.globl abi_test_clobber_rcx
205.hidden abi_test_clobber_rcx
206.align 16
207abi_test_clobber_rcx:
208 xorq %rcx,%rcx
209 .byte 0xf3,0xc3
210.size abi_test_clobber_rcx,.-abi_test_clobber_rcx
211.type abi_test_clobber_rdx, @function
212.globl abi_test_clobber_rdx
213.hidden abi_test_clobber_rdx
214.align 16
215abi_test_clobber_rdx:
216 xorq %rdx,%rdx
217 .byte 0xf3,0xc3
218.size abi_test_clobber_rdx,.-abi_test_clobber_rdx
219.type abi_test_clobber_rdi, @function
220.globl abi_test_clobber_rdi
221.hidden abi_test_clobber_rdi
222.align 16
223abi_test_clobber_rdi:
224 xorq %rdi,%rdi
225 .byte 0xf3,0xc3
226.size abi_test_clobber_rdi,.-abi_test_clobber_rdi
227.type abi_test_clobber_rsi, @function
228.globl abi_test_clobber_rsi
229.hidden abi_test_clobber_rsi
230.align 16
231abi_test_clobber_rsi:
232 xorq %rsi,%rsi
233 .byte 0xf3,0xc3
234.size abi_test_clobber_rsi,.-abi_test_clobber_rsi
235.type abi_test_clobber_rbp, @function
236.globl abi_test_clobber_rbp
237.hidden abi_test_clobber_rbp
238.align 16
239abi_test_clobber_rbp:
240 xorq %rbp,%rbp
241 .byte 0xf3,0xc3
242.size abi_test_clobber_rbp,.-abi_test_clobber_rbp
243.type abi_test_clobber_r8, @function
244.globl abi_test_clobber_r8
245.hidden abi_test_clobber_r8
246.align 16
247abi_test_clobber_r8:
248 xorq %r8,%r8
249 .byte 0xf3,0xc3
250.size abi_test_clobber_r8,.-abi_test_clobber_r8
251.type abi_test_clobber_r9, @function
252.globl abi_test_clobber_r9
253.hidden abi_test_clobber_r9
254.align 16
255abi_test_clobber_r9:
256 xorq %r9,%r9
257 .byte 0xf3,0xc3
258.size abi_test_clobber_r9,.-abi_test_clobber_r9
259.type abi_test_clobber_r10, @function
260.globl abi_test_clobber_r10
261.hidden abi_test_clobber_r10
262.align 16
263abi_test_clobber_r10:
264 xorq %r10,%r10
265 .byte 0xf3,0xc3
266.size abi_test_clobber_r10,.-abi_test_clobber_r10
267.type abi_test_clobber_r11, @function
268.globl abi_test_clobber_r11
269.hidden abi_test_clobber_r11
270.align 16
271abi_test_clobber_r11:
272 xorq %r11,%r11
273 .byte 0xf3,0xc3
274.size abi_test_clobber_r11,.-abi_test_clobber_r11
275.type abi_test_clobber_r12, @function
276.globl abi_test_clobber_r12
277.hidden abi_test_clobber_r12
278.align 16
279abi_test_clobber_r12:
280 xorq %r12,%r12
281 .byte 0xf3,0xc3
282.size abi_test_clobber_r12,.-abi_test_clobber_r12
283.type abi_test_clobber_r13, @function
284.globl abi_test_clobber_r13
285.hidden abi_test_clobber_r13
286.align 16
287abi_test_clobber_r13:
288 xorq %r13,%r13
289 .byte 0xf3,0xc3
290.size abi_test_clobber_r13,.-abi_test_clobber_r13
291.type abi_test_clobber_r14, @function
292.globl abi_test_clobber_r14
293.hidden abi_test_clobber_r14
294.align 16
295abi_test_clobber_r14:
296 xorq %r14,%r14
297 .byte 0xf3,0xc3
298.size abi_test_clobber_r14,.-abi_test_clobber_r14
299.type abi_test_clobber_r15, @function
300.globl abi_test_clobber_r15
301.hidden abi_test_clobber_r15
302.align 16
303abi_test_clobber_r15:
304 xorq %r15,%r15
305 .byte 0xf3,0xc3
306.size abi_test_clobber_r15,.-abi_test_clobber_r15
307.type abi_test_clobber_xmm0, @function
308.globl abi_test_clobber_xmm0
309.hidden abi_test_clobber_xmm0
310.align 16
311abi_test_clobber_xmm0:
312 pxor %xmm0,%xmm0
313 .byte 0xf3,0xc3
314.size abi_test_clobber_xmm0,.-abi_test_clobber_xmm0
315.type abi_test_clobber_xmm1, @function
316.globl abi_test_clobber_xmm1
317.hidden abi_test_clobber_xmm1
318.align 16
319abi_test_clobber_xmm1:
320 pxor %xmm1,%xmm1
321 .byte 0xf3,0xc3
322.size abi_test_clobber_xmm1,.-abi_test_clobber_xmm1
323.type abi_test_clobber_xmm2, @function
324.globl abi_test_clobber_xmm2
325.hidden abi_test_clobber_xmm2
326.align 16
327abi_test_clobber_xmm2:
328 pxor %xmm2,%xmm2
329 .byte 0xf3,0xc3
330.size abi_test_clobber_xmm2,.-abi_test_clobber_xmm2
331.type abi_test_clobber_xmm3, @function
332.globl abi_test_clobber_xmm3
333.hidden abi_test_clobber_xmm3
334.align 16
335abi_test_clobber_xmm3:
336 pxor %xmm3,%xmm3
337 .byte 0xf3,0xc3
338.size abi_test_clobber_xmm3,.-abi_test_clobber_xmm3
339.type abi_test_clobber_xmm4, @function
340.globl abi_test_clobber_xmm4
341.hidden abi_test_clobber_xmm4
342.align 16
343abi_test_clobber_xmm4:
344 pxor %xmm4,%xmm4
345 .byte 0xf3,0xc3
346.size abi_test_clobber_xmm4,.-abi_test_clobber_xmm4
347.type abi_test_clobber_xmm5, @function
348.globl abi_test_clobber_xmm5
349.hidden abi_test_clobber_xmm5
350.align 16
351abi_test_clobber_xmm5:
352 pxor %xmm5,%xmm5
353 .byte 0xf3,0xc3
354.size abi_test_clobber_xmm5,.-abi_test_clobber_xmm5
355.type abi_test_clobber_xmm6, @function
356.globl abi_test_clobber_xmm6
357.hidden abi_test_clobber_xmm6
358.align 16
359abi_test_clobber_xmm6:
360 pxor %xmm6,%xmm6
361 .byte 0xf3,0xc3
362.size abi_test_clobber_xmm6,.-abi_test_clobber_xmm6
363.type abi_test_clobber_xmm7, @function
364.globl abi_test_clobber_xmm7
365.hidden abi_test_clobber_xmm7
366.align 16
367abi_test_clobber_xmm7:
368 pxor %xmm7,%xmm7
369 .byte 0xf3,0xc3
370.size abi_test_clobber_xmm7,.-abi_test_clobber_xmm7
371.type abi_test_clobber_xmm8, @function
372.globl abi_test_clobber_xmm8
373.hidden abi_test_clobber_xmm8
374.align 16
375abi_test_clobber_xmm8:
376 pxor %xmm8,%xmm8
377 .byte 0xf3,0xc3
378.size abi_test_clobber_xmm8,.-abi_test_clobber_xmm8
379.type abi_test_clobber_xmm9, @function
380.globl abi_test_clobber_xmm9
381.hidden abi_test_clobber_xmm9
382.align 16
383abi_test_clobber_xmm9:
384 pxor %xmm9,%xmm9
385 .byte 0xf3,0xc3
386.size abi_test_clobber_xmm9,.-abi_test_clobber_xmm9
387.type abi_test_clobber_xmm10, @function
388.globl abi_test_clobber_xmm10
389.hidden abi_test_clobber_xmm10
390.align 16
391abi_test_clobber_xmm10:
392 pxor %xmm10,%xmm10
393 .byte 0xf3,0xc3
394.size abi_test_clobber_xmm10,.-abi_test_clobber_xmm10
395.type abi_test_clobber_xmm11, @function
396.globl abi_test_clobber_xmm11
397.hidden abi_test_clobber_xmm11
398.align 16
399abi_test_clobber_xmm11:
400 pxor %xmm11,%xmm11
401 .byte 0xf3,0xc3
402.size abi_test_clobber_xmm11,.-abi_test_clobber_xmm11
403.type abi_test_clobber_xmm12, @function
404.globl abi_test_clobber_xmm12
405.hidden abi_test_clobber_xmm12
406.align 16
407abi_test_clobber_xmm12:
408 pxor %xmm12,%xmm12
409 .byte 0xf3,0xc3
410.size abi_test_clobber_xmm12,.-abi_test_clobber_xmm12
411.type abi_test_clobber_xmm13, @function
412.globl abi_test_clobber_xmm13
413.hidden abi_test_clobber_xmm13
414.align 16
415abi_test_clobber_xmm13:
416 pxor %xmm13,%xmm13
417 .byte 0xf3,0xc3
418.size abi_test_clobber_xmm13,.-abi_test_clobber_xmm13
419.type abi_test_clobber_xmm14, @function
420.globl abi_test_clobber_xmm14
421.hidden abi_test_clobber_xmm14
422.align 16
423abi_test_clobber_xmm14:
424 pxor %xmm14,%xmm14
425 .byte 0xf3,0xc3
426.size abi_test_clobber_xmm14,.-abi_test_clobber_xmm14
427.type abi_test_clobber_xmm15, @function
428.globl abi_test_clobber_xmm15
429.hidden abi_test_clobber_xmm15
430.align 16
431abi_test_clobber_xmm15:
432 pxor %xmm15,%xmm15
433 .byte 0xf3,0xc3
434.size abi_test_clobber_xmm15,.-abi_test_clobber_xmm15
435
436
437
438.type abi_test_bad_unwind_wrong_register, @function
439.globl abi_test_bad_unwind_wrong_register
440.hidden abi_test_bad_unwind_wrong_register
441.align 16
442abi_test_bad_unwind_wrong_register:
443.cfi_startproc
444.Labi_test_bad_unwind_wrong_register_seh_begin:
445 pushq %r12
446.cfi_adjust_cfa_offset 8
447.cfi_offset %r13,-16
448.Labi_test_bad_unwind_wrong_register_seh_push_r13:
449
450
451
452 nop
453 popq %r12
454.cfi_adjust_cfa_offset -8
455.cfi_restore %r12
456 .byte 0xf3,0xc3
457.Labi_test_bad_unwind_wrong_register_seh_end:
458.cfi_endproc
459.size abi_test_bad_unwind_wrong_register,.-abi_test_bad_unwind_wrong_register
460
461
462
463
464.type abi_test_bad_unwind_temporary, @function
465.globl abi_test_bad_unwind_temporary
466.hidden abi_test_bad_unwind_temporary
467.align 16
468abi_test_bad_unwind_temporary:
469.cfi_startproc
470.Labi_test_bad_unwind_temporary_seh_begin:
471 pushq %r12
472.cfi_adjust_cfa_offset 8
473.cfi_offset %r12,-16
474.Labi_test_bad_unwind_temporary_seh_push_r12:
475
476 movq %r12,%rax
477 incq %rax
478 movq %rax,(%rsp)
479
480
481
482 movq %r12,(%rsp)
483
484
485 popq %r12
486.cfi_adjust_cfa_offset -8
487.cfi_restore %r12
488 .byte 0xf3,0xc3
489.Labi_test_bad_unwind_temporary_seh_end:
490.cfi_endproc
491.size abi_test_bad_unwind_temporary,.-abi_test_bad_unwind_temporary
492
493
494
495
496.type abi_test_set_direction_flag, @function
497.globl abi_test_get_and_clear_direction_flag
498.hidden abi_test_get_and_clear_direction_flag
499abi_test_get_and_clear_direction_flag:
500 pushfq
501 popq %rax
502 andq $0x400,%rax
503 shrq $10,%rax
504 cld
505 .byte 0xf3,0xc3
506.size abi_test_get_and_clear_direction_flag,.-abi_test_get_and_clear_direction_flag
507
508
509
510.type abi_test_set_direction_flag, @function
511.globl abi_test_set_direction_flag
512.hidden abi_test_set_direction_flag
513abi_test_set_direction_flag:
514 std
515 .byte 0xf3,0xc3
516.size abi_test_set_direction_flag,.-abi_test_set_direction_flag
517#endif
518