summaryrefslogtreecommitdiff
path: root/klibc/klibc/arch/alpha/syscall.S
blob: 0c87414b1ad1c0c58a52b67776b44867f0b6cc34 (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
	lda	v0, -1(zero)
	stl	a3, 0(a1)
1:
	ret	zero,(ra),1

	.size	__syscall_common,.-__syscall_common
	.end	__syscall_common