chiark / gitweb /
volume_id: provide libvolume_id.a file
[elogind.git] / klibc / klibc / arch / m32r / syscall.S
1 /*
2  * arch/m32r/syscall.S
3  *
4  *     r7 contains the syscall number (set by stub);
5  * r0..r3 contains arguments 0-3 per standard calling convention;
6  * r4..r5 contains arguments 4-5, but we have to get those from
7  *        the stack.
8  */
9
10         .section ".text","ax"
11         .balign 4
12         .globl  __syscall_common
13         .type   __syscall_common,@function
14 __syscall_common:
15         ld      r4,@sp
16         ld      r5,@(4,sp)
17         trap    #2
18         cmpi    r0, #-4096
19         bnc     1f
20         jmp     r14
21 1:
22         seth    r2,#high(errno)
23         or3     r2,r2,#low(errno)
24         neg     r1,r0
25         st      r1,@r7
26         ldi     r0,#-1
27         jmp     r14
28
29         .size   __syscall_common,.-__syscall_common