8
/* Kernel syscall interface:
10
v0 - system call number
11
a* - arguments, as in C
13
a3 - zero iff successful
14
v0 - errno value on failure, else result
16
This macro is similar to SYSCALL in asm.h, but not completely.
17
There's room for optimization, if we assume this will continue to
18
be assembled as one file.
20
This macro expansions does not include the return instruction.
21
If there's no other work to be done, use something like:
23
If there is other work to do (in fork, maybe?), do it after the
24
SYSCALL invocation. */
28
.globl machdep_sys_##x ;\
29
.ent machdep_sys_##x, 0 ;\
37
/* Load gp so we can find cerror to jump to. */;\
39
jmp zero, machdep_cerror ;\
42
#define SIMPLE_SYSCALL(x) SYSCALL(x) ; ret ; .end machdep_sys_##x
44
#define XSYSCALL(x) SIMPLE_SYSCALL(x)
46
XSYSCALL(SYSCALL_NAME)