1178580Simp/* $NetBSD: exect.S,v 1.9 2003/08/07 16:42:17 agc Exp $ */ 2178580Simp/*- 3178580Simp * Copyright (c) 1991, 1993 4178580Simp * The Regents of the University of California. All rights reserved. 5178580Simp * 6178580Simp * This code is derived from software contributed to Berkeley by 7178580Simp * Ralph Campbell. 8178580Simp * 9178580Simp * Redistribution and use in source and binary forms, with or without 10178580Simp * modification, are permitted provided that the following conditions 11178580Simp * are met: 12178580Simp * 1. Redistributions of source code must retain the above copyright 13178580Simp * notice, this list of conditions and the following disclaimer. 14178580Simp * 2. Redistributions in binary form must reproduce the above copyright 15178580Simp * notice, this list of conditions and the following disclaimer in the 16178580Simp * documentation and/or other materials provided with the distribution. 17178580Simp * 3. Neither the name of the University nor the names of its contributors 18178580Simp * may be used to endorse or promote products derived from this software 19178580Simp * without specific prior written permission. 20178580Simp * 21178580Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22178580Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23178580Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24178580Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25178580Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26178580Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27178580Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28178580Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29178580Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30178580Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31178580Simp * SUCH DAMAGE. 32178580Simp */ 33178580Simp 34178580Simp#include <machine/asm.h> 35178580Simp__FBSDID("$FreeBSD: releng/10.3/lib/libc/mips/sys/exect.S 209231 2010-06-16 12:55:14Z jchandra $"); 36178580Simp#include "SYS.h" 37178580Simp 38178580Simp#if defined(LIBC_SCCS) && !defined(lint) 39178580Simp ASMSTR("from: @(#)exect.s 8.1 (Berkeley) 6/4/93") 40178580Simp ASMSTR("$NetBSD: exect.S,v 1.9 2003/08/07 16:42:17 agc Exp $") 41178580Simp#endif /* LIBC_SCCS and not lint */ 42178580Simp 43178580SimpLEAF(exect) 44209231Sjchandra PIC_PROLOGUE(exect) 45178580Simp li v0, SYS_execve 46178580Simp syscall 47178580Simp bne a3, zero, 1f 48209231Sjchandra PIC_RETURN() 49178580Simp1: 50209231Sjchandra PIC_TAILCALL(__cerror) 51178580SimpEND(exect) 52