diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-05-14 23:06:57 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-05-14 23:06:57 +0000 |
commit | ae35469520b054e17cc94d43b9e77be5d6795c3c (patch) | |
tree | fd77fad71939e4c3f5bb6fbf9db827c318edc7c0 /lib/libc/arch/vax/SYS.h | |
parent | cdb7ab9a34663e6cf75d4a6100a7a3af84e9b750 (diff) |
NetBSD merge
Diffstat (limited to 'lib/libc/arch/vax/SYS.h')
-rw-r--r-- | lib/libc/arch/vax/SYS.h | 58 |
1 files changed, 35 insertions, 23 deletions
diff --git a/lib/libc/arch/vax/SYS.h b/lib/libc/arch/vax/SYS.h index 12b5b8e5833..00e49b584b9 100644 --- a/lib/libc/arch/vax/SYS.h +++ b/lib/libc/arch/vax/SYS.h @@ -1,4 +1,6 @@ -/* $OpenBSD: SYS.h,v 1.3 1996/08/19 08:18:18 tholo Exp $ */ +/* $OpenBSD: SYS.h,v 1.4 1998/05/14 23:06:56 niklas Exp $ */ +/* $NetBSD: SYS.h,v 1.4 1997/05/02 18:15:32 kleink Exp $ */ + /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -32,33 +34,43 @@ * SUCH DAMAGE. */ +#include <machine/asm.h> #include <sys/syscall.h> -#ifndef __STDC__ -#ifdef PROF -#define ENTRY(x) .globl _/**/x; .align 2; _/**/x/**/: .word 0; \ - .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount +#ifdef __STDC__ +#define SYSTRAP(x) chmk $ SYS_ ## x #else -#define ENTRY(x) .globl _/**/x; .align 2; _/**/x/**/: .word 0 -#endif PROF -#define SYSCALL(x) err: jmp cerror; ENTRY(x); chmk $ SYS_/**/x; jcs err -#define RSYSCALL(x) SYSCALL(x); ret -#define PSEUDO(x,y) ENTRY(x); chmk $ SYS_/**/y; ret -#define CALL(x,y) calls $/**/x, _/**/y +#define SYSTRAP(x) chmk $ SYS_/**/x +#endif -#else +#define _SYSCALL_NOERROR(x,y) \ + ENTRY(x,0); \ + SYSTRAP(y) -#ifdef PROF -#define ENTRY(x) .globl _ ## x; .align 2; _ ## x ## : .word 0; \ - .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount -#else -#define ENTRY(x) .globl _ ## x; .align 2; _ ## x ## : .word 0 -#endif PROF -#define SYSCALL(x) err: jmp cerror; ENTRY(x); chmk $ SYS_ ## x; jcs err -#define RSYSCALL(x) SYSCALL(x); ret -#define PSEUDO(x,y) ENTRY(x); chmk $ SYS_ ## y; ret -#define CALL(x,y) calls $ ## x, _ ## y -#endif +#define _SYSCALL(x,y) \ + err: jmp cerror; \ + _SYSCALL_NOERROR(x,y); \ + jcs err + +#define SYSCALL_NOERROR(x) \ + _SYSCALL_NOERROR(x,x) + +#define SYSCALL(x) \ + _SYSCALL(x,x) + +#define PSEUDO_NOERROR(x,y) \ + _SYSCALL_NOERROR(x,y); \ + ret + +#define PSEUDO(x,y) \ + _SYSCALL(x,y); \ + ret + +#define RSYSCALL_NOERROR(x) \ + PSEUDO_NOERROR(x,x) + +#define RSYSCALL(x) \ + PSEUDO(x,x) #define ASMSTR .asciz |