SYS.h revision 1.3 1 /* $NetBSD: SYS.h,v 1.3 1996/09/15 18:18:26 cgd Exp $ */
2
3 /*
4 * Copyright (c) 1994, 1995 Carnegie-Mellon University.
5 * All rights reserved.
6 *
7 * Author: Chris G. Demetriou
8 *
9 * Permission to use, copy, modify and distribute this software and
10 * its documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation.
14 *
15 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 *
19 * Carnegie Mellon requests users of this software to return to
20 *
21 * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
22 * School of Computer Science
23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890
25 *
26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes.
28 */
29
30 #include <machine/asm.h>
31 #include <sys/syscall.h>
32
33 #define CALLSYS(num) \
34 CONST(num, v0); \
35 call_pal 0x83; /* op_callsys */
36
37 #define SYSCALL_NOLABEL(x) \
38 .set noat; \
39 CALLSYS(SYS_/**/x); \
40 br gp, L8000; \
41 L8000: \
42 SETGP(gp); \
43 beq a3, L8001; \
44 lda at_reg, cerror; \
45 jmp zero, (at_reg); \
46 L8001: \
47 .set at
48
49 #define SYSCALL(x) LEAF(x, 0 /* XXX */); SYSCALL_NOLABEL(x);
50 #define RSYSCALL(x) SYSCALL(x); RET; END(x);
51
52 #define PSEUDO(x,y) \
53 LEAF(x,0); /* unknown # of args */ \
54 CALLSYS(SYS_/**/y); \
55 RET; \
56 END(x);
57