syscall.S revision 1.8
11.1Sragge/*
21.1Sragge * Copyright (c) 1983, 1993
31.1Sragge *	The Regents of the University of California.  All rights reserved.
41.1Sragge * (c) UNIX System Laboratories, Inc.
51.1Sragge * All or some portions of this file are derived from material licensed
61.1Sragge * to the University of California by American Telephone and Telegraph
71.1Sragge * Co. or Unix System Laboratories, Inc. and are reproduced herein with
81.1Sragge * the permission of UNIX System Laboratories, Inc.
91.1Sragge *
101.1Sragge * Redistribution and use in source and binary forms, with or without
111.1Sragge * modification, are permitted provided that the following conditions
121.1Sragge * are met:
131.1Sragge * 1. Redistributions of source code must retain the above copyright
141.1Sragge *    notice, this list of conditions and the following disclaimer.
151.1Sragge * 2. Redistributions in binary form must reproduce the above copyright
161.1Sragge *    notice, this list of conditions and the following disclaimer in the
171.1Sragge *    documentation and/or other materials provided with the distribution.
181.6Sagc * 3. Neither the name of the University nor the names of its contributors
191.1Sragge *    may be used to endorse or promote products derived from this software
201.1Sragge *    without specific prior written permission.
211.1Sragge *
221.1Sragge * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
231.1Sragge * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
241.1Sragge * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
251.1Sragge * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
261.1Sragge * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
271.1Sragge * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
281.1Sragge * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
291.1Sragge * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
301.1Sragge * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
311.1Sragge * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
321.1Sragge * SUCH DAMAGE.
331.1Sragge */
341.1Sragge
351.7Smatt#include "SYS.h"
361.7Smatt
371.1Sragge#if defined(SYSLIBC_SCCS) && !defined(lint)
381.1Sragge	/* .asciz "@(#)syscall.s	8.2 (Berkeley) 1/21/94" */
391.8SthorpejRCSID("$NetBSD: syscall.S,v 1.8 2020/04/18 23:55:51 thorpej Exp $")
401.1Sragge#endif /* SYSLIBC_SCCS and not lint */
411.1Sragge
421.8SthorpejENTRY(_syscall, 0)
431.5Smatt	movl	4(%ap),%r0	# syscall number
441.5Smatt	subl3	$1,(%ap)+,(%ap)	# one fewer arguments
451.5Smatt	chmk	%r0
461.1Sragge	jcs	1f
471.1Sragge	ret
481.1Sragge1:
491.4Smatt	jmp	CERROR+2
501.8SthorpejEND(_syscall)
511.8SthorpejWEAK_ALIAS(syscall,_syscall)
52