github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/proto_vendor/golang.org/x/sys/unix/asm_linux_riscv64.s (about)

     1  // Copyright 2019 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  // +build riscv64,!gccgo
     6  
     7  #include "textflag.h"
     8  
     9  //
    10  // System calls for linux/riscv64.
    11  //
    12  // Where available, just jump to package syscall's implementation of
    13  // these functions.
    14  
    15  TEXT ·Syscall(SB),NOSPLIT,$0-56
    16  	JMP	syscall·Syscall(SB)
    17  
    18  TEXT ·Syscall6(SB),NOSPLIT,$0-80
    19  	JMP	syscall·Syscall6(SB)
    20  
    21  TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
    22  	CALL	runtime·entersyscall(SB)
    23  	MOV	a1+8(FP), A0
    24  	MOV	a2+16(FP), A1
    25  	MOV	a3+24(FP), A2
    26  	MOV	$0, A3
    27  	MOV	$0, A4
    28  	MOV	$0, A5
    29  	MOV	$0, A6
    30  	MOV	trap+0(FP), A7	// syscall entry
    31  	ECALL
    32  	MOV	A0, r1+32(FP)	// r1
    33  	MOV	A1, r2+40(FP)	// r2
    34  	CALL	runtime·exitsyscall(SB)
    35  	RET
    36  
    37  TEXT ·RawSyscall(SB),NOSPLIT,$0-56
    38  	JMP	syscall·RawSyscall(SB)
    39  
    40  TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
    41  	JMP	syscall·RawSyscall6(SB)
    42  
    43  TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
    44  	MOV	a1+8(FP), A0
    45  	MOV	a2+16(FP), A1
    46  	MOV	a3+24(FP), A2
    47  	MOV	ZERO, A3
    48  	MOV	ZERO, A4
    49  	MOV	ZERO, A5
    50  	MOV	trap+0(FP), A7	// syscall entry
    51  	ECALL
    52  	MOV	A0, r1+32(FP)
    53  	MOV	A1, r2+40(FP)
    54  	RET