summaryrefslogtreecommitdiffstats
path: root/usr/klibc/arch/mips/pipe.S
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/arch/mips/pipe.S')
-rw-r--r--usr/klibc/arch/mips/pipe.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/usr/klibc/arch/mips/pipe.S b/usr/klibc/arch/mips/pipe.S
new file mode 100644
index 0000000..932fc08
--- /dev/null
+++ b/usr/klibc/arch/mips/pipe.S
@@ -0,0 +1,15 @@
+#include <machine/asm.h>
+#include <asm/unistd.h>
+
+LEAF(pipe)
+ li v0, __NR_pipe
+ syscall
+ bnez a3, 1f
+ sw v0, (a0)
+ sw v1, 4(a0)
+ li v0, 0
+ b 2f
+1: sw v0, errno
+ li v0, -1
+2: jr ra
+ END(pipe)