xref: /minix3/lib/libc/arch/powerpc/sys/pipe.S (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc/*	$NetBSD: pipe.S,v 1.9 2014/08/23 02:24:22 matt Exp $	*/
22fe8fb19SBen Gras
32fe8fb19SBen Gras#include "SYS.h"
42fe8fb19SBen Gras
52fe8fb19SBen Gras#if defined(LIBC_SCCS) && !defined(lint)
6*0a6a1f1dSLionel Sambuc__RCSID("$NetBSD: pipe.S,v 1.9 2014/08/23 02:24:22 matt Exp $")
72fe8fb19SBen Gras#endif /* LIBC_SCCS && !lint */
82fe8fb19SBen Gras
92fe8fb19SBen Gras#ifdef WEAK_ALIAS
102fe8fb19SBen GrasWEAK_ALIAS(pipe, _pipe)
112fe8fb19SBen Gras#endif
122fe8fb19SBen Gras
132fe8fb19SBen GrasENTRY(_pipe)
142fe8fb19SBen Gras	mr	%r5,%r3		# save pointer
152fe8fb19SBen Gras	_DOSYSCALL(pipe)	# assume, that r5 is kept
162fe8fb19SBen Gras	bso	1f
17*0a6a1f1dSLionel Sambuc	stint	%r3,0(%r5)	# success, store fds
18*0a6a1f1dSLionel Sambuc	stint	%r4,4(%r5)
192fe8fb19SBen Gras	li	%r3,0
202fe8fb19SBen Gras	blr			# and return 0
212fe8fb19SBen Gras1:
22*0a6a1f1dSLionel Sambuc	BRANCH_TO_CERROR()
232fe8fb19SBen GrasEND(_pipe)
24