diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 15:58:23 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 15:58:23 +0000 |
commit | 25ead03a3712d57df2208fe82f3d316eb8faeaf6 (patch) | |
tree | eb6ebccbeffba879a7cf9cbaa29daeeb73d8e049 /sysdeps/unix/sysv/linux/hppa/clone.S | |
parent | bf9f3c5bced2d3a5fb782b5a7de1008d8ca1425c (diff) | |
parent | 963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff) |
Merge commit 'refs/top-bases/t/faccessat' into t/faccessat
Diffstat (limited to 'sysdeps/unix/sysv/linux/hppa/clone.S')
-rw-r--r-- | sysdeps/unix/sysv/linux/hppa/clone.S | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index e80fd8d579..0c581ec53b 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/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. Contributed by David Huggins-Daines <dhd@debian.org>, 2000. Based on the Alpha version by Richard Henderson <rth@tamu.edu>, 1996. @@ -64,9 +64,12 @@ ENTRY(__clone) /* Prologue */ stwm %r4, 64(%sp) + .cfi_def_cfa_offset -64 + .cfi_offset 4, 0 stw %sp, -4(%sp) #ifdef PIC stw %r19, -32(%sp) + .cfi_offset 19, 32 #endif /* Sanity check arguments. */ @@ -132,24 +135,6 @@ ENTRY(__clone) ldwm -64(%sp), %r4 .LthreadStart: -# define CLONE_VM_BIT 23 /* 0x00000100 */ -# define CLONE_THREAD_BIT 15 /* 0x00010000 */ - /* Load original clone flags. - If CLONE_THREAD was passed, don't reset the PID/TID. - If CLONE_VM was passed, we need to store -1 to PID/TID. - If CLONE_VM and CLONE_THREAD were not set store the result - of getpid to PID/TID. */ - ldw -56(%sp), %r26 - bb,<,n %r26, CLONE_THREAD_BIT, 1f - bb,< %r26, CLONE_VM_BIT, 2f - ldi -1, %ret0 - ble 0x100(%sr2, %r0) - ldi __NR_getpid, %r20 -2: - mfctl %cr27, %r26 - stw %ret0, PID_THREAD_OFFSET(%r26) - stw %ret0, TID_THREAD_OFFSET(%r26) -1: /* Load up the arguments. */ ldw -60(%sp), %arg0 ldw -64(%sp), %r22 @@ -165,14 +150,15 @@ ENTRY(__clone) #ifdef PIC copy %r4, %r19 #endif - /* The call to _exit needs saved r19. */ - bl _exit, %rp - copy %ret0, %arg0 + copy %r28, %r26 + ble 0x100(%sr2, %r0) + ldi __NR_exit, %r20 - /* We should not return from _exit. + /* We should not return from exit. We do not restore r4, or the stack state. */ iitlbp %r0, (%sr0, %r0) PSEUDO_END(__clone) +libc_hidden_def (__clone) weak_alias (__clone, clone) |