1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 //go:build linux && (mips || mipsle)
11 // System calls for mips, Linux
14 // func Syscall9(trap trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2, err uintptr);
15 // Actually Syscall8 but the rest of the code expects it to be named Syscall9.
16 TEXT ·Syscall9(SB),NOSPLIT,$28-52
18 JAL runtime·entersyscall(SB)
31 MOVW trap+0(FP), R2 // syscall entry
32 MOVW R0, R3 // reset R3 to zero as 1-ret SYSCALL keeps it
36 MOVW R1, r1+40(FP) // r1
37 MOVW R0, r2+44(FP) // r2
38 MOVW R2, err+48(FP) // errno
39 JAL runtime·exitsyscall(SB)
42 MOVW R2, r1+40(FP) // r1
43 MOVW R3, r2+44(FP) // r2
44 MOVW R0, err+48(FP) // errno
45 JAL runtime·exitsyscall(SB)
48 // func rawVforkSyscall(trap, a1, a2 uintptr) (r1, err uintptr)
49 TEXT ·rawVforkSyscall(SB),NOSPLIT|NOFRAME,$0-20
53 MOVW trap+0(FP), R2 // syscall entry
57 MOVW R1, r1+12(FP) // r1
58 MOVW R2, err+16(FP) // errno
61 MOVW R2, r1+12(FP) // r1
62 MOVW R0, err+16(FP) // errno
65 TEXT ·rawSyscallNoError(SB),NOSPLIT,$20-24
69 MOVW trap+0(FP), R2 // syscall entry
70 MOVW R0, R3 // reset R3 to zero as 1-ret SYSCALL keeps it
72 MOVW R2, r1+16(FP) // r1
73 MOVW R3, r2+20(FP) // r2