xref: /csrg-svn/lib/libc/mips/SYS.h (revision 61148)
152704Sbostic /*-
2*61148Sbostic  * Copyright (c) 1991, 1993
3*61148Sbostic  *	The Regents of the University of California.  All rights reserved.
452704Sbostic  *
552704Sbostic  * This code is derived from software contributed to Berkeley by
652704Sbostic  * Ralph Campbell.
752704Sbostic  *
852704Sbostic  * %sccs.include.redist.c%
952704Sbostic  *
10*61148Sbostic  *	@(#)SYS.h	8.1 (Berkeley) 06/04/93
1152704Sbostic  */
1252704Sbostic 
1352704Sbostic #include <sys/syscall.h>
1455709Sralph #include <machine/machAsmDefs.h>
1552704Sbostic 
1657855Sralph #ifdef __STDC__
1757855Sralph #define	RSYSCALL(x)	LEAF(x); li v0,SYS_ ## x; syscall; bne a3,zero,err; \
1852704Sbostic 			j ra; err: j _cerror; END(x);
1957855Sralph #define	PSEUDO(x,y)	LEAF(x); li v0,SYS_ ## y; syscall; bne a3,zero,err; \
2057855Sralph 			j ra; err: j _cerror; END(x);
2157855Sralph #else
2257855Sralph #define	RSYSCALL(x)	LEAF(x); li v0,SYS_/**/x; syscall; bne a3,zero,err; \
2357855Sralph 			j ra; err: j _cerror; END(x);
2452704Sbostic #define	PSEUDO(x,y)	LEAF(x); li v0,SYS_/**/y; syscall; bne a3,zero,err; \
2552704Sbostic 			j ra; err: j _cerror; END(x);
2657855Sralph #endif
27