|
@@ -1,9 +1,4 @@
|
|
/* pipe system call for Linux/MIPS */
|
|
/* pipe system call for Linux/MIPS */
|
|
-/*
|
|
|
|
- * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
|
|
|
|
- *
|
|
|
|
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
|
|
|
|
- */
|
|
|
|
|
|
|
|
/*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
|
|
/*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
|
|
|
|
|
|
@@ -13,26 +8,39 @@
|
|
#include <asm/regdef.h>
|
|
#include <asm/regdef.h>
|
|
|
|
|
|
.globl pipe
|
|
.globl pipe
|
|
- .ent pipe, 0
|
|
+ .globl __pipe
|
|
-pipe:
|
|
+ .hidden __pipe
|
|
- addiu sp,sp,-24
|
|
+ .ent __pipe, 0
|
|
- sw a0,16(sp)
|
|
+__pipe:
|
|
- li v0,__NR_pipe
|
|
+ .frame sp, 24, sp
|
|
- syscall
|
|
+#ifdef __PIC__
|
|
- beqz a3, 1f
|
|
+ .set noreorder
|
|
- la t3, errno
|
|
+ .cpload $25
|
|
- sw v0, (t3)
|
|
+ .set reorder
|
|
- li v0, -1
|
|
+ addiu sp,sp,-24
|
|
- b 2f
|
|
+ .cprestore 16
|
|
|
|
+#else
|
|
|
|
+ addiu sp,sp,-24
|
|
|
|
+#endif
|
|
|
|
+ sw a0,16(sp)
|
|
|
|
+ li v0,__NR_pipe
|
|
|
|
+ syscall
|
|
|
|
+ beqz a3, 1f
|
|
|
|
+#ifdef __PIC__
|
|
|
|
+ la t0, __syscall_error
|
|
|
|
+ jr t9
|
|
|
|
+#else
|
|
|
|
+ j __syscall_error
|
|
|
|
+#endif
|
|
1:
|
|
1:
|
|
- lw a0, 16(sp)
|
|
+ lw a0, 16(sp)
|
|
- sw v0, 0(a0)
|
|
+ sw v0, 0(a0)
|
|
- sw v1, 4(a0)
|
|
+ sw v1, 4(a0)
|
|
- li v0, 0
|
|
+ li v0, 0
|
|
2:
|
|
2:
|
|
- addiu sp,sp,24
|
|
+ addiu sp,sp,24
|
|
- j ra
|
|
+ j ra
|
|
- .end pipe
|
|
+ .end __pipe
|
|
- .size pipe,.-pipe
|
|
+ .size __pipe,.-__pipe
|
|
-
|
|
+ .weak pipe
|
|
-libc_hidden_def(pipe)
|
|
+ pipe = __pipe
|