exect.S revision 1849
1226031Sstas/*-
2226031Sstas * Copyright (c) 1990 The Regents of the University of California.
3226031Sstas * All rights reserved.
4226031Sstas *
5226031Sstas * This code is derived from software contributed to Berkeley by
6226031Sstas * William Jolitz.
7226031Sstas *
8226031Sstas * Redistribution and use in source and binary forms, with or without
9226031Sstas * modification, are permitted provided that the following conditions
10226031Sstas * are met:
11226031Sstas * 1. Redistributions of source code must retain the above copyright
12226031Sstas *    notice, this list of conditions and the following disclaimer.
13226031Sstas * 2. Redistributions in binary form must reproduce the above copyright
14226031Sstas *    notice, this list of conditions and the following disclaimer in the
15226031Sstas *    documentation and/or other materials provided with the distribution.
16226031Sstas * 3. All advertising materials mentioning features or use of this software
17226031Sstas *    must display the following acknowledgement:
18226031Sstas *	This product includes software developed by the University of
19226031Sstas *	California, Berkeley and its contributors.
20226031Sstas * 4. Neither the name of the University nor the names of its contributors
21226031Sstas *    may be used to endorse or promote products derived from this software
22226031Sstas *    without specific prior written permission.
23226031Sstas *
24226031Sstas * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25226031Sstas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26226031Sstas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27226031Sstas * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28226031Sstas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29226031Sstas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30226031Sstas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31226031Sstas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32226031Sstas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33226031Sstas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34226031Sstas * SUCH DAMAGE.
35226031Sstas *
36226031Sstas *	$Id: exect.S,v 1.2 1994/02/21 05:19:10 rgrimes Exp $
37226031Sstas */
38226031Sstas
39226031Sstas#if defined(SYSLIBC_SCCS) && !defined(lint)
40226031Sstas	.asciz "@(#)exect.s	5.1 (Berkeley) 4/23/90"
41226031Sstas#endif /* SYSLIBC_SCCS and not lint */
42226031Sstas
43226031Sstas#include "SYS.h"
44226031Sstas#include <machine/psl.h>
45226031Sstas
46226031SstasENTRY(exect)
47226031Sstas	lea	SYS_execve,%eax
48226031Sstas	pushf
49226031Sstas	popl	%edx
50226031Sstas	orl	$ PSL_T,%edx
51226031Sstas	pushl	%edx
52226031Sstas	popf
53226031Sstas	LCALL(7,0)
54226031Sstas	jmp	cerror		/* exect(file, argv, env); */
55226031Sstas