summaryrefslogtreecommitdiffstats
path: root/vendor/psm/src/arch/aarch64_armasm.asm
blob: 95349f9cc5f2bd1afeaca78a01ac8b2a69c22473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    AREA |.text|, CODE, READONLY

    GLOBAL |rust_psm_stack_direction|
    ALIGN 4
|rust_psm_stack_direction| PROC
    orr w0, wzr, #2
    ret
    ENDP


    GLOBAL |rust_psm_stack_pointer|
    ALIGN 4
|rust_psm_stack_pointer| PROC
    mov x0, sp
    ret
    ENDP


    GLOBAL |rust_psm_replace_stack|
    ALIGN 4
|rust_psm_replace_stack| PROC
    mov sp, x2
    br x1
    ENDP

    GLOBAL |rust_psm_on_stack|
    ALIGN 4
|rust_psm_on_stack| PROC
    stp x29, x30, [sp, #-16]!
    mov x29, sp
    mov sp, x3
    blr x2
    mov sp, x29
    ldp x29, x30, [sp], #16
    ret
    ENDP

    END