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; \ 33name: 34 35#define END(name) .size name, . - name 36 37ENTRY(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 451: 46 ret 47END(cloudabi_sys_clock_res_get) 48 49ENTRY(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 571: 58 ret 59END(cloudabi_sys_clock_time_get) 60 61ENTRY(cloudabi_sys_condvar_signal) 62 mov w8, #2 63 svc #0 64 ret 65END(cloudabi_sys_condvar_signal) 66 67ENTRY(cloudabi_sys_fd_close) 68 mov w8, #3 69 svc #0 70 ret 71END(cloudabi_sys_fd_close) 72 73ENTRY(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 811: 82 ret 83END(cloudabi_sys_fd_create1) 84 85ENTRY(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 941: 95 ret 96END(cloudabi_sys_fd_create2) 97 98ENTRY(cloudabi_sys_fd_datasync) 99 mov w8, #6 100 svc #0 101 ret 102END(cloudabi_sys_fd_datasync) 103 104ENTRY(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 1121: 113 ret 114END(cloudabi_sys_fd_dup) 115 116ENTRY(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 1241: 125 ret 126END(cloudabi_sys_fd_pread) 127 128ENTRY(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 1361: 137 ret 138END(cloudabi_sys_fd_pwrite) 139 140ENTRY(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 1481: 149 ret 150END(cloudabi_sys_fd_read) 151 152ENTRY(cloudabi_sys_fd_replace) 153 mov w8, #11 154 svc #0 155 ret 156END(cloudabi_sys_fd_replace) 157 158ENTRY(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 1661: 167 ret 168END(cloudabi_sys_fd_seek) 169 170ENTRY(cloudabi_sys_fd_stat_get) 171 mov w8, #13 172 svc #0 173 ret 174END(cloudabi_sys_fd_stat_get) 175 176ENTRY(cloudabi_sys_fd_stat_put) 177 mov w8, #14 178 svc #0 179 ret 180END(cloudabi_sys_fd_stat_put) 181 182ENTRY(cloudabi_sys_fd_sync) 183 mov w8, #15 184 svc #0 185 ret 186END(cloudabi_sys_fd_sync) 187 188ENTRY(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 1961: 197 ret 198END(cloudabi_sys_fd_write) 199 200ENTRY(cloudabi_sys_file_advise) 201 mov w8, #17 202 svc #0 203 ret 204END(cloudabi_sys_file_advise) 205 206ENTRY(cloudabi_sys_file_allocate) 207 mov w8, #18 208 svc #0 209 ret 210END(cloudabi_sys_file_allocate) 211 212ENTRY(cloudabi_sys_file_create) 213 mov w8, #19 214 svc #0 215 ret 216END(cloudabi_sys_file_create) 217 218ENTRY(cloudabi_sys_file_link) 219 mov w8, #20 220 svc #0 221 ret 222END(cloudabi_sys_file_link) 223 224ENTRY(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 2321: 233 ret 234END(cloudabi_sys_file_open) 235 236ENTRY(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 2441: 245 ret 246END(cloudabi_sys_file_readdir) 247 248ENTRY(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 2561: 257 ret 258END(cloudabi_sys_file_readlink) 259 260ENTRY(cloudabi_sys_file_rename) 261 mov w8, #24 262 svc #0 263 ret 264END(cloudabi_sys_file_rename) 265 266ENTRY(cloudabi_sys_file_stat_fget) 267 mov w8, #25 268 svc #0 269 ret 270END(cloudabi_sys_file_stat_fget) 271 272ENTRY(cloudabi_sys_file_stat_fput) 273 mov w8, #26 274 svc #0 275 ret 276END(cloudabi_sys_file_stat_fput) 277 278ENTRY(cloudabi_sys_file_stat_get) 279 mov w8, #27 280 svc #0 281 ret 282END(cloudabi_sys_file_stat_get) 283 284ENTRY(cloudabi_sys_file_stat_put) 285 mov w8, #28 286 svc #0 287 ret 288END(cloudabi_sys_file_stat_put) 289 290ENTRY(cloudabi_sys_file_symlink) 291 mov w8, #29 292 svc #0 293 ret 294END(cloudabi_sys_file_symlink) 295 296ENTRY(cloudabi_sys_file_unlink) 297 mov w8, #30 298 svc #0 299 ret 300END(cloudabi_sys_file_unlink) 301 302ENTRY(cloudabi_sys_lock_unlock) 303 mov w8, #31 304 svc #0 305 ret 306END(cloudabi_sys_lock_unlock) 307 308ENTRY(cloudabi_sys_mem_advise) 309 mov w8, #32 310 svc #0 311 ret 312END(cloudabi_sys_mem_advise) 313 314ENTRY(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 3221: 323 ret 324END(cloudabi_sys_mem_map) 325 326ENTRY(cloudabi_sys_mem_protect) 327 mov w8, #34 328 svc #0 329 ret 330END(cloudabi_sys_mem_protect) 331 332ENTRY(cloudabi_sys_mem_sync) 333 mov w8, #35 334 svc #0 335 ret 336END(cloudabi_sys_mem_sync) 337 338ENTRY(cloudabi_sys_mem_unmap) 339 mov w8, #36 340 svc #0 341 ret 342END(cloudabi_sys_mem_unmap) 343 344ENTRY(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 3521: 353 ret 354END(cloudabi_sys_poll) 355 356ENTRY(cloudabi_sys_proc_exec) 357 mov w8, #38 358 svc #0 359 ret 360END(cloudabi_sys_proc_exec) 361 362ENTRY(cloudabi_sys_proc_exit) 363 mov w8, #39 364 svc #0 365END(cloudabi_sys_proc_exit) 366 367ENTRY(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 3761: 377 ret 378END(cloudabi_sys_proc_fork) 379 380ENTRY(cloudabi_sys_proc_raise) 381 mov w8, #41 382 svc #0 383 ret 384END(cloudabi_sys_proc_raise) 385 386ENTRY(cloudabi_sys_random_get) 387 mov w8, #42 388 svc #0 389 ret 390END(cloudabi_sys_random_get) 391 392ENTRY(cloudabi_sys_sock_recv) 393 mov w8, #43 394 svc #0 395 ret 396END(cloudabi_sys_sock_recv) 397 398ENTRY(cloudabi_sys_sock_send) 399 mov w8, #44 400 svc #0 401 ret 402END(cloudabi_sys_sock_send) 403 404ENTRY(cloudabi_sys_sock_shutdown) 405 mov w8, #45 406 svc #0 407 ret 408END(cloudabi_sys_sock_shutdown) 409 410ENTRY(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 4181: 419 ret 420END(cloudabi_sys_thread_create) 421 422ENTRY(cloudabi_sys_thread_exit) 423 mov w8, #47 424 svc #0 425END(cloudabi_sys_thread_exit) 426 427ENTRY(cloudabi_sys_thread_yield) 428 mov w8, #48 429 svc #0 430 ret 431END(cloudabi_sys_thread_yield) 432