xref: /minix3/lib/libc/arch/powerpc/sys/pipe.S (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1/*	$NetBSD: pipe.S,v 1.9 2014/08/23 02:24:22 matt Exp $	*/
2
3#include "SYS.h"
4
5#if defined(LIBC_SCCS) && !defined(lint)
6__RCSID("$NetBSD: pipe.S,v 1.9 2014/08/23 02:24:22 matt Exp $")
7#endif /* LIBC_SCCS && !lint */
8
9#ifdef WEAK_ALIAS
10WEAK_ALIAS(pipe, _pipe)
11#endif
12
13ENTRY(_pipe)
14	mr	%r5,%r3		# save pointer
15	_DOSYSCALL(pipe)	# assume, that r5 is kept
16	bso	1f
17	stint	%r3,0(%r5)	# success, store fds
18	stint	%r4,4(%r5)
19	li	%r3,0
20	blr			# and return 0
211:
22	BRANCH_TO_CERROR()
23END(_pipe)
24