duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

fastjmp_arm.asm (1043B)


      1 ; SPDX-FileCopyrightText: 2021 Connor McLaughlin <stenzek@gmail.com>
      2 ; SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
      3 
      4 #include "ksarm64.h"
      5 
      6   EXPORT fastjmp_set
      7   EXPORT fastjmp_jmp
      8 
      9   TEXTAREA
     10 
     11   ; void fastjmp_set(fastjmp_buf*)
     12   LEAF_ENTRY fastjmp_set
     13     mov x16, sp
     14     stp x16, x30, [x0]
     15     stp x19, x20, [x0, #16]
     16     stp x21, x22, [x0, #32]
     17     stp x23, x24, [x0, #48]
     18     stp x25, x26, [x0, #64]
     19     stp x27, x28, [x0, #80]
     20     str x29, [x0, #96]
     21     stp d8, d9, [x0, #112]
     22     stp d10, d11, [x0, #128]
     23     stp d12, d13, [x0, #144]
     24     stp d14, d15, [x0, #160]
     25     mov w0, wzr
     26     br x30
     27   LEAF_END
     28 
     29   ; void fastjmp_jmp(fastjmp_buf*, int)
     30   LEAF_ENTRY fastjmp_jmp
     31     ldp x16, x30, [x0]
     32     mov sp, x16
     33     ldp x19, x20, [x0, #16]
     34     ldp x21, x22, [x0, #32]
     35     ldp x23, x24, [x0, #48]
     36     ldp x25, x26, [x0, #64]
     37     ldp x27, x28, [x0, #80]
     38     ldr x29, [x0, #96]
     39     ldp d8, d9, [x0, #112]
     40     ldp d10, d11, [x0, #128]
     41     ldp d12, d13, [x0, #144]
     42     ldp d14, d15, [x0, #160]
     43     mov w0, w1
     44     br x30
     45   LEAF_END
     46 
     47   END