diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-20 20:52:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-20 20:52:11 +0000 |
commit | 4e9408f19825cf62714518d8932f18563b44cd7b (patch) | |
tree | a6b52feaebb23e89ad560dfbf6a01b67e80c9b11 /lib/libc/arch/mvme88k/SYS.h | |
parent | bca0bac323557ad790813fb7c2d4e2539df9193d (diff) |
Add PSEUDO_NOERROR similar to that used by NetBSD.
Some ports were setting errno in PSEUDO and some were not. Now errno
is set for all in PSEUDO and PSEUDO_NOERROR is provided for the
non-errno case (only used by _exit).
Needs testing on vax and m88k.
XXX - hppa and powerpc still lack a real PSEUDO_NOERROR implementation.
Currently PSEUDO_NOERROR and PSEUDO are the same (so builds don't
break on those platforms).
Diffstat (limited to 'lib/libc/arch/mvme88k/SYS.h')
-rw-r--r-- | lib/libc/arch/mvme88k/SYS.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/libc/arch/mvme88k/SYS.h b/lib/libc/arch/mvme88k/SYS.h index 6c69a17d911..29f81db8f31 100644 --- a/lib/libc/arch/mvme88k/SYS.h +++ b/lib/libc/arch/mvme88k/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.2 2000/03/01 17:31:22 todd Exp $ */ +/* $OpenBSD: SYS.h,v 1.3 2001/09/20 20:52:10 millert Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -43,33 +43,39 @@ #ifdef __STDC__ -#define SYSCALL(x) align 8; \ +#define _SYSCALL(x,y) align 8; \ ENTRY(x); \ ld r10,r31,32; \ ld r11,r31,36; \ ld r12,r31,40; \ - or r13,r0, SYS_ ## x; \ + or r13,r0, SYS_ ## y; \ tb0 0, r0, 128; \ br cerror +#define SYSCALL(x) _SYSCALL(x,x) #define RSYSCALL(x) SYSCALL(x) ;\ jmp r1 -#define PSEUDO(x,y) ENTRY(x); ;\ +#define PSEUDO(x,y) _SYSCALL(x,y); \ + jmp r1 +#define PSEUDO_NOERROR(x,y) ENTRY(x); ;\ or r13,r0, SYS_ ## y; \ tb0 0,r0,128; or r0,r0,r0;jmp r1 #else /* !__STDC__ */ -#define SYSCALL(x) align 8; \ +#define _SYSCALL(x,y) align 8; \ ENTRY(x); \ ld r10,r31,32; \ ld r11,r31,36; \ ld r12,r31,40; \ - or r13,r0, SYS_/**/x; \ + or r13,r0, SYS_/**/y; \ tb0 0, r0, 128; \ br cerror +#define SYSCALL(x) _SYSCALL(x,x) #define RSYSCALL(x) SYSCALL(x); \ jmp r1 -#define PSEUDO(x,y) ENTRY(x); \ +#define PSEUDO(x,y) _SYSCALL(x,y); \ + jmp r1 +#define PSEUDO_NOERROR(x,y) ENTRY(x); \ or r13,r0, SYS_/**/y; \ tb0 0,r0,128; or r0,r0,r0; jmp r1 #endif /* !__STDC__ */ |