]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304659, and update
[FreeBSD/FreeBSD.git] / sys / contrib / cloudabi / cloudabi_vdso_x86_64.S
1 // Copyright (c) 2016 Nuxi (https://nuxi.nl/) and contributors.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions
5 // are met:
6 // 1. Redistributions of source code must retain the above copyright
7 //    notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright
9 //    notice, this list of conditions and the following disclaimer in the
10 //    documentation and/or other materials provided with the distribution.
11 //
12 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 // SUCH DAMAGE.
23 //
24 // This file is automatically generated. Do not edit.
25 //
26 // Source: https://github.com/NuxiNL/cloudabi
27
28 #define ENTRY(name)      \
29   .text;                 \
30   .p2align 4, 0x90;      \
31   .global name;          \
32   .type name, @function; \
33 name:
34
35 #define END(name) .size name, . - name
36
37 ENTRY(cloudabi_sys_clock_res_get)
38   push %rsi
39   mov $0, %eax
40   syscall
41   pop %rcx
42   jc 1f
43   mov %rax, (%rcx)
44   xor %eax, %eax
45 1:
46   ret
47 END(cloudabi_sys_clock_res_get)
48
49 ENTRY(cloudabi_sys_clock_time_get)
50   push %rdx
51   mov $1, %eax
52   syscall
53   pop %rcx
54   jc 1f
55   mov %rax, (%rcx)
56   xor %eax, %eax
57 1:
58   ret
59 END(cloudabi_sys_clock_time_get)
60
61 ENTRY(cloudabi_sys_condvar_signal)
62   mov $2, %eax
63   syscall
64   ret
65 END(cloudabi_sys_condvar_signal)
66
67 ENTRY(cloudabi_sys_fd_close)
68   mov $3, %eax
69   syscall
70   ret
71 END(cloudabi_sys_fd_close)
72
73 ENTRY(cloudabi_sys_fd_create1)
74   push %rsi
75   mov $4, %eax
76   syscall
77   pop %rcx
78   jc 1f
79   mov %eax, (%rcx)
80   xor %eax, %eax
81 1:
82   ret
83 END(cloudabi_sys_fd_create1)
84
85 ENTRY(cloudabi_sys_fd_create2)
86   push %rsi
87   push %rdx
88   mov $5, %eax
89   syscall
90   pop %rsi
91   pop %rcx
92   jc 1f
93   mov %eax, (%rcx)
94   mov %edx, (%rsi)
95   xor %eax, %eax
96 1:
97   ret
98 END(cloudabi_sys_fd_create2)
99
100 ENTRY(cloudabi_sys_fd_datasync)
101   mov $6, %eax
102   syscall
103   ret
104 END(cloudabi_sys_fd_datasync)
105
106 ENTRY(cloudabi_sys_fd_dup)
107   push %rsi
108   mov $7, %eax
109   syscall
110   pop %rcx
111   jc 1f
112   mov %eax, (%rcx)
113   xor %eax, %eax
114 1:
115   ret
116 END(cloudabi_sys_fd_dup)
117
118 ENTRY(cloudabi_sys_fd_pread)
119   mov %rcx, %r10
120   push %r8
121   mov $8, %eax
122   syscall
123   pop %rcx
124   jc 1f
125   mov %rax, (%rcx)
126   xor %eax, %eax
127 1:
128   ret
129 END(cloudabi_sys_fd_pread)
130
131 ENTRY(cloudabi_sys_fd_pwrite)
132   mov %rcx, %r10
133   push %r8
134   mov $9, %eax
135   syscall
136   pop %rcx
137   jc 1f
138   mov %rax, (%rcx)
139   xor %eax, %eax
140 1:
141   ret
142 END(cloudabi_sys_fd_pwrite)
143
144 ENTRY(cloudabi_sys_fd_read)
145   push %rcx
146   mov $10, %eax
147   syscall
148   pop %rcx
149   jc 1f
150   mov %rax, (%rcx)
151   xor %eax, %eax
152 1:
153   ret
154 END(cloudabi_sys_fd_read)
155
156 ENTRY(cloudabi_sys_fd_replace)
157   mov $11, %eax
158   syscall
159   ret
160 END(cloudabi_sys_fd_replace)
161
162 ENTRY(cloudabi_sys_fd_seek)
163   push %rcx
164   mov $12, %eax
165   syscall
166   pop %rcx
167   jc 1f
168   mov %rax, (%rcx)
169   xor %eax, %eax
170 1:
171   ret
172 END(cloudabi_sys_fd_seek)
173
174 ENTRY(cloudabi_sys_fd_stat_get)
175   mov $13, %eax
176   syscall
177   ret
178 END(cloudabi_sys_fd_stat_get)
179
180 ENTRY(cloudabi_sys_fd_stat_put)
181   mov $14, %eax
182   syscall
183   ret
184 END(cloudabi_sys_fd_stat_put)
185
186 ENTRY(cloudabi_sys_fd_sync)
187   mov $15, %eax
188   syscall
189   ret
190 END(cloudabi_sys_fd_sync)
191
192 ENTRY(cloudabi_sys_fd_write)
193   push %rcx
194   mov $16, %eax
195   syscall
196   pop %rcx
197   jc 1f
198   mov %rax, (%rcx)
199   xor %eax, %eax
200 1:
201   ret
202 END(cloudabi_sys_fd_write)
203
204 ENTRY(cloudabi_sys_file_advise)
205   mov %rcx, %r10
206   mov $17, %eax
207   syscall
208   ret
209 END(cloudabi_sys_file_advise)
210
211 ENTRY(cloudabi_sys_file_allocate)
212   mov $18, %eax
213   syscall
214   ret
215 END(cloudabi_sys_file_allocate)
216
217 ENTRY(cloudabi_sys_file_create)
218   mov %rcx, %r10
219   mov $19, %eax
220   syscall
221   ret
222 END(cloudabi_sys_file_create)
223
224 ENTRY(cloudabi_sys_file_link)
225   mov %rcx, %r10
226   mov $20, %eax
227   syscall
228   ret
229 END(cloudabi_sys_file_link)
230
231 ENTRY(cloudabi_sys_file_open)
232   mov %rcx, %r10
233   push %r9
234   mov $21, %eax
235   syscall
236   pop %rcx
237   jc 1f
238   mov %eax, (%rcx)
239   xor %eax, %eax
240 1:
241   ret
242 END(cloudabi_sys_file_open)
243
244 ENTRY(cloudabi_sys_file_readdir)
245   mov %rcx, %r10
246   push %r8
247   mov $22, %eax
248   syscall
249   pop %rcx
250   jc 1f
251   mov %rax, (%rcx)
252   xor %eax, %eax
253 1:
254   ret
255 END(cloudabi_sys_file_readdir)
256
257 ENTRY(cloudabi_sys_file_readlink)
258   mov %rcx, %r10
259   push %r9
260   mov $23, %eax
261   syscall
262   pop %rcx
263   jc 1f
264   mov %rax, (%rcx)
265   xor %eax, %eax
266 1:
267   ret
268 END(cloudabi_sys_file_readlink)
269
270 ENTRY(cloudabi_sys_file_rename)
271   mov %rcx, %r10
272   mov $24, %eax
273   syscall
274   ret
275 END(cloudabi_sys_file_rename)
276
277 ENTRY(cloudabi_sys_file_stat_fget)
278   mov $25, %eax
279   syscall
280   ret
281 END(cloudabi_sys_file_stat_fget)
282
283 ENTRY(cloudabi_sys_file_stat_fput)
284   mov $26, %eax
285   syscall
286   ret
287 END(cloudabi_sys_file_stat_fput)
288
289 ENTRY(cloudabi_sys_file_stat_get)
290   mov %rcx, %r10
291   mov $27, %eax
292   syscall
293   ret
294 END(cloudabi_sys_file_stat_get)
295
296 ENTRY(cloudabi_sys_file_stat_put)
297   mov %rcx, %r10
298   mov $28, %eax
299   syscall
300   ret
301 END(cloudabi_sys_file_stat_put)
302
303 ENTRY(cloudabi_sys_file_symlink)
304   mov %rcx, %r10
305   mov $29, %eax
306   syscall
307   ret
308 END(cloudabi_sys_file_symlink)
309
310 ENTRY(cloudabi_sys_file_unlink)
311   mov %rcx, %r10
312   mov $30, %eax
313   syscall
314   ret
315 END(cloudabi_sys_file_unlink)
316
317 ENTRY(cloudabi_sys_lock_unlock)
318   mov $31, %eax
319   syscall
320   ret
321 END(cloudabi_sys_lock_unlock)
322
323 ENTRY(cloudabi_sys_mem_advise)
324   mov $32, %eax
325   syscall
326   ret
327 END(cloudabi_sys_mem_advise)
328
329 ENTRY(cloudabi_sys_mem_lock)
330   mov $33, %eax
331   syscall
332   ret
333 END(cloudabi_sys_mem_lock)
334
335 ENTRY(cloudabi_sys_mem_map)
336   mov %rcx, %r10
337   mov $34, %eax
338   syscall
339   jc 1f
340   mov 8(%rsp), %rcx
341   mov %rax, (%rcx)
342   xor %eax, %eax
343 1:
344   ret
345 END(cloudabi_sys_mem_map)
346
347 ENTRY(cloudabi_sys_mem_protect)
348   mov $35, %eax
349   syscall
350   ret
351 END(cloudabi_sys_mem_protect)
352
353 ENTRY(cloudabi_sys_mem_sync)
354   mov $36, %eax
355   syscall
356   ret
357 END(cloudabi_sys_mem_sync)
358
359 ENTRY(cloudabi_sys_mem_unlock)
360   mov $37, %eax
361   syscall
362   ret
363 END(cloudabi_sys_mem_unlock)
364
365 ENTRY(cloudabi_sys_mem_unmap)
366   mov $38, %eax
367   syscall
368   ret
369 END(cloudabi_sys_mem_unmap)
370
371 ENTRY(cloudabi_sys_poll)
372   push %rcx
373   mov $39, %eax
374   syscall
375   pop %rcx
376   jc 1f
377   mov %rax, (%rcx)
378   xor %eax, %eax
379 1:
380   ret
381 END(cloudabi_sys_poll)
382
383 ENTRY(cloudabi_sys_poll_fd)
384   mov %rcx, %r10
385   mov $40, %eax
386   syscall
387   jc 1f
388   mov 8(%rsp), %rcx
389   mov %rax, (%rcx)
390   xor %eax, %eax
391 1:
392   ret
393 END(cloudabi_sys_poll_fd)
394
395 ENTRY(cloudabi_sys_proc_exec)
396   mov %rcx, %r10
397   mov $41, %eax
398   syscall
399   ret
400 END(cloudabi_sys_proc_exec)
401
402 ENTRY(cloudabi_sys_proc_exit)
403   mov $42, %eax
404   syscall
405 END(cloudabi_sys_proc_exit)
406
407 ENTRY(cloudabi_sys_proc_fork)
408   push %rdi
409   push %rsi
410   mov $43, %eax
411   syscall
412   pop %rsi
413   pop %rcx
414   jc 1f
415   mov %eax, (%rcx)
416   mov %edx, (%rsi)
417   xor %eax, %eax
418 1:
419   ret
420 END(cloudabi_sys_proc_fork)
421
422 ENTRY(cloudabi_sys_proc_raise)
423   mov $44, %eax
424   syscall
425   ret
426 END(cloudabi_sys_proc_raise)
427
428 ENTRY(cloudabi_sys_random_get)
429   mov $45, %eax
430   syscall
431   ret
432 END(cloudabi_sys_random_get)
433
434 ENTRY(cloudabi_sys_sock_accept)
435   push %rdx
436   mov $46, %eax
437   syscall
438   pop %rcx
439   jc 1f
440   mov %eax, (%rcx)
441   xor %eax, %eax
442 1:
443   ret
444 END(cloudabi_sys_sock_accept)
445
446 ENTRY(cloudabi_sys_sock_bind)
447   mov %rcx, %r10
448   mov $47, %eax
449   syscall
450   ret
451 END(cloudabi_sys_sock_bind)
452
453 ENTRY(cloudabi_sys_sock_connect)
454   mov %rcx, %r10
455   mov $48, %eax
456   syscall
457   ret
458 END(cloudabi_sys_sock_connect)
459
460 ENTRY(cloudabi_sys_sock_listen)
461   mov $49, %eax
462   syscall
463   ret
464 END(cloudabi_sys_sock_listen)
465
466 ENTRY(cloudabi_sys_sock_recv)
467   mov $50, %eax
468   syscall
469   ret
470 END(cloudabi_sys_sock_recv)
471
472 ENTRY(cloudabi_sys_sock_send)
473   mov $51, %eax
474   syscall
475   ret
476 END(cloudabi_sys_sock_send)
477
478 ENTRY(cloudabi_sys_sock_shutdown)
479   mov $52, %eax
480   syscall
481   ret
482 END(cloudabi_sys_sock_shutdown)
483
484 ENTRY(cloudabi_sys_sock_stat_get)
485   mov $53, %eax
486   syscall
487   ret
488 END(cloudabi_sys_sock_stat_get)
489
490 ENTRY(cloudabi_sys_thread_create)
491   push %rsi
492   mov $54, %eax
493   syscall
494   pop %rcx
495   jc 1f
496   mov %eax, (%rcx)
497   xor %eax, %eax
498 1:
499   ret
500 END(cloudabi_sys_thread_create)
501
502 ENTRY(cloudabi_sys_thread_exit)
503   mov $55, %eax
504   syscall
505 END(cloudabi_sys_thread_exit)
506
507 ENTRY(cloudabi_sys_thread_yield)
508   mov $56, %eax
509   syscall
510   ret
511 END(cloudabi_sys_thread_yield)