1 // Copyright 2022 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 #include "textflag.h"
6
7 // func Syscall6(num, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, errno uintptr)
8 TEXT ·Syscall6(SB),NOSPLIT,$0-80
9 MOVD num+0(FP), R1 // syscall entry
10 MOVD a1+8(FP), R2
11 MOVD a2+16(FP), R3
12 MOVD a3+24(FP), R4
13 MOVD a4+32(FP), R5
14 MOVD a5+40(FP), R6
15 MOVD a6+48(FP), R7
16 SYSCALL
17 MOVD $0xfffffffffffff001, R8
18 CMPUBLT R2, R8, ok
19 MOVD $-1, r1+56(FP)
20 MOVD $0, r2+64(FP)
21 NEG R2, R2
22 MOVD R2, errno+72(FP)
23 RET
24 ok:
25 MOVD R2, r1+56(FP)
26 MOVD R3, r2+64(FP)
27 MOVD $0, errno+72(FP)
28 RET
29
View as plain text