2014-05-26 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Remove
+ conditional [RESET_PID].
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
+ * nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: File
+ removed.
+ * nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: File
+ removed.
+
* sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Include
<tcb-offsets.h>.
(__vfork): Incorporate save/restore of PID from nptl/vfork.S here.
+++ /dev/null
-/* We want an #include_next, but we are the main source file.
- So, #include ourselves and in that incarnation we can use #include_next. */
-#ifndef INCLUDED_SELF
-# define INCLUDED_SELF
-# include <clone.S>
-#else
-# define RESET_PID
-# include_next <clone.S>
-#endif
+++ /dev/null
-/* We want an #include_next, but we are the main source file.
- So, #include ourselves and in that incarnation we can use #include_next. */
-#ifndef INCLUDED_SELF
-# define INCLUDED_SELF
-# include <clone.S>
-#else
-# define RESET_PID
-# include_next <clone.S>
-#endif
/* Set up stack frame for parent. */
stwu r1,-32(r1)
cfi_adjust_cfa_offset (32)
-#ifdef RESET_PID
stmw r28,16(r1)
-#else
- stmw r30,16(r1)
-#endif
/* Set up stack frame for child. */
clrrwi r4,r4,4
/* Save fn, args, stack across syscall. */
mr r30,r3 /* Function in r30. */
-#ifdef RESET_PID
mr r28,r5
-#endif
mr r31,r6 /* Argument in r31. */
/* 'flags' argument is first parameter to clone syscall. (The other
crandc cr1*4+eq,cr1*4+eq,cr0*4+so
bne- cr1,L(parent) /* The '-' is to minimise the race. */
-#ifdef RESET_PID
andis. r0,r28,CLONE_THREAD>>16
bne+ r0,L(oldpid)
andi. r0,r28,CLONE_VM
stw r3,TID(r2)
stw r3,PID(r2)
L(oldpid):
-#endif
/* Call procedure. */
mtctr r30
L(parent):
/* Parent. Restore registers & return. */
-#ifdef RESET_PID
lmw r28,16(r1)
-#else
- lmw r30,16(r1)
-#endif
addi r1,r1,32
bnslr+
b __syscall_error@local
beq- cr0,L(badargs)
/* Save some regs in the "red zone". */
-#ifdef RESET_PID
std r29,-24(r1)
-#endif
std r30,-16(r1)
std r31,-8(r1)
-#ifdef RESET_PID
cfi_offset(r29,-24)
-#endif
cfi_offset(r30,-16)
cfi_offset(r31,-8)
/* Save fn, args, stack across syscall. */
mr r30,r3 /* Function in r30. */
-#ifdef RESET_PID
mr r29,r5 /* Flags in r29. */
-#endif
mr r31,r6 /* Argument in r31. */
/* 'flags' argument is first parameter to clone syscall.
Second is the stack pointer, already in r4. */
mr r3,r5
- /* Move the parent_tid, child_tid and tls arguments. */
+ /* Move the parent_tid, child_tid and tls arguments. */
mr r5,r7
mr r6,r8
mr r7,r9
crandc cr1*4+eq,cr1*4+eq,cr0*4+so
bne- cr1,L(parent) /* The '-' is to minimise the race. */
-#ifdef RESET_PID
andis. r0,r29,CLONE_THREAD>>16
bne+ cr0,L(oldpid)
andi. r0,r29,CLONE_VM
stw r3,TID(r13)
stw r3,PID(r13)
L(oldpid):
-#endif
std r2,FRAME_TOC_SAVE(r1)
/* Call procedure. */
L(parent):
/* Parent. Restore registers & return. */
-#ifdef RESET_PID
cfi_offset(r29,-24)
-#endif
cfi_offset(r30,-16)
cfi_offset(r31,-8)
-#ifdef RESET_PID
ld r29,-24(r1)
-#endif
ld r30,-16(r1)
ld r31,-8(r1)
-#ifdef RESET_PID
cfi_restore(r29)
-#endif
cfi_restore(r30)
cfi_restore(r31)
+
PSEUDO_RET
END (__clone)