141012Swilliam /*- 241012Swilliam * Copyright (c) 1990 The Regents of the University of California. 341012Swilliam * All rights reserved. 441012Swilliam * 541012Swilliam * This code is derived from software contributed to Berkeley by 641012Swilliam * William Jolitz. 741012Swilliam * 841012Swilliam * %sccs.include.redist.c% 941012Swilliam * 10*49357Sbostic * @(#)SYS.h 5.5 (Berkeley) 05/07/91 1141012Swilliam */ 1241012Swilliam 1341012Swilliam #include <syscall.h> 1441012Swilliam 1541012Swilliam #ifdef PROF 1641012Swilliam #define ENTRY(x) .globl _/**/x; \ 1745819Swilliam .data; 1:; .long 0; .text; .align 2; _/**/x: \ 1841012Swilliam movl $1b,%eax; call mcount 1941012Swilliam #else 2045819Swilliam #define ENTRY(x) .globl _/**/x; .text; .align 2; _/**/x: 2141012Swilliam #endif PROF 22*49357Sbostic #define SYSCALL(x) 2: jmp cerror; ENTRY(x); lea SYS_/**/x,%eax; LCALL(7,0); jb 2b 23*49357Sbostic #define RSYSCALL(x) SYSCALL(x); ret 2448806Storek #define PSEUDO(x,y) ENTRY(x); lea SYS_/**/y, %eax; ; LCALL(7,0); ret 2541012Swilliam #define CALL(x,y) call _/**/y; addl $4*x,%esp 2641012Swilliam /* gas fucks up offset -- although we don't currently need it, do for BCS */ 2741012Swilliam #define LCALL(x,y) .byte 0x9a ; .long y; .word x 2841012Swilliam 2942470Sbostic #define ASMSTR .asciz 3042470Sbostic 3141012Swilliam .globl cerror 32