This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PPC64 clone.S

Similar to PPC32 patch from Paul MacKerras. Copy R7-9 down to R5-7.

2003-03-10  Steven Munroe  <sjmunroe at us dot ibm dot com>

        * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Don't clobber R7.
	Copy extra parms for nptl to registers used in clone syscall.

Steven Munroe
sjmunroe at us dot ibm dot com
Linux on PowerPC-64 Development
GLIBC for PowerPC-64 Development
diff -urN libc23-cvstip-20030305/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
--- libc23-cvstip-20030305/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S	2002-09-17 18:50:03.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S	2003-03-10 14:12:58.000000000 -0600
@@ -28,7 +28,8 @@
    all the freaky stuff we have to do to make the call useful.  */
 /* int [r3] clone(int (*fn)(void *arg) [r3], void *child_stack [r4],
-   		  int flags [r5], void *arg [r6]); */
+                  int flags [r5], void *arg [r6], void *parent_tid [r7],
+                  void *tls [r8], void *child_tid [r9]); */
 ENTRY (BP_SYM (__clone))
 	/* GKM FIXME: add bounds checks, where sensible.  */
@@ -37,8 +38,8 @@
 	/* Check for child_stack == NULL || fn == NULL.  */
 	cmpdi	cr0,r4,0
-	ld	r7,0(r3)
-	cmpdi	cr1,r7,0
+	ld	r0,0(r3)
+	cmpdi	cr1,r0,0
 	cror	cr0*4+eq,cr1*4+eq,cr0*4+eq
 	beq-	cr0,L(badargs)
@@ -61,6 +62,10 @@
 	/* 'flags' argument is first parameter to clone syscall. (The other
 	   argument is the stack pointer, already in r4.)  */
 	mr	r3,r5
+  /* Move the parent_tid, child_tid and tls arguments. */
+	mr	r5,r7
+	mr	r6,r8
+	mr	r7,r9
 	/* Do the call.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]