/	Copyright (c) 1984, 1986, 1987, 1988 AT&T
/	  All Rights Reserved

/	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
/	The copyright notice above does not evidence any
/	actual or intended publication of such source code.
	.file	"execle.s"

	.ident	"@(#)libc-i386:libc-i386/sys/execle.s	1.2"

#include <sys.s>

	.globl	execle
	.globl	execve

execle:
	MCOUNT			/ subroutine entry counter if profiling
	leal    4(%esp),%edx    / argv (retaddr + file arg - 4)
	movl	%edx,%eax

.findzero:
	addl	$4,%eax
	cmpl	$0,(%eax)
	jne	.findzero

	pushl	4(%eax)		/ envp
	leal    12(%esp),%edx   / argv (push + retaddr + file arg)
	pushl   %edx
	pushl	12(%esp)	/ file (retaddr + 2 pushes off %esp)
	call	execve
	addl    $12,%esp
	ret
