xref: /netbsd-src/lib/libc/arch/mips/sys/__syscall.S (revision 181254a7b1bdde6873432bffef2d2decc4b5c22f)
1/*	$NetBSD: __syscall.S,v 1.3 2020/04/18 23:55:51 thorpej Exp $	*/
2
3#include "SYS.h"
4
5#ifdef __mips_o32
6
7RSYSCALL(__syscall)
8
9#else /* ! __mips_o32 */
10
11LEAF(__syscall)
12        PIC_PROLOGUE(__syscall)
13	move	v0, a0
14	move	a0, a1
15	move	a1, a2
16	move	a2, a3
17	move	a3, a4
18	move	a4, a5
19	move	a5, a6
20	move	a6, a7
21	REG_L	a7, (sp)
22        SYSTRAP(__syscall)
23        bne a3,zero,1f
24        PIC_RETURN()
251:
26        PIC_TAILCALL(__cerror)
27END(__syscall)
28STRONG_ALIAS(_syscall,__syscall)
29WEAK_ALIAS(syscall,__syscall)
30
31#endif /* __mips_o32 */
32