about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sh/vfork.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sh/vfork.S')
-rw-r--r--sysdeps/unix/sysv/linux/sh/vfork.S55
1 files changed, 6 insertions, 49 deletions
diff --git a/sysdeps/unix/sysv/linux/sh/vfork.S b/sysdeps/unix/sysv/linux/sh/vfork.S
index 706aa57b50..e926e3b19e 100644
--- a/sysdeps/unix/sysv/linux/sh/vfork.S
+++ b/sysdeps/unix/sysv/linux/sh/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -39,28 +39,8 @@ ENTRY (__vfork)
 	mov.w	.L1, r1
 	cmp/eq	r1, r0
 	bt	2f
-	mov.l	.L2, r1
-#ifdef SHARED
-	mov	r0, r4
-	mov.l	r12, @-r15
-	sts.l	pr, @-r15
-	mov.l	0f, r12
-	mova	0f, r0
-	add	r0, r12
-	mova	.L2, r0
-	add	r0, r1
-	jsr	@r1
+	bra	.Lsyscall_error
 	 nop
-	lds.l	@r15+, pr
-	rts
-	 mov.l	@r15+, r12
-	.align	2
-0:
-	.long	_GLOBAL_OFFSET_TABLE_
-#else
-	jmp	@r1
-	 mov	r0, r4
-#endif
 .L1:
 	.word	-ENOSYS
 .L3:	.word	__NR_vfork
@@ -78,33 +58,10 @@ ENTRY (__vfork)
 	shad	r2, r1
 	not	r1, r1			// r1=0 means r0 = -1 to -4095
 	tst	r1, r1			// i.e. error in linux
-	bf	1f
-	mov.l	.L2, r1
-#ifdef SHARED
-	mov	r0, r4
-	mov.l	r12, @-r15
-	sts.l	pr, @-r15
-        mov.l	0f, r12
-	mova	0f, r0
-	add	r0, r12
-	mova	.L2, r0
-	add	r0, r1
-	jsr	@r1
-	 nop
-	lds.l	@r15+, pr
-	rts
-	 mov.l	@r15+, r12
-	.align	2
-0:
-	.long	_GLOBAL_OFFSET_TABLE_
-#else
-	jmp	@r1
-	 mov	r0, r4
-#endif
-	.align	2
-.L2:
-	.long	PLTJMP(C_SYMBOL_NAME(__syscall_error))
-1:
+	bf	.Lpseudo_end
+.Lsyscall_error:	
+	SYSCALL_ERROR_HANDLER
+.Lpseudo_end:
 	rts
 	 nop