riscv64: fix linking with binutils 2.40
[uclibc-ng.git] / libc / sysdeps / linux / alpha / pipe.S
blob1c936483335528e86564d31f16edf84f0fde3395
1 /* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3    Contributed by David Mosberger (davidm@cs.arizona.edu).
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, see
17    <http://www.gnu.org/licenses/>.  */
19 #include <features.h>
20 #include <sys/syscall.h>
21 #include <sys/regdef.h>
22 #include <asm/pal.h>
24 /* __pipe is a special syscall since it returns two values.  */
26 .globl pipe
27 .align 4
28 .ent pipe, 0
29 pipe:
30         .frame sp, 0, ra
31         ldgp gp,0(pv)
32         .prologue 1
33         lda v0, __NR_pipe
34         call_pal PAL_callsys
35         bne a3, $syscall_error
37         stl     r0, 0(a0)
38         stl     r1, 4(a0)
39         mov     zero, v0
40         ret
42 $syscall_error:
43         jmp     zero,__syscall_error
45 .end pipe
47 libc_hidden_def (pipe)