1: /* 2: * Copyright (c) 1983 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)SYS.h 1.5 (2.11BSD GTE) 1995/05/08 7: */ 8: 9: #include <syscall.h> 10: 11: .comm _errno,2 12: 13: #define ENTRY(x) .globl _/**/x; \ 14: _/**/x: \ 15: PROFCODE(_/**/x); 16: 17: #define ASENTRY(x) .globl x; \ 18: x: \ 19: PROFCODE(x); 20: 21: #ifdef PROF 22: #define PROFCODE(x) .data; \ 23: 1: x+1; \ 24: .text; \ 25: .globl mcount; \ 26: mov $1b, r0; \ 27: jsr pc,mcount; 28: #else !PROF 29: #define PROFCODE(x) ; 30: #endif PROF 31: 32: #define SYS(s) sys SYS_/**/s. 33: 34: #define SYSCALL(s, r) ENTRY(s); \ 35: SYS(s); \ 36: EXIT_/**/r 37: 38: .globl x_norm, x_error 39: 40: #define EXIT_norm jmp x_norm 41: 42: #define EXIT_long bcc 1f; \ 43: mov r0,_errno; \ 44: mov $-1,r1; \ 45: sxt r0; \ 46: 1: rts pc; 47: 48: #define EXIT_error jmp x_error 49: 50: #define EXIT_noerror rts pc;