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 r1, [sp, #-4] 39 mov ip, #0 40 swi 0 41 ldrcc r2, [sp, #-4] 42 strcc r0, [r2, #0] 43 strcc r1, [r2, #4] 44 movcc r0, #0 45 bx lr 46END(cloudabi_sys_clock_res_get) 47 48ENTRY(cloudabi_sys_clock_time_get) 49 mov ip, #1 50 swi 0 51 ldrcc r2, [sp, #0] 52 strcc r0, [r2, #0] 53 strcc r1, [r2, #4] 54 movcc r0, #0 55 bx lr 56END(cloudabi_sys_clock_time_get) 57 58ENTRY(cloudabi_sys_condvar_signal) 59 mov ip, #2 60 swi 0 61 bx lr 62END(cloudabi_sys_condvar_signal) 63 64ENTRY(cloudabi_sys_fd_close) 65 mov ip, #3 66 swi 0 67 bx lr 68END(cloudabi_sys_fd_close) 69 70ENTRY(cloudabi_sys_fd_create1) 71 str r1, [sp, #-4] 72 mov ip, #4 73 swi 0 74 ldrcc r2, [sp, #-4] 75 strcc r0, [r2] 76 movcc r0, #0 77 bx lr 78END(cloudabi_sys_fd_create1) 79 80ENTRY(cloudabi_sys_fd_create2) 81 str r1, [sp, #-4] 82 str r2, [sp, #-8] 83 mov ip, #5 84 swi 0 85 ldrcc r2, [sp, #-4] 86 ldrcc r3, [sp, #-8] 87 strcc r0, [r2] 88 strcc r1, [r3] 89 movcc r0, #0 90 bx lr 91END(cloudabi_sys_fd_create2) 92 93ENTRY(cloudabi_sys_fd_datasync) 94 mov ip, #6 95 swi 0 96 bx lr 97END(cloudabi_sys_fd_datasync) 98 99ENTRY(cloudabi_sys_fd_dup) 100 str r1, [sp, #-4] 101 mov ip, #7 102 swi 0 103 ldrcc r2, [sp, #-4] 104 strcc r0, [r2] 105 movcc r0, #0 106 bx lr 107END(cloudabi_sys_fd_dup) 108 109ENTRY(cloudabi_sys_fd_pread) 110 mov ip, #8 111 swi 0 112 ldrcc r2, [sp, #8] 113 strcc r0, [r2] 114 movcc r0, #0 115 bx lr 116END(cloudabi_sys_fd_pread) 117 118ENTRY(cloudabi_sys_fd_pwrite) 119 mov ip, #9 120 swi 0 121 ldrcc r2, [sp, #8] 122 strcc r0, [r2] 123 movcc r0, #0 124 bx lr 125END(cloudabi_sys_fd_pwrite) 126 127ENTRY(cloudabi_sys_fd_read) 128 str r3, [sp, #-4] 129 mov ip, #10 130 swi 0 131 ldrcc r2, [sp, #-4] 132 strcc r0, [r2] 133 movcc r0, #0 134 bx lr 135END(cloudabi_sys_fd_read) 136 137ENTRY(cloudabi_sys_fd_replace) 138 mov ip, #11 139 swi 0 140 bx lr 141END(cloudabi_sys_fd_replace) 142 143ENTRY(cloudabi_sys_fd_seek) 144 mov ip, #12 145 swi 0 146 ldrcc r2, [sp, #4] 147 strcc r0, [r2, #0] 148 strcc r1, [r2, #4] 149 movcc r0, #0 150 bx lr 151END(cloudabi_sys_fd_seek) 152 153ENTRY(cloudabi_sys_fd_stat_get) 154 mov ip, #13 155 swi 0 156 bx lr 157END(cloudabi_sys_fd_stat_get) 158 159ENTRY(cloudabi_sys_fd_stat_put) 160 mov ip, #14 161 swi 0 162 bx lr 163END(cloudabi_sys_fd_stat_put) 164 165ENTRY(cloudabi_sys_fd_sync) 166 mov ip, #15 167 swi 0 168 bx lr 169END(cloudabi_sys_fd_sync) 170 171ENTRY(cloudabi_sys_fd_write) 172 str r3, [sp, #-4] 173 mov ip, #16 174 swi 0 175 ldrcc r2, [sp, #-4] 176 strcc r0, [r2] 177 movcc r0, #0 178 bx lr 179END(cloudabi_sys_fd_write) 180 181ENTRY(cloudabi_sys_file_advise) 182 mov ip, #17 183 swi 0 184 bx lr 185END(cloudabi_sys_file_advise) 186 187ENTRY(cloudabi_sys_file_allocate) 188 mov ip, #18 189 swi 0 190 bx lr 191END(cloudabi_sys_file_allocate) 192 193ENTRY(cloudabi_sys_file_create) 194 mov ip, #19 195 swi 0 196 bx lr 197END(cloudabi_sys_file_create) 198 199ENTRY(cloudabi_sys_file_link) 200 mov ip, #20 201 swi 0 202 bx lr 203END(cloudabi_sys_file_link) 204 205ENTRY(cloudabi_sys_file_open) 206 mov ip, #21 207 swi 0 208 ldrcc r2, [sp, #8] 209 strcc r0, [r2] 210 movcc r0, #0 211 bx lr 212END(cloudabi_sys_file_open) 213 214ENTRY(cloudabi_sys_file_readdir) 215 mov ip, #22 216 swi 0 217 ldrcc r2, [sp, #8] 218 strcc r0, [r2] 219 movcc r0, #0 220 bx lr 221END(cloudabi_sys_file_readdir) 222 223ENTRY(cloudabi_sys_file_readlink) 224 mov ip, #23 225 swi 0 226 ldrcc r2, [sp, #4] 227 strcc r0, [r2] 228 movcc r0, #0 229 bx lr 230END(cloudabi_sys_file_readlink) 231 232ENTRY(cloudabi_sys_file_rename) 233 mov ip, #24 234 swi 0 235 bx lr 236END(cloudabi_sys_file_rename) 237 238ENTRY(cloudabi_sys_file_stat_fget) 239 mov ip, #25 240 swi 0 241 bx lr 242END(cloudabi_sys_file_stat_fget) 243 244ENTRY(cloudabi_sys_file_stat_fput) 245 mov ip, #26 246 swi 0 247 bx lr 248END(cloudabi_sys_file_stat_fput) 249 250ENTRY(cloudabi_sys_file_stat_get) 251 mov ip, #27 252 swi 0 253 bx lr 254END(cloudabi_sys_file_stat_get) 255 256ENTRY(cloudabi_sys_file_stat_put) 257 mov ip, #28 258 swi 0 259 bx lr 260END(cloudabi_sys_file_stat_put) 261 262ENTRY(cloudabi_sys_file_symlink) 263 mov ip, #29 264 swi 0 265 bx lr 266END(cloudabi_sys_file_symlink) 267 268ENTRY(cloudabi_sys_file_unlink) 269 mov ip, #30 270 swi 0 271 bx lr 272END(cloudabi_sys_file_unlink) 273 274ENTRY(cloudabi_sys_lock_unlock) 275 mov ip, #31 276 swi 0 277 bx lr 278END(cloudabi_sys_lock_unlock) 279 280ENTRY(cloudabi_sys_mem_advise) 281 mov ip, #32 282 swi 0 283 bx lr 284END(cloudabi_sys_mem_advise) 285 286ENTRY(cloudabi_sys_mem_map) 287 mov ip, #33 288 swi 0 289 ldrcc r2, [sp, #16] 290 strcc r0, [r2] 291 movcc r0, #0 292 bx lr 293END(cloudabi_sys_mem_map) 294 295ENTRY(cloudabi_sys_mem_protect) 296 mov ip, #34 297 swi 0 298 bx lr 299END(cloudabi_sys_mem_protect) 300 301ENTRY(cloudabi_sys_mem_sync) 302 mov ip, #35 303 swi 0 304 bx lr 305END(cloudabi_sys_mem_sync) 306 307ENTRY(cloudabi_sys_mem_unmap) 308 mov ip, #36 309 swi 0 310 bx lr 311END(cloudabi_sys_mem_unmap) 312 313ENTRY(cloudabi_sys_poll) 314 str r3, [sp, #-4] 315 mov ip, #37 316 swi 0 317 ldrcc r2, [sp, #-4] 318 strcc r0, [r2] 319 movcc r0, #0 320 bx lr 321END(cloudabi_sys_poll) 322 323ENTRY(cloudabi_sys_proc_exec) 324 mov ip, #38 325 swi 0 326 bx lr 327END(cloudabi_sys_proc_exec) 328 329ENTRY(cloudabi_sys_proc_exit) 330 mov ip, #39 331 swi 0 332END(cloudabi_sys_proc_exit) 333 334ENTRY(cloudabi_sys_proc_fork) 335 str r0, [sp, #-4] 336 str r1, [sp, #-8] 337 mov ip, #40 338 swi 0 339 ldrcc r2, [sp, #-4] 340 ldrcc r3, [sp, #-8] 341 strcc r0, [r2] 342 strcc r1, [r3] 343 movcc r0, #0 344 bx lr 345END(cloudabi_sys_proc_fork) 346 347ENTRY(cloudabi_sys_proc_raise) 348 mov ip, #41 349 swi 0 350 bx lr 351END(cloudabi_sys_proc_raise) 352 353ENTRY(cloudabi_sys_random_get) 354 mov ip, #42 355 swi 0 356 bx lr 357END(cloudabi_sys_random_get) 358 359ENTRY(cloudabi_sys_sock_recv) 360 mov ip, #43 361 swi 0 362 bx lr 363END(cloudabi_sys_sock_recv) 364 365ENTRY(cloudabi_sys_sock_send) 366 mov ip, #44 367 swi 0 368 bx lr 369END(cloudabi_sys_sock_send) 370 371ENTRY(cloudabi_sys_sock_shutdown) 372 mov ip, #45 373 swi 0 374 bx lr 375END(cloudabi_sys_sock_shutdown) 376 377ENTRY(cloudabi_sys_thread_create) 378 str r1, [sp, #-4] 379 mov ip, #46 380 swi 0 381 ldrcc r2, [sp, #-4] 382 strcc r0, [r2] 383 movcc r0, #0 384 bx lr 385END(cloudabi_sys_thread_create) 386 387ENTRY(cloudabi_sys_thread_exit) 388 mov ip, #47 389 swi 0 390END(cloudabi_sys_thread_exit) 391 392ENTRY(cloudabi_sys_thread_yield) 393 mov ip, #48 394 swi 0 395 bx lr 396END(cloudabi_sys_thread_yield) 397