10e233d15Smatt/* 20e233d15Smatt * Copyright (c) 1983, 1993 30e233d15Smatt * The Regents of the University of California. All rights reserved. 40e233d15Smatt * (c) UNIX System Laboratories, Inc. 50e233d15Smatt * All or some portions of this file are derived from material licensed 60e233d15Smatt * to the University of California by American Telephone and Telegraph 70e233d15Smatt * Co. or Unix System Laboratories, Inc. and are reproduced herein with 80e233d15Smatt * the permission of UNIX System Laboratories, Inc. 90e233d15Smatt * 100e233d15Smatt * Redistribution and use in source and binary forms, with or without 110e233d15Smatt * modification, are permitted provided that the following conditions 120e233d15Smatt * are met: 130e233d15Smatt * 1. Redistributions of source code must retain the above copyright 140e233d15Smatt * notice, this list of conditions and the following disclaimer. 150e233d15Smatt * 2. Redistributions in binary form must reproduce the above copyright 160e233d15Smatt * notice, this list of conditions and the following disclaimer in the 170e233d15Smatt * documentation and/or other materials provided with the distribution. 18eb7c1594Sagc * 3. Neither the name of the University nor the names of its contributors 190e233d15Smatt * may be used to endorse or promote products derived from this software 200e233d15Smatt * without specific prior written permission. 210e233d15Smatt * 220e233d15Smatt * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 230e233d15Smatt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 240e233d15Smatt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 250e233d15Smatt * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 260e233d15Smatt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 270e233d15Smatt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 280e233d15Smatt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 290e233d15Smatt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 300e233d15Smatt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 310e233d15Smatt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 320e233d15Smatt * SUCH DAMAGE. 330e233d15Smatt */ 340e233d15Smatt 35*787e823fSmatt#include "SYS.h" 36*787e823fSmatt 370e233d15Smatt#if defined(SYSLIBC_SCCS) && !defined(lint) 380e233d15Smatt /* .asciz "@(#)syscall.s 8.2 (Berkeley) 1/21/94" */ 39*787e823fSmattRCSID("$NetBSD: __syscall.S,v 1.4 2011/01/25 02:38:15 matt Exp $") 400e233d15Smatt#endif /* SYSLIBC_SCCS and not lint */ 410e233d15Smatt 420e233d15SmattENTRY(__syscall, 0) 430ce5ca14Smatt movl 4(%ap),%r0 # syscall number 440ce5ca14Smatt addl2 $8,%ap # skip the first argument 450ce5ca14Smatt subl3 $2,-8(%ap),(%ap) # two fewer arguments 460ce5ca14Smatt chmk %r0 470e233d15Smatt jcs 1f 480e233d15Smatt ret 490e233d15Smatt1: 500e233d15Smatt jmp CERROR+2 51*787e823fSmattEND(__syscall) 52