1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)SYS.h 5.5 (Berkeley) 05/07/91 11 */ 12 13 #include <syscall.h> 14 15 #ifdef PROF 16 #define ENTRY(x) .globl _/**/x; \ 17 .data; 1:; .long 0; .text; .align 2; _/**/x: \ 18 movl $1b,%eax; call mcount 19 #else 20 #define ENTRY(x) .globl _/**/x; .text; .align 2; _/**/x: 21 #endif PROF 22 #define SYSCALL(x) 2: jmp cerror; ENTRY(x); lea SYS_/**/x,%eax; LCALL(7,0); jb 2b 23 #define RSYSCALL(x) SYSCALL(x); ret 24 #define PSEUDO(x,y) ENTRY(x); lea SYS_/**/y, %eax; ; LCALL(7,0); ret 25 #define CALL(x,y) call _/**/y; addl $4*x,%esp 26 /* gas fucks up offset -- although we don't currently need it, do for BCS */ 27 #define LCALL(x,y) .byte 0x9a ; .long y; .word x 28 29 #define ASMSTR .asciz 30 31 .globl cerror 32