summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/sys32.S
blob: 44f17ca01d273c9ae253a481f393dc568e516f72 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* $Id: sys32.S,v 1.5 1998/03/24 05:57:56 ecd Exp $
 * sys32.S: I-cache tricks for 32-bit compatability layer simple
 *          conversions.
 *
 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
 */

	.text

	.align		32
	.globl		sys32_mmap
sys32_mmap:
	srl		%o0, 0, %o0			! IEU0	Group
	sethi		%hi(0xffffffff), %g2		! IEU1
	srl		%o1, 0, %o1			! IEU0	Group
	or		%g2, %lo(0xffffffff), %g2	! IEU1
	srl		%o2, 0, %o2			! IEU0	Group
	mov		%o7, %g1			! IEU1
	and		%o3, %g2, %o3			! IEU0	Group
	and		%o4, %g2, %o4			! IEU1
	and		%o5, %g2, %o5			! IEU0	Group
	call		sys_mmap			! CTI	Group brk forced
	 mov		%g1, %o7			! IEU0	Group (regdep)

	.align		32
	.globl		sys32_lseek
	.globl		sys32_chmod, sys32_chown, sys32_lchown, sys32_mknod
sys32_lseek:
	sra		%o1, 0, %o1
	mov		%o7, %g1
	call		sys_lseek
	 mov		%g1, %o7
sys32_chmod:
	sll		%o1, 16, %o1
	mov		%o7, %g1
	srl		%o0, 0, %o0
	srl		%o1, 16, %o1
	call		sys_chmod
	 mov		%g1, %o7
sys32_chown:
	sll		%o1, 16, %o1
	mov		%o7, %g1
	sll		%o2, 16, %o2
	srl		%o0, 0, %o0
	srl		%o1, 16, %o1
	srl		%o2, 16, %o2
	call		sys_chown
	 mov		%g1, %o7
sys32_lchown:
	sll		%o1, 16, %o1
	mov		%o7, %g1
	sll		%o2, 16, %o2
	srl		%o0, 0, %o0
	srl		%o1, 16, %o1
	srl		%o2, 16, %o2
	call		sys_lchown
	 mov		%g1, %o7
sys32_mknod:
	sll		%o2, 16, %o2
	mov		%o7, %g1
	srl		%o0, 0, %o0
	srl		%o2, 16, %o2
	call		sys_mknod
	 mov		%g1, %o7

	.align		32
	.globl		sys32_sendto, sys32_recvfrom, sys32_getsockopt
sys32_sendto:
	srl		%o1, 0, %o1
	mov		%o7, %g1
	srl		%o2, 0, %o2
	srl		%o4, 0, %o4
	call		sys_sendto
	 mov		%g1, %o7
sys32_recvfrom:
	srl		%o1, 0, %o1
	mov		%o7, %g1
	srl		%o2, 0, %o2
	srl		%o4, 0, %o4
	srl		%o5, 0, %o5
	call		sys_recvfrom
	 mov		%g1, %o7
sys32_getsockopt:
	srl		%o3, 0, %o3
	mov		%o7, %g1
	srl		%o4, 0, %o4
	call		sys_setsockopt
	 mov		%g1, %o7

	.globl		sys32_bdflush
sys32_bdflush:
	sra		%o1, 0, %o1
	mov		%o7, %g1
	call		sys_bdflush
	 mov		%g1, %o7