summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile.arch4
-rw-r--r--libc/sysdeps/linux/powerpc/clone.S30
2 files changed, 5 insertions, 29 deletions
diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch
index f0144e7b9..9dc27c4a5 100644
--- a/libc/sysdeps/linux/powerpc/Makefile.arch
+++ b/libc/sysdeps/linux/powerpc/Makefile.arch
@@ -10,9 +10,7 @@ CSRC-$(if $(UCLIBC_HAS_LONG_DOUBLE_MATH),,y) += copysignl.c
SSRC-y := \
__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
- __uClibc_syscall.S syscall.S
-
-SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += clone.S vfork.S
+ __uClibc_syscall.S syscall.S clone.S vfork.S
ifeq ($(CONFIG_E500),y)
ARCH_HEADERS := fenv.h
diff --git a/libc/sysdeps/linux/powerpc/clone.S b/libc/sysdeps/linux/powerpc/clone.S
index 8efbbda1a..45319d00d 100644
--- a/libc/sysdeps/linux/powerpc/clone.S
+++ b/libc/sysdeps/linux/powerpc/clone.S
@@ -47,14 +47,10 @@ __clone:
/* Set up stack frame for parent. */
stwu r1,-32(r1)
cfi_adjust_cfa_offset (32)
-#ifdef RESET_PID
- stmw r28,16(r1)
-#else
-# ifndef __ASSUME_FIXED_CLONE_SYSCALL
+#ifndef __ASSUME_FIXED_CLONE_SYSCALL
stmw r29,16(r1)
-# else
+#else
stmw r30,16(r1)
-# endif
#endif
/* Set up stack frame for child. */
@@ -67,9 +63,6 @@ __clone:
#ifndef __ASSUME_FIXED_CLONE_SYSCALL
mr r29,r4 /* Stack pointer in r29. */
#endif
-#ifdef RESET_PID
- mr r28,r5
-#endif
mr r31,r6 /* Argument in r31. */
/* 'flags' argument is first parameter to clone syscall. (The other
@@ -101,17 +94,6 @@ __clone:
mr r1,r29
#endif
-#ifdef RESET_PID
- andis. r0,r28,CLONE_THREAD>>16
- bne+ r0,.Loldpid
- andi. r0,r28,CLONE_VM
- li r3,-1
- bne- r0,.Lnomoregetpid
-.Lnomoregetpid:
- stw r3,TID(r2)
- stw r3,PID(r2)
-.Loldpid:
-#endif
/* Call procedure. */
mtctr r30
mr r3,r31
@@ -121,14 +103,10 @@ __clone:
.Lparent:
/* Parent. Restore registers & return. */
-#ifdef RESET_PID
- lmw r28,16(r1)
-#else
-# ifndef __ASSUME_FIXED_CLONE_SYSCALL
+#ifndef __ASSUME_FIXED_CLONE_SYSCALL
lmw r29,16(r1)
-# else
+#else
lmw r30,16(r1)
-# endif
#endif
addi r1,r1,32
bnslr+