aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-05-07 15:31:06 +0000
committerUlrich Drepper <drepper@redhat.com>1997-05-07 15:31:06 +0000
commit0f85544d18abb403d9f1d006090877070ff8773d (patch)
tree173b98b2f6386ad203fad27a574d2dd6322ad1ed
parentc0fda13c3800dfca97266c49307419f923056b7e (diff)
downloadglibc-0f85544d18abb403d9f1d006090877070ff8773d.tar.xz
glibc-0f85544d18abb403d9f1d006090877070ff8773d.zip
Likewise tuck the thread data onto the new thread's stack.
-rw-r--r--sysdeps/unix/sysv/linux/alpha/clone.S13
1 files changed, 10 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 5d36e2588d..aab4e590a5 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -42,9 +42,12 @@ ENTRY(__clone)
beq a0,$error /* no NULL function pointers */
beq a1,$error /* no NULL stack pointers */
+ /* Save the fn ptr and arg on the new stack. */
+ subq a1,16,a1
+ stq a0,0(a1)
+ stq a3,8(a1)
+
/* Do the system call */
- mov a0,pv /* get fn ptr out of the way */
- mov a3,t0 /* get fn arg out of the way */
mov a2,a0
ldiq v0,__NR_clone
call_pal PAL_callsys
@@ -73,8 +76,12 @@ thread_start:
mov zero,fp
.prologue 0
+ /* Load up the arguments. */
+ ldq pv,0(sp)
+ ldq a0,8(sp)
+ addq sp,16,sp
+
/* Call the user's function */
- mov t0,a0
jsr ra,(pv)
ldgp gp,0(ra)