]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
Import PCG-C into sys/contrib
[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_map)
315   str x6, [sp, #-8]
316   mov w8, #33
317   svc #0
318   ldr x2, [sp, #-8]
319   b.cs 1f
320   str x0, [x2]
321   mov w0, wzr
322 1:
323   ret
324 END(cloudabi_sys_mem_map)
325
326 ENTRY(cloudabi_sys_mem_protect)
327   mov w8, #34
328   svc #0
329   ret
330 END(cloudabi_sys_mem_protect)
331
332 ENTRY(cloudabi_sys_mem_sync)
333   mov w8, #35
334   svc #0
335   ret
336 END(cloudabi_sys_mem_sync)
337
338 ENTRY(cloudabi_sys_mem_unmap)
339   mov w8, #36
340   svc #0
341   ret
342 END(cloudabi_sys_mem_unmap)
343
344 ENTRY(cloudabi_sys_poll)
345   str x3, [sp, #-8]
346   mov w8, #37
347   svc #0
348   ldr x2, [sp, #-8]
349   b.cs 1f
350   str x0, [x2]
351   mov w0, wzr
352 1:
353   ret
354 END(cloudabi_sys_poll)
355
356 ENTRY(cloudabi_sys_proc_exec)
357   mov w8, #38
358   svc #0
359   ret
360 END(cloudabi_sys_proc_exec)
361
362 ENTRY(cloudabi_sys_proc_exit)
363   mov w8, #39
364   svc #0
365 END(cloudabi_sys_proc_exit)
366
367 ENTRY(cloudabi_sys_proc_fork)
368   stp x0, x1, [sp, #-16]
369   mov w8, #40
370   svc #0
371   ldp x2, x3, [sp, #-16]
372   b.cs 1f
373   str w0, [x2]
374   str w1, [x3]
375   mov w0, wzr
376 1:
377   ret
378 END(cloudabi_sys_proc_fork)
379
380 ENTRY(cloudabi_sys_proc_raise)
381   mov w8, #41
382   svc #0
383   ret
384 END(cloudabi_sys_proc_raise)
385
386 ENTRY(cloudabi_sys_random_get)
387   mov w8, #42
388   svc #0
389   ret
390 END(cloudabi_sys_random_get)
391
392 ENTRY(cloudabi_sys_sock_recv)
393   mov w8, #43
394   svc #0
395   ret
396 END(cloudabi_sys_sock_recv)
397
398 ENTRY(cloudabi_sys_sock_send)
399   mov w8, #44
400   svc #0
401   ret
402 END(cloudabi_sys_sock_send)
403
404 ENTRY(cloudabi_sys_sock_shutdown)
405   mov w8, #45
406   svc #0
407   ret
408 END(cloudabi_sys_sock_shutdown)
409
410 ENTRY(cloudabi_sys_thread_create)
411   str x1, [sp, #-8]
412   mov w8, #46
413   svc #0
414   ldr x2, [sp, #-8]
415   b.cs 1f
416   str w0, [x2]
417   mov w0, wzr
418 1:
419   ret
420 END(cloudabi_sys_thread_create)
421
422 ENTRY(cloudabi_sys_thread_exit)
423   mov w8, #47
424   svc #0
425 END(cloudabi_sys_thread_exit)
426
427 ENTRY(cloudabi_sys_thread_yield)
428   mov w8, #48
429   svc #0
430   ret
431 END(cloudabi_sys_thread_yield)