summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1998-09-18 05:50:52 +0000
committerluoqi <luoqi@FreeBSD.org>1998-09-18 05:50:52 +0000
commitc43759f857ec8b1421c9f549fad00641aa25275b (patch)
tree3917cbebd0fbc19021c66b9bc36f8cfd087f67f9 /lib/libc/i386
parent37eda2089dc2b2c57ca9f92e5518a0b7028313fd (diff)
downloadFreeBSD-src-c43759f857ec8b1421c9f549fad00641aa25275b.zip
FreeBSD-src-c43759f857ec8b1421c9f549fad00641aa25275b.tar.gz
Simplify implementation and eliminate a register preservation problem.
Reviewed by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'lib/libc/i386')
-rw-r--r--lib/libc/i386/sys/Ovfork.S34
1 files changed, 10 insertions, 24 deletions
diff --git a/lib/libc/i386/sys/Ovfork.S b/lib/libc/i386/sys/Ovfork.S
index fbba946..6a1d5b9 100644
--- a/lib/libc/i386/sys/Ovfork.S
+++ b/lib/libc/i386/sys/Ovfork.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))
OpenPOWER on IntegriCloud