summary refs log tree commit diff
path: root/src/rt/arch/mips/ccall.S
blob: f41d8e721f66fd18ec8a624a005886b3b5fb5127 (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
// Mark stack as non-executable
#if defined(__linux__) && defined(__ELF__)
.section	.note.GNU-stack, "", @progbits
#endif

.text

.globl __morestack
.hidden __morestack
.align 2
.set nomips16
.ent __morestack
__morestack:
        .set noreorder
        .set nomacro
        move $7, $29
        move $29, $6

        sw $7, 0($29)
        sw $31, -4($29)

        addiu $29, $29, -24
        move $25, $5
        jalr $25
        nop
        addiu $29, $29, 24

        lw $31, -4($29)
        lw $7, 0($29)

        move $29, $7
        jr $31
        nop
.end __morestack