Text file
src/syscall/asm_linux_mips64x.s
1 // Copyright 2014 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.
4
5 //go:build linux && (mips64 || mips64le)
6
7 #include "textflag.h"
8
9 //
10 // System calls for mips64, Linux
11 //
12
13 // func rawVforkSyscall(trap, a1, a2, a3 uintptr) (r1, err uintptr)
14 TEXT ·rawVforkSyscall(SB),NOSPLIT|NOFRAME,$0-48
15 MOVV a1+8(FP), R4
16 MOVV a2+16(FP), R5
17 MOVV a3+24(FP), R6
18 MOVV R0, R7
19 MOVV R0, R8
20 MOVV R0, R9
21 MOVV trap+0(FP), R2 // syscall entry
22 SYSCALL
23 BEQ R7, ok
24 MOVV $-1, R1
25 MOVV R1, r1+32(FP) // r1
26 MOVV R2, err+40(FP) // errno
27 RET
28 ok:
29 MOVV R2, r1+32(FP) // r1
30 MOVV R0, err+40(FP) // errno
31 RET
32
33 TEXT ·rawSyscallNoError(SB),NOSPLIT,$0-48
34 MOVV a1+8(FP), R4
35 MOVV a2+16(FP), R5
36 MOVV a3+24(FP), R6
37 MOVV R0, R7
38 MOVV R0, R8
39 MOVV R0, R9
40 MOVV trap+0(FP), R2 // syscall entry
41 MOVV R0, R3 // reset R3 to zero as 1-ret SYSCALL keeps it
42 SYSCALL
43 MOVV R2, r1+32(FP) // r1
44 MOVV R3, r2+40(FP) // r2
45 RET
46
View as plain text