src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

asm_linux_loong64.s (1183B)


      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 
     13 TEXT ·Syscall(SB),NOSPLIT,$0-56
     14 	JMP	syscall·Syscall(SB)
     15 
     16 TEXT ·Syscall6(SB),NOSPLIT,$0-80
     17 	JMP	syscall·Syscall6(SB)
     18 
     19 TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
     20 	JAL	runtime·entersyscall(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	runtime·exitsyscall(SB)
     32 	RET
     33 
     34 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
     35 	JMP	syscall·RawSyscall(SB)
     36 
     37 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
     38 	JMP	syscall·RawSyscall6(SB)
     39 
     40 TEXT ·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