]> git.lizzy.rs Git - rust.git/blob - src/rt/arch/mipsel/morestack.S
Auto merge of #27529 - dotdash:c_u8, r=eddyb
[rust.git] / src / rt / arch / mipsel / morestack.S
1 // Mark stack as non-executable
2 #if defined(__linux__) && defined(__ELF__)
3 .section        .note.GNU-stack, "", @progbits
4 #endif
5
6 /* See i386/morestack.S for the lengthy, general explanation. */
7
8 .text
9
10 .globl rust_stack_exhausted
11 .globl __morestack
12
13 .hidden __morestack
14
15 .cfi_startproc
16 .set nomips16
17 .ent __morestack
18 __morestack:
19         .set noreorder
20         .set nomacro
21
22         addiu $29, $29, -4
23         sw $30, 0($29)
24
25         // 16 = 4 (current) + 12 (previous)
26         .cfi_def_cfa_offset 16
27         .cfi_offset 31, -4
28         .cfi_offset 30, -16
29
30         move $30, $29
31         .cfi_def_cfa_register 30
32
33         // O32 ABI always reserves 16 bytes for arguments
34         addiu $29, $29, -16
35
36         lw $25, %call16(rust_stack_exhausted)($28)
37         jalr $25
38         nop
39
40         // the above function make sure that we never get here
41
42 .end __morestack
43 .cfi_endproc