]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and update
[FreeBSD/FreeBSD.git] / sys / contrib / cloudabi / cloudabi_vdso_aarch64.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 2;            \
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   str x1, [sp, #-8]
39   mov w8, #0
40   svc #0
41   ldr x2, [sp, #-8]
42   b.cs 1f
43   str x0, [x2]
44   mov w0, wzr
45 1:
46   ret
47 END(cloudabi_sys_clock_res_get)
48
49 ENTRY(cloudabi_sys_clock_time_get)
50   str x2, [sp, #-8]
51   mov w8, #1
52   svc #0
53   ldr x2, [sp, #-8]
54   b.cs 1f
55   str x0, [x2]
56   mov w0, wzr
57 1:
58   ret
59 END(cloudabi_sys_clock_time_get)
60
61 ENTRY(cloudabi_sys_condvar_signal)
62   mov w8, #2
63   svc #0
64   ret
65 END(cloudabi_sys_condvar_signal)
66
67 ENTRY(cloudabi_sys_fd_close)
68   mov w8, #3
69   svc #0
70   ret
71 END(cloudabi_sys_fd_close)
72
73 ENTRY(cloudabi_sys_fd_create1)
74   str x1, [sp, #-8]
75   mov w8, #4
76   svc #0
77   ldr x2, [sp, #-8]
78   b.cs 1f
79   str w0, [x2]
80   mov w0, wzr
81 1:
82   ret
83 END(cloudabi_sys_fd_create1)
84
85 ENTRY(cloudabi_sys_fd_create2)
86   stp x1, x2, [sp, #-16]
87   mov w8, #5
88   svc #0
89   ldp x2, x3, [sp, #-16]
90   b.cs 1f
91   str w0, [x2]
92   str w1, [x3]
93   mov w0, wzr
94 1:
95   ret
96 END(cloudabi_sys_fd_create2)
97
98 ENTRY(cloudabi_sys_fd_datasync)
99   mov w8, #6
100   svc #0
101   ret
102 END(cloudabi_sys_fd_datasync)
103
104 ENTRY(cloudabi_sys_fd_dup)
105   str x1, [sp, #-8]
106   mov w8, #7
107   svc #0
108   ldr x2, [sp, #-8]
109   b.cs 1f
110   str w0, [x2]
111   mov w0, wzr
112 1:
113   ret
114 END(cloudabi_sys_fd_dup)
115
116 ENTRY(cloudabi_sys_fd_pread)
117   str x4, [sp, #-8]
118   mov w8, #8
119   svc #0
120   ldr x2, [sp, #-8]
121   b.cs 1f
122   str x0, [x2]
123   mov w0, wzr
124 1:
125   ret
126 END(cloudabi_sys_fd_pread)
127
128 ENTRY(cloudabi_sys_fd_pwrite)
129   str x4, [sp, #-8]
130   mov w8, #9
131   svc #0
132   ldr x2, [sp, #-8]
133   b.cs 1f
134   str x0, [x2]
135   mov w0, wzr
136 1:
137   ret
138 END(cloudabi_sys_fd_pwrite)
139
140 ENTRY(cloudabi_sys_fd_read)
141   str x3, [sp, #-8]
142   mov w8, #10
143   svc #0
144   ldr x2, [sp, #-8]
145   b.cs 1f
146   str x0, [x2]
147   mov w0, wzr
148 1:
149   ret
150 END(cloudabi_sys_fd_read)
151
152 ENTRY(cloudabi_sys_fd_replace)
153   mov w8, #11
154   svc #0
155   ret
156 END(cloudabi_sys_fd_replace)
157
158 ENTRY(cloudabi_sys_fd_seek)
159   str x3, [sp, #-8]
160   mov w8, #12
161   svc #0
162   ldr x2, [sp, #-8]
163   b.cs 1f
164   str x0, [x2]
165   mov w0, wzr
166 1:
167   ret
168 END(cloudabi_sys_fd_seek)
169
170 ENTRY(cloudabi_sys_fd_stat_get)
171   mov w8, #13
172   svc #0
173   ret
174 END(cloudabi_sys_fd_stat_get)
175
176 ENTRY(cloudabi_sys_fd_stat_put)
177   mov w8, #14
178   svc #0
179   ret
180 END(cloudabi_sys_fd_stat_put)
181
182 ENTRY(cloudabi_sys_fd_sync)
183   mov w8, #15
184   svc #0
185   ret
186 END(cloudabi_sys_fd_sync)
187
188 ENTRY(cloudabi_sys_fd_write)
189   str x3, [sp, #-8]
190   mov w8, #16
191   svc #0
192   ldr x2, [sp, #-8]
193   b.cs 1f
194   str x0, [x2]
195   mov w0, wzr
196 1:
197   ret
198 END(cloudabi_sys_fd_write)
199
200 ENTRY(cloudabi_sys_file_advise)
201   mov w8, #17
202   svc #0
203   ret
204 END(cloudabi_sys_file_advise)
205
206 ENTRY(cloudabi_sys_file_allocate)
207   mov w8, #18
208   svc #0
209   ret
210 END(cloudabi_sys_file_allocate)
211
212 ENTRY(cloudabi_sys_file_create)
213   mov w8, #19
214   svc #0
215   ret
216 END(cloudabi_sys_file_create)
217
218 ENTRY(cloudabi_sys_file_link)
219   mov w8, #20
220   svc #0
221   ret
222 END(cloudabi_sys_file_link)
223
224 ENTRY(cloudabi_sys_file_open)
225   str x5, [sp, #-8]
226   mov w8, #21
227   svc #0
228   ldr x2, [sp, #-8]
229   b.cs 1f
230   str w0, [x2]
231   mov w0, wzr
232 1:
233   ret
234 END(cloudabi_sys_file_open)
235
236 ENTRY(cloudabi_sys_file_readdir)
237   str x4, [sp, #-8]
238   mov w8, #22
239   svc #0
240   ldr x2, [sp, #-8]
241   b.cs 1f
242   str x0, [x2]
243   mov w0, wzr
244 1:
245   ret
246 END(cloudabi_sys_file_readdir)
247
248 ENTRY(cloudabi_sys_file_readlink)
249   str x5, [sp, #-8]
250   mov w8, #23
251   svc #0
252   ldr x2, [sp, #-8]
253   b.cs 1f
254   str x0, [x2]
255   mov w0, wzr
256 1:
257   ret
258 END(cloudabi_sys_file_readlink)
259
260 ENTRY(cloudabi_sys_file_rename)
261   mov w8, #24
262   svc #0
263   ret
264 END(cloudabi_sys_file_rename)
265
266 ENTRY(cloudabi_sys_file_stat_fget)
267   mov w8, #25
268   svc #0
269   ret
270 END(cloudabi_sys_file_stat_fget)
271
272 ENTRY(cloudabi_sys_file_stat_fput)
273   mov w8, #26
274   svc #0
275   ret
276 END(cloudabi_sys_file_stat_fput)
277
278 ENTRY(cloudabi_sys_file_stat_get)
279   mov w8, #27
280   svc #0
281   ret
282 END(cloudabi_sys_file_stat_get)
283
284 ENTRY(cloudabi_sys_file_stat_put)
285   mov w8, #28
286   svc #0
287   ret
288 END(cloudabi_sys_file_stat_put)
289
290 ENTRY(cloudabi_sys_file_symlink)
291   mov w8, #29
292   svc #0
293   ret
294 END(cloudabi_sys_file_symlink)
295
296 ENTRY(cloudabi_sys_file_unlink)
297   mov w8, #30
298   svc #0
299   ret
300 END(cloudabi_sys_file_unlink)
301
302 ENTRY(cloudabi_sys_lock_unlock)
303   mov w8, #31
304   svc #0
305   ret
306 END(cloudabi_sys_lock_unlock)
307
308 ENTRY(cloudabi_sys_mem_advise)
309   mov w8, #32
310   svc #0
311   ret
312 END(cloudabi_sys_mem_advise)
313
314 ENTRY(cloudabi_sys_mem_lock)
315   mov w8, #33
316   svc #0
317   ret
318 END(cloudabi_sys_mem_lock)
319
320 ENTRY(cloudabi_sys_mem_map)
321   str x6, [sp, #-8]
322   mov w8, #34
323   svc #0
324   ldr x2, [sp, #-8]
325   b.cs 1f
326   str x0, [x2]
327   mov w0, wzr
328 1:
329   ret
330 END(cloudabi_sys_mem_map)
331
332 ENTRY(cloudabi_sys_mem_protect)
333   mov w8, #35
334   svc #0
335   ret
336 END(cloudabi_sys_mem_protect)
337
338 ENTRY(cloudabi_sys_mem_sync)
339   mov w8, #36
340   svc #0
341   ret
342 END(cloudabi_sys_mem_sync)
343
344 ENTRY(cloudabi_sys_mem_unlock)
345   mov w8, #37
346   svc #0
347   ret
348 END(cloudabi_sys_mem_unlock)
349
350 ENTRY(cloudabi_sys_mem_unmap)
351   mov w8, #38
352   svc #0
353   ret
354 END(cloudabi_sys_mem_unmap)
355
356 ENTRY(cloudabi_sys_poll)
357   str x3, [sp, #-8]
358   mov w8, #39
359   svc #0
360   ldr x2, [sp, #-8]
361   b.cs 1f
362   str x0, [x2]
363   mov w0, wzr
364 1:
365   ret
366 END(cloudabi_sys_poll)
367
368 ENTRY(cloudabi_sys_poll_fd)
369   str x6, [sp, #-8]
370   mov w8, #40
371   svc #0
372   ldr x2, [sp, #-8]
373   b.cs 1f
374   str x0, [x2]
375   mov w0, wzr
376 1:
377   ret
378 END(cloudabi_sys_poll_fd)
379
380 ENTRY(cloudabi_sys_proc_exec)
381   mov w8, #41
382   svc #0
383   ret
384 END(cloudabi_sys_proc_exec)
385
386 ENTRY(cloudabi_sys_proc_exit)
387   mov w8, #42
388   svc #0
389 END(cloudabi_sys_proc_exit)
390
391 ENTRY(cloudabi_sys_proc_fork)
392   stp x0, x1, [sp, #-16]
393   mov w8, #43
394   svc #0
395   ldp x2, x3, [sp, #-16]
396   b.cs 1f
397   str w0, [x2]
398   str w1, [x3]
399   mov w0, wzr
400 1:
401   ret
402 END(cloudabi_sys_proc_fork)
403
404 ENTRY(cloudabi_sys_proc_raise)
405   mov w8, #44
406   svc #0
407   ret
408 END(cloudabi_sys_proc_raise)
409
410 ENTRY(cloudabi_sys_random_get)
411   mov w8, #45
412   svc #0
413   ret
414 END(cloudabi_sys_random_get)
415
416 ENTRY(cloudabi_sys_sock_accept)
417   str x2, [sp, #-8]
418   mov w8, #46
419   svc #0
420   ldr x2, [sp, #-8]
421   b.cs 1f
422   str w0, [x2]
423   mov w0, wzr
424 1:
425   ret
426 END(cloudabi_sys_sock_accept)
427
428 ENTRY(cloudabi_sys_sock_bind)
429   mov w8, #47
430   svc #0
431   ret
432 END(cloudabi_sys_sock_bind)
433
434 ENTRY(cloudabi_sys_sock_connect)
435   mov w8, #48
436   svc #0
437   ret
438 END(cloudabi_sys_sock_connect)
439
440 ENTRY(cloudabi_sys_sock_listen)
441   mov w8, #49
442   svc #0
443   ret
444 END(cloudabi_sys_sock_listen)
445
446 ENTRY(cloudabi_sys_sock_recv)
447   mov w8, #50
448   svc #0
449   ret
450 END(cloudabi_sys_sock_recv)
451
452 ENTRY(cloudabi_sys_sock_send)
453   mov w8, #51
454   svc #0
455   ret
456 END(cloudabi_sys_sock_send)
457
458 ENTRY(cloudabi_sys_sock_shutdown)
459   mov w8, #52
460   svc #0
461   ret
462 END(cloudabi_sys_sock_shutdown)
463
464 ENTRY(cloudabi_sys_sock_stat_get)
465   mov w8, #53
466   svc #0
467   ret
468 END(cloudabi_sys_sock_stat_get)
469
470 ENTRY(cloudabi_sys_thread_create)
471   str x1, [sp, #-8]
472   mov w8, #54
473   svc #0
474   ldr x2, [sp, #-8]
475   b.cs 1f
476   str w0, [x2]
477   mov w0, wzr
478 1:
479   ret
480 END(cloudabi_sys_thread_create)
481
482 ENTRY(cloudabi_sys_thread_exit)
483   mov w8, #55
484   svc #0
485 END(cloudabi_sys_thread_exit)
486
487 ENTRY(cloudabi_sys_thread_yield)
488   mov w8, #56
489   svc #0
490   ret
491 END(cloudabi_sys_thread_yield)