asm_linux_loong64.s

 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//go:build linux && loong64 && gc
 6
 7#include "textflag.h"
 8
 9
10// Just jump to package syscall's implementation for all these functions.
11// The runtime may know about them.
12
13TEXT Syscall(SB),NOSPLIT,$0-56
14	JMP	syscallSyscall(SB)
15
16TEXT Syscall6(SB),NOSPLIT,$0-80
17	JMP	syscallSyscall6(SB)
18
19TEXT SyscallNoError(SB),NOSPLIT,$0-48
20	JAL	runtimeentersyscall(SB)
21	MOVV	a1+8(FP), R4
22	MOVV	a2+16(FP), R5
23	MOVV	a3+24(FP), R6
24	MOVV	R0, R7
25	MOVV	R0, R8
26	MOVV	R0, R9
27	MOVV	trap+0(FP), R11	// syscall entry
28	SYSCALL
29	MOVV	R4, r1+32(FP)
30	MOVV	R0, r2+40(FP)	// r2 is not used. Always set to 0
31	JAL	runtimeexitsyscall(SB)
32	RET
33
34TEXT RawSyscall(SB),NOSPLIT,$0-56
35	JMP	syscallRawSyscall(SB)
36
37TEXT RawSyscall6(SB),NOSPLIT,$0-80
38	JMP	syscallRawSyscall6(SB)
39
40TEXT RawSyscallNoError(SB),NOSPLIT,$0-48
41	MOVV	a1+8(FP), R4
42	MOVV	a2+16(FP), R5
43	MOVV	a3+24(FP), R6
44	MOVV	R0, R7
45	MOVV	R0, R8
46	MOVV	R0, R9
47	MOVV	trap+0(FP), R11	// syscall entry
48	SYSCALL
49	MOVV	R4, r1+32(FP)
50	MOVV	R0, r2+40(FP)	// r2 is not used. Always set to 0
51	RET