xref: /netbsd-src/lib/libc/arch/powerpc64/sys/pipe.S (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1/*	$NetBSD: pipe.S,v 1.1 2006/07/01 16:37:20 ross Exp $	*/
2
3#include "SYS.h"
4
5#ifdef WEAK_ALIAS
6WEAK_ALIAS(pipe, _pipe)
7#endif
8
9ENTRY(_pipe)
10	mr	%r5,%r3		# save pointer
11	li	%r0,SYS_pipe
12	sc			# assume, that r5 is kept
13	bso	1f
14	stw	%r3,0(%r5)	# success, store fds
15	stw	%r4,4(%r5)
16	li	%r3,0
17	blr			# and return 0
181:
19	b	PIC_PLT(_C_LABEL(__cerror))
20