Commit | Line | Data |
---|---|---|
b7468159 WN |
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 | * | |
8d39917d | 10 | * @(#)SYS.h 5.2 (Berkeley) %G% |
b7468159 WN |
11 | */ |
12 | ||
13 | #include <syscall.h> | |
14 | ||
15 | #ifdef PROF | |
16 | #define ENTRY(x) .globl _/**/x; \ | |
17 | .data; 1:; .long 0; .text; _/**/x: .align 4; \ | |
18 | movl $1b,%eax; call mcount | |
19 | #else | |
20 | #define ENTRY(x) .globl _/**/x; .text; .align 4; _/**/x: | |
21 | #endif PROF | |
22 | #define SYSCALL(x) 2: jmp cerror; ENTRY(x); lea SYS_/**/x,%eax; LCALL(7,0); jb 2b | |
23 | #define PSEUDO(x,y) ENTRY(x); lea SYS_/**/y, %eax; ; LCALL(7,0) | |
24 | #define CALL(x,y) call _/**/y; addl $4*x,%esp | |
25 | /* gas fucks up offset -- although we don't currently need it, do for BCS */ | |
26 | #define LCALL(x,y) .byte 0x9a ; .long y; .word x | |
27 | ||
8d39917d KB |
28 | #define ASMSTR .asciz |
29 | ||
b7468159 | 30 | .globl cerror |