summaryrefslogtreecommitdiffstats
path: root/usr/klibc/arch/alpha/syscall.S
blob: ae69ef2f2cf17aa011b929503581787c9b90876d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
# arch/alpha/syscall.S
#

#include <machine/asm.h>

	.text
	.align	3
	.type	__syscall_common,@function
	.ent	__syscall_common, 0
	.globl	__syscall_common
__syscall_common:
	.frame	sp,0,ra,0
	callsys
	beq	a3, 1f
	br	pv, 2f			# pv <- pc
2:
	ldgp	gp, 0(pv)
	lda	a1, errno
	stl	v0, 0(a1)
	lda	v0, -1(zero)
1:
	ret	zero,(ra),1

	.size	__syscall_common,.-__syscall_common
	.end	__syscall_common