[PATCH] Fix sparc64 clone

Jakub Jelinek jakub@redhat.com
Tue Dec 18 12:56:00 GMT 2001


Hi!

No idea why I missed this, apparently threading never worked on sparc64
(because of this and an additional kernel bug which DaveM fixed today).
Can this be added to 2.2 branch too?

2001-12-18  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (clone): Subtract
	stack bias from child stack pointer before passing it to clone
	syscall.

--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S.jj	Mon Jul  9 20:58:47 2001
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S	Tue Dec 18 17:36:17 2001
@@ -40,7 +40,7 @@ __clone:
 	 mov	%i3, %l3		/* save arg */
 
 	/* Do the system call */
-	mov	%i1, %o1
+	sub	%i1, 0x7ff, %o1
 	mov	%i2, %o0
 	set	__NR_clone, %g1
 	ta	0x6d

	Jakub



More information about the Libc-hacker mailing list