chiark / gitweb /
volume_id: provide libvolume_id.a file
[elogind.git] / klibc / klibc / arch / alpha / sysdual.S
1 #
2 # arch/alpha/sysdual.S
3 #
4
5 #
6 # Some system calls have an alternate return value in r20 (a4).
7 # This system call stub is for system calls where that is
8 # the "real" return value.
9 #
10
11 #include <machine/asm.h>
12         
13         .text
14         .align  3
15         .type   __syscall_dual1,@function
16         .ent    __syscall_dual1, 0
17         .globl  __syscall_dual1
18 __syscall_dual1:
19         .frame  sp,0,ra,0
20         callsys
21         mov     v0, a4
22         beq     a3, 1f
23         br      pv, 2f                  # pv <- pc  
24 2:
25         ldgp    gp, 0(pv)
26         lda     a1, errno
27         lda     v0, -1(zero)
28         stl     a3, 0(a1)
29 1:
30         ret     zero,(ra),1
31
32         .size   __syscall_dual1,.-__syscall_dual1
33         .end    __syscall_dual1