svn commit: branches/uClibc_0_9_29/libc/sysdeps/linux/mips

vapier at uclibc.org vapier at uclibc.org
Sat Jan 5 09:34:34 PST 2008


Author: vapier
Date: 2008-01-05 09:34:34 -0800 (Sat, 05 Jan 2008)
New Revision: 20762

Log:
Merge r19837 by vapier from trunk:
Atsushi Nemoto writes:
In MIPS syscall(2), .cpload was added to an the error path, but it was
not enough for ABIs other then O32.  Use SETUP_GP, SETUP_GP64 and
RESTORE_GP64 to handle all ABIs.  This patch fixes an error path of
MIPS pipe(2) too.


Modified:
   branches/uClibc_0_9_29/libc/sysdeps/linux/mips/pipe.S
   branches/uClibc_0_9_29/libc/sysdeps/linux/mips/syscall.S


Changeset:
Modified: branches/uClibc_0_9_29/libc/sysdeps/linux/mips/pipe.S
===================================================================
--- branches/uClibc_0_9_29/libc/sysdeps/linux/mips/pipe.S	2008-01-05 17:34:15 UTC (rev 20761)
+++ branches/uClibc_0_9_29/libc/sysdeps/linux/mips/pipe.S	2008-01-05 17:34:34 UTC (rev 20762)
@@ -14,7 +14,11 @@
 
 	.globl	pipe
 	.ent	pipe, 0
+	.type pipe, at function
 pipe:
+#ifdef __PIC__
+	SETUP_GP
+#endif
 	li	v0,__NR_pipe
 	syscall
 	bnez	a3, 1f
@@ -28,7 +32,9 @@
 	/* uClibc change -- stop */
 
 #ifdef __PIC__
+	SETUP_GP64(v0, pipe)
 	PTR_LA	t9, __syscall_error
+	RESTORE_GP64
 	jr	t9
 #else
 	j	__syscall_error

Modified: branches/uClibc_0_9_29/libc/sysdeps/linux/mips/syscall.S
===================================================================
--- branches/uClibc_0_9_29/libc/sysdeps/linux/mips/syscall.S	2008-01-05 17:34:15 UTC (rev 20761)
+++ branches/uClibc_0_9_29/libc/sysdeps/linux/mips/syscall.S	2008-01-05 17:34:34 UTC (rev 20762)
@@ -29,8 +29,10 @@
 .type   syscall, at function
 .ent    syscall
 syscall:
+#ifdef __PIC__
+	SETUP_GP
+#endif
 	.set noreorder
-	.cpload t9;
 	move	v0, a0		/* Load system call number from first arg.  */
 	move	a0, a1		/* Move the next three args up a register.  */
 	move	a1, a2
@@ -68,7 +70,9 @@
 	move	a0,v0		/* Pass return val to C function. */
 
 #ifdef __PIC__
+	SETUP_GP64(v0, syscall)
 	PTR_LA	t9, __syscall_error
+	RESTORE_GP64
 	jr	t9
 #else
 	j	__syscall_error



More information about the uClibc-cvs mailing list