Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~3~

This commit is contained in:
Roland McGrath 1993-06-08 01:08:51 +00:00
parent a5b9814652
commit bccfaf677d

View File

@ -34,31 +34,27 @@ Cambridge, MA 02139, USA. */
_/**/name/**/: _/**/name/**/:
#endif #endif
/* NewsOS 4 wants a stack frame around syscalls. */
#ifdef __STDC__
#define PSEUDO(name, syscall_name, args) \ #define PSEUDO(name, syscall_name, args) \
.even; \ .even; \
.globl syscall_error; \ .globl syscall_error; \
error: jmp syscall_error; \ error: jmp syscall_error; \
ENTRY (name) \ ENTRY (name) \
DO_CALL (syscall_name, args)
#ifdef __STDC__
#define DO_CALL(syscall_name, args) \
linkw fp, POUND(0); \ linkw fp, POUND(0); \
movel POUND(SYS_##syscall_name), d0; \ movel POUND(SYS_##syscall_name), d0; \
trap POUND(0); \ trap POUND(0); \
bcs error; \ unlk fp; \
unlk fp bcs error
#else #else
#define PSEUDO(name, syscall_name, args) \ #define DO_CALL(syscall_name, args) \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
linkw fp, POUND(0); \ linkw fp, POUND(0); \
movel POUND(SYS_/**/syscall_name), d0; \ movel POUND(SYS_/**/syscall_name), d0; \
trap POUND(0); \ trap POUND(0); \
bcs error; \ unlk fp; \
unlk fp bcs error
#endif #endif
#define ret rts #define ret rts