]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
patch(1): Fix a few mandoc related issues
[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_map)
330   mov %rcx, %r10
331   mov $33, %eax
332   syscall
333   jc 1f
334   mov 8(%rsp), %rcx
335   mov %rax, (%rcx)
336   xor %eax, %eax
337 1:
338   ret
339 END(cloudabi_sys_mem_map)
340
341 ENTRY(cloudabi_sys_mem_protect)
342   mov $34, %eax
343   syscall
344   ret
345 END(cloudabi_sys_mem_protect)
346
347 ENTRY(cloudabi_sys_mem_sync)
348   mov $35, %eax
349   syscall
350   ret
351 END(cloudabi_sys_mem_sync)
352
353 ENTRY(cloudabi_sys_mem_unmap)
354   mov $36, %eax
355   syscall
356   ret
357 END(cloudabi_sys_mem_unmap)
358
359 ENTRY(cloudabi_sys_poll)
360   push %rcx
361   mov $37, %eax
362   syscall
363   pop %rcx
364   jc 1f
365   mov %rax, (%rcx)
366   xor %eax, %eax
367 1:
368   ret
369 END(cloudabi_sys_poll)
370
371 ENTRY(cloudabi_sys_proc_exec)
372   mov %rcx, %r10
373   mov $38, %eax
374   syscall
375   ret
376 END(cloudabi_sys_proc_exec)
377
378 ENTRY(cloudabi_sys_proc_exit)
379   mov $39, %eax
380   syscall
381 END(cloudabi_sys_proc_exit)
382
383 ENTRY(cloudabi_sys_proc_fork)
384   push %rdi
385   push %rsi
386   mov $40, %eax
387   syscall
388   pop %rsi
389   pop %rcx
390   jc 1f
391   mov %eax, (%rcx)
392   mov %edx, (%rsi)
393   xor %eax, %eax
394 1:
395   ret
396 END(cloudabi_sys_proc_fork)
397
398 ENTRY(cloudabi_sys_proc_raise)
399   mov $41, %eax
400   syscall
401   ret
402 END(cloudabi_sys_proc_raise)
403
404 ENTRY(cloudabi_sys_random_get)
405   mov $42, %eax
406   syscall
407   ret
408 END(cloudabi_sys_random_get)
409
410 ENTRY(cloudabi_sys_sock_recv)
411   mov $43, %eax
412   syscall
413   ret
414 END(cloudabi_sys_sock_recv)
415
416 ENTRY(cloudabi_sys_sock_send)
417   mov $44, %eax
418   syscall
419   ret
420 END(cloudabi_sys_sock_send)
421
422 ENTRY(cloudabi_sys_sock_shutdown)
423   mov $45, %eax
424   syscall
425   ret
426 END(cloudabi_sys_sock_shutdown)
427
428 ENTRY(cloudabi_sys_thread_create)
429   push %rsi
430   mov $46, %eax
431   syscall
432   pop %rcx
433   jc 1f
434   mov %eax, (%rcx)
435   xor %eax, %eax
436 1:
437   ret
438 END(cloudabi_sys_thread_create)
439
440 ENTRY(cloudabi_sys_thread_exit)
441   mov $47, %eax
442   syscall
443 END(cloudabi_sys_thread_exit)
444
445 ENTRY(cloudabi_sys_thread_yield)
446   mov $48, %eax
447   syscall
448   ret
449 END(cloudabi_sys_thread_yield)