]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Likewise tuck the thread data onto the new thread's stack.
authorUlrich Drepper <drepper@redhat.com>
Wed, 21 May 1997 00:07:08 +0000 (00:07 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 21 May 1997 00:07:08 +0000 (00:07 +0000)
sysdeps/unix/sysv/linux/alpha/clone.S

index 261bd81e579881f4653dcdc891c35c5c60d498be..aab4e590a5501f79a8dc2b494d04bce55a6f9ad3 100644 (file)
@@ -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,a4                   /* 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     a4,a0
        jsr     ra,(pv)
        ldgp    gp,0(ra)