]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sparc / sparc64 / clone.S
index cecffa7fb9c5406ff1e548ab55607fa53e9847a9..f6122e5108a6baed8145e11fb6d46e1f8cd960fc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@tamu.edu).
 
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 /* clone() is even more special than fork() as it mucks with stacks
    and invokes a function in the right context after its all over.  */
@@ -24,9 +24,6 @@
 #include <tcb-offsets.h>
 #include <sysdep.h>
 
-#define CLONE_VM       0x00000100
-#define CLONE_THREAD   0x00010000
-
 /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
             pid_t *ptid, void *tls, pid_t *ctid); */
 
@@ -52,7 +49,6 @@ ENTRY (__clone)
           expects.  Also, subtract STACK_BIAS.  */
        sub     %i1, 192 + 0x7ff, %o1
        mov     %i3, %g3
-       mov     %i2, %g4
 
        mov     %i4,%o2                 /* PTID */
        mov     %i5,%o3                 /* TLS */
@@ -77,21 +73,11 @@ END(__clone)
 
        .type __thread_start,@function
 __thread_start:
-       sethi   %hi(CLONE_THREAD), %l0
-       andcc   %g4, %l0, %g0
-       bne,pt  %icc, 1f
-        andcc  %g4, CLONE_VM, %g0
-       bne,a,pn %icc, 2f
-        mov    -1,%o0
-       set     __NR_getpid,%g1
-       ta      0x6d
-2:     st      %o0,[%g7 + PID]
-       st      %o0,[%g7 + TID]
-1:
        mov     %g0, %fp        /* terminate backtrace */
        call    %g2
         mov    %g3,%o0
-       call    HIDDEN_JUMPTARGET(_exit),0
+       set     __NR_exit, %g1
+       ta      0x6d
         nop
 
        .size   __thread_start, .-__thread_start