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