mark mips cancellable syscall code as code
[musl] / src / thread / mips / syscall_cp.s
1 .set    noreorder
2
3 .global __cp_begin
4 .hidden __cp_begin
5 .type   __cp_begin,@function
6 .global __cp_end
7 .hidden __cp_end
8 .type   __cp_end,@function
9 .global __cp_cancel
10 .hidden __cp_cancel
11 .type   __cp_cancel,@function
12 .hidden __cancel
13 .global __syscall_cp_asm
14 .hidden __syscall_cp_asm
15 .type   __syscall_cp_asm,@function
16 __syscall_cp_asm:
17         subu    $sp, $sp, 32
18 __cp_begin:
19         lw      $4, 0($4)
20         bne     $4, $0, __cp_cancel
21         move    $2, $5
22         move    $4, $6
23         move    $5, $7
24         lw      $6, 48($sp)
25         lw      $7, 52($sp)
26         lw      $8, 56($sp)
27         lw      $9, 60($sp)
28         lw      $10,64($sp)
29         sw      $8, 16($sp)
30         sw      $9, 20($sp)
31         sw      $10,24($sp)
32         sw      $2, 28($sp)
33         lw      $2, 28($sp)
34         syscall
35 __cp_end:
36         beq     $7, $0, 1f
37         addu    $sp, $sp, 32
38         subu    $2, $0, $2
39 1:      jr      $ra
40         nop
41
42 __cp_cancel:
43         addu    $sp, $sp, 32
44         lw      $25, %call16(__cancel)($gp)
45         jr      $25
46         nop