1/* 2** Copyright 2001-2007, Travis Geiselbrecht. All rights reserved. 3** Distributed under the terms of the MIT License. 4*/ 5 6#define _SYSCALL(name, n) \ 7.globl name; \ 8.type name,%function; \ 9.align 4; \ 10name: \ 11 li t0, n; \ 12 ecall; \ 13 ret; \ 14.size name, .-name 15 16#define SYSCALL0(name, n) _SYSCALL(name, n) 17#define SYSCALL1(name, n) _SYSCALL(name, n) 18#define SYSCALL2(name, n) _SYSCALL(name, n) 19#define SYSCALL3(name, n) _SYSCALL(name, n) 20#define SYSCALL4(name, n) _SYSCALL(name, n) 21#define SYSCALL5(name, n) _SYSCALL(name, n) 22#define SYSCALL6(name, n) _SYSCALL(name, n) 23#define SYSCALL7(name, n) _SYSCALL(name, n) 24#define SYSCALL8(name, n) _SYSCALL(name, n) 25#define SYSCALL9(name, n) _SYSCALL(name, n) 26#define SYSCALL10(name, n) _SYSCALL(name, n) 27#define SYSCALL11(name, n) _SYSCALL(name, n) 28#define SYSCALL12(name, n) _SYSCALL(name, n) 29#define SYSCALL13(name, n) _SYSCALL(name, n) 30#define SYSCALL14(name, n) _SYSCALL(name, n) 31#define SYSCALL15(name, n) _SYSCALL(name, n) 32#define SYSCALL16(name, n) _SYSCALL(name, n) 33#define SYSCALL17(name, n) _SYSCALL(name, n) 34#define SYSCALL18(name, n) _SYSCALL(name, n) 35#define SYSCALL19(name, n) _SYSCALL(name, n) 36#define SYSCALL20(name, n) _SYSCALL(name, n) 37