1*27620987Smatt/* $NetBSD: pipe.S,v 1.1 2014/09/03 19:34:26 matt Exp $ */ 2*27620987Smatt 3*27620987Smatt#include "SYS.h" 4*27620987Smatt 5*27620987Smatt#if defined(LIBC_SCCS) && !defined(lint) 6*27620987Smatt__RCSID("$NetBSD: pipe.S,v 1.1 2014/09/03 19:34:26 matt Exp $") 7*27620987Smatt#endif /* LIBC_SCCS && !lint */ 8*27620987Smatt 9*27620987Smatt#ifdef WEAK_ALIAS 10*27620987SmattWEAK_ALIAS(pipe, _pipe) 11*27620987Smatt#endif 12*27620987Smatt 13*27620987SmattENTRY(_pipe) 14*27620987Smatt l.or r5,r3,r0 # save pointer 15*27620987Smatt _DOSYSCALL(pipe) # assume, that r5 is kept 16*27620987Smatt l.bf _C_LABEL(__cerror) 17*27620987Smatt l.nop 18*27620987Smatt l.sw 0(r5),r11 # success, store fds 19*27620987Smatt l.sw 4(r5),r12 20*27620987Smatt l.xor r11,r11,r11 21*27620987Smatt l.jr lr # and return 0 22*27620987Smatt l.nop 23*27620987SmattEND(_pipe) 24