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).
4
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.
9
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.
14
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/>.  */
18
19#include <features.h>
20#include <sys/syscall.h>
21#include <sys/regdef.h>
22#include <asm/pal.h>
23
24/* __pipe is a special syscall since it returns two values.  */
25
26.globl pipe
27.align 4
28.ent pipe, 0
29pipe:
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
36
37	stl	r0, 0(a0)
38	stl	r1, 4(a0)
39	mov	zero, v0
40	ret
41
42$syscall_error:
43	jmp	zero,__syscall_error
44
45.end pipe
46
47libc_hidden_def (pipe)
48