about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S')
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S29
1 files changed, 12 insertions, 17 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
index 5054d5f984..ee6254a950 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
+++ b/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
@@ -36,16 +36,15 @@ ENTRY (__vfork)
 	mtlr	9
 	lwz	10,__libc_pthread_functions@got(10)
 	lwz	10,0(10)
-	cmpwi	10,0
-	bne-	HIDDEN_JUMPTARGET(__fork)
 # else
 	.weak	pthread_create
-	lis	9,pthread_create@ha
-	la	9,pthread_create@l(9)
-	cmpwi	9,0
-	bne-	.Lhidden_fork
+	lis	10,pthread_create@ha
+	la	10,pthread_create@l(10)
 # endif
 
+	cmpwi	10,0
+	bne-	.Lhidden_fork
+
 	DO_CALL (SYS_ify (vfork));
 
 # ifdef __ASSUME_VFORK_SYSCALL
@@ -54,28 +53,24 @@ ENTRY (__vfork)
 	bnslr+
 	/* Check if vfork syscall is known at all.  */
 	cmpwi	r3,ENOSYS
-#  ifdef SHARED
-	bne	JUMPTARGET(__syscall_error)
-#  else
-	bne	.Lsyscall_error
-#  endif
+	bne-	.Lsyscall_error
 
 # endif
+
+.Lhidden_fork:
+	b	HIDDEN_JUMPTARGET(__fork)
+
 #endif
 
 #ifndef __ASSUME_VFORK_SYSCALL
 	/* If we don't have vfork, fork is close enough.  */
 
 	DO_CALL (SYS_ify (fork));
-	PSEUDO_RET
-#endif
+	bnslr+
 
-# ifndef SHARED
-.Lhidden_fork:
-	b	HIDDEN_JUMPTARGET(__fork)
 .Lsyscall_error:
 	b	JUMPTARGET(__syscall_error)
-# endif
+#endif
 
 PSEUDO_END (__vfork)
 libc_hidden_def (__vfork)