exect.S revision 302408
190075Sobrien/*-
296263Sobrien * Copyright (c) 1990 The Regents of the University of California.
390075Sobrien * All rights reserved.
490075Sobrien *
590075Sobrien * This code is derived from software contributed to Berkeley by
690075Sobrien * William Jolitz.
790075Sobrien *
890075Sobrien * Redistribution and use in source and binary forms, with or without
990075Sobrien * modification, are permitted provided that the following conditions
1090075Sobrien * are met:
1190075Sobrien * 1. Redistributions of source code must retain the above copyright
1290075Sobrien *    notice, this list of conditions and the following disclaimer.
1390075Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1490075Sobrien *    notice, this list of conditions and the following disclaimer in the
1590075Sobrien *    documentation and/or other materials provided with the distribution.
1690075Sobrien * 4. Neither the name of the University nor the names of its contributors
1790075Sobrien *    may be used to endorse or promote products derived from this software
1890075Sobrien *    without specific prior written permission.
1990075Sobrien *
2090075Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21103261Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2290075Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23107599Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24103261Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25103261Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2690075Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27107647Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28107647Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2990075Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30106442Sobrien * SUCH DAMAGE.
3190075Sobrien */
3290075Sobrien
3390075Sobrien#if defined(SYSLIBC_SCCS) && !defined(lint)
3496263Sobrien	.asciz "@(#)exect.s	5.1 (Berkeley) 4/23/90"
3596263Sobrien#endif /* SYSLIBC_SCCS and not lint */
3690075Sobrien#include <machine/asm.h>
3790075Sobrien__FBSDID("$FreeBSD: stable/11/lib/libc/i386/sys/exect.S 240152 2012-09-05 21:41:05Z jilles $");
3890075Sobrien
3990075Sobrien#include "SYS.h"
4090075Sobrien#include <machine/psl.h>
4190075Sobrien
4290075SobrienENTRY(exect)
4390075Sobrien	mov	$SYS_execve,%eax
4490075Sobrien	pushf
4590075Sobrien	popl	%edx
4690075Sobrien	orl	$ PSL_T,%edx
4790075Sobrien	pushl	%edx
4890075Sobrien	popf
4990075Sobrien	KERNCALL
5090075Sobrien	jmp	HIDENAME(cerror)	/* exect(file, argv, env); */
5190075SobrienEND(exect)
5290075Sobrien
5390075Sobrien	.section .note.GNU-stack,"",%progbits
5490075Sobrien