diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/aarch64/clone.S')
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/clone.S | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/clone.S b/sysdeps/unix/sysv/linux/aarch64/clone.S index 596fb9cc77..e065304825 100644 --- a/sysdeps/unix/sysv/linux/aarch64/clone.S +++ b/sysdeps/unix/sysv/linux/aarch64/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -23,12 +23,6 @@ #define _ERRNO_H 1 #include <bits/errno.h> -#define CLONE_VM_BIT 8 -#define CLONE_VM (1 << CLONE_VM_BIT) - -#define CLONE_THREAD_BIT 16 -#define CLONE_THREAD (1 << CLONE_THREAD_BIT) - /* int clone(int (*fn)(void *arg), x0 void *child_stack, x1 int flags, x2 @@ -39,6 +33,13 @@ */ .text ENTRY(__clone) + DELOUSE (0) + DELOUSE (1) + DELOUSE (2) + DELOUSE (3) + DELOUSE (4) + DELOUSE (5) + DELOUSE (6) /* Save args for the child. */ mov x10, x0 mov x11, x2 @@ -72,25 +73,15 @@ thread_start: cfi_undefined (x30) mov x29, 0 - tbnz x11, #CLONE_THREAD_BIT, 3f - mov x0, #-1 - tbnz x11, #CLONE_VM_BIT, 2f - mov x8, #SYS_ify(getpid) - svc 0x0 -2: - mrs x1, tpidr_el0 - sub x1, x1, #PTHREAD_SIZEOF - str w0, [x1, #PTHREAD_PID_OFFSET] - str w0, [x1, #PTHREAD_TID_OFFSET] -3: - /* Pick the function arg and execute. */ mov x0, x12 blr x10 /* We are done, pass the return value through x0. */ - b HIDDEN_JUMPTARGET(_exit) + mov x8, #SYS_ify(exit) + svc 0x0 cfi_endproc .size thread_start, .-thread_start +libc_hidden_def (__clone) weak_alias (__clone, clone) |