chiark / gitweb /
d71495aba253568716cd438e8c88eff685dc1da9
[elogind.git] / klibc / klibc / arch / cris / syscall.S
1 /*
2  * arch/cris/syscall.S
3  *
4  * On cris, r9 contains the syscall number (set by generated stub);
5  * r10..r13 contain arguments 0-3 per the standard calling convention,
6  * and arguments 4-5 are passed in $mof and $srp; however, we have
7  * to save $srp around the system call.
8  */
9
10         .section ".text","ax"
11         .balign 4
12         .globl  __syscall_common
13         .type   __syscall_common,@function
14 __syscall_common:
15         push    $srp
16         move    [$sp+4],$mof
17         move    [$sp+8],$srp
18         break   13
19
20         cmps.w  -4096,$r10
21         blo     1f
22         neg.d   $r10,$r11
23         move.d  $r11,[errno]
24         moveq   -1,$r10
25 1:
26         pop     $srp
27         ret
28         nop
29
30         .size   __syscall_common,.-__syscall_common