aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/amd64
diff options
context:
space:
mode:
authorLuoqi Chen <luoqi@FreeBSD.org>1998-09-18 05:50:52 +0000
committerLuoqi Chen <luoqi@FreeBSD.org>1998-09-18 05:50:52 +0000
commitae45749a50ef36ea6192d06d77b3b3bf6da42aa5 (patch)
treee6fb477c8b9dfc0104ecaf94abae615eab324989 /lib/libc/amd64
parent7ecd7a42c5bab4e5077607db10264e9368c1d949 (diff)
Notes
Diffstat (limited to 'lib/libc/amd64')
-rw-r--r--lib/libc/amd64/sys/vfork.S34
1 files changed, 10 insertions, 24 deletions
diff --git a/lib/libc/amd64/sys/vfork.S b/lib/libc/amd64/sys/vfork.S
index fbba946db82f..6a1d5b9aa86d 100644
--- a/lib/libc/amd64/sys/vfork.S
+++ b/lib/libc/amd64/sys/vfork.S
@@ -33,12 +33,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: Ovfork.S,v 1.8 1998/09/12 22:03:08 dt Exp $
+ * $Id: Ovfork.S,v 1.9 1998/09/13 20:32:45 luoqi Exp $
*/
#if defined(SYSLIBC_RCS) && !defined(lint)
.text
- .asciz "$Id: Ovfork.S,v 1.8 1998/09/12 22:03:08 dt Exp $"
+ .asciz "$Id: Ovfork.S,v 1.9 1998/09/13 20:32:45 luoqi Exp $"
#endif /* SYSLIBC_RCS and not lint */
#include "DEFS.h"
@@ -60,27 +60,13 @@ ENTRY(vfork)
popl %ecx /* my rta into ecx */
lea SYS_vfork,%eax
KERNCALL
- jb verror
-vforkok:
- cmpl $0,%edx /* child process? */
- jne child /* yes */
- jmp parent
-
- .globl CNAME(__error)
- .type CNAME(__error),@function
-verror:
- pushl %eax
-#ifdef PIC
- call PIC_PLT(CNAME(__error))
-#else
- call CNAME(__error)
-#endif
- popl %edx
- movl %edx,(%eax)
- movl $-1,%eax
- movl $-1,%edx
- jmp %ecx
-child:
+ jb 2f
+ cmpl $0,%edx /* parent process? */
+ je 1f /* yes */
movl $0,%eax
-parent:
+1:
jmp %ecx
+2:
+ pushl %ecx
+ PIC_PROLOGUE
+ jmp PIC_PLT(HIDENAME(cerror))