summaryrefslogtreecommitdiff
path: root/klibc/klibc/arch/mips/syscall.S
blob: d5c1fe1c7d5d807207834f655a6a94e0e20f51ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <asm/asm.h>
#include <asm/regdef.h>
#include <asm/unistd.h>

	.set noreorder
	
LEAF(__syscall_common)
	syscall
        beqz    a3, 1f
	# sw is actually two instructions; the first one goes
	# in the branch delay slot
        sw      v0, errno
        li      v0, -1
1:      jr      ra
	END(__syscall_common)