Text file src/cmd/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s

     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  //go:build riscv64 && gc
     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	trap+0(FP), A7	// syscall entry
    27  	ECALL
    28  	MOV	A0, r1+32(FP)	// r1
    29  	MOV	A1, r2+40(FP)	// r2
    30  	CALL	runtime·exitsyscall(SB)
    31  	RET
    32  
    33  TEXT ·RawSyscall(SB),NOSPLIT,$0-56
    34  	JMP	syscall·RawSyscall(SB)
    35  
    36  TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
    37  	JMP	syscall·RawSyscall6(SB)
    38  
    39  TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
    40  	MOV	a1+8(FP), A0
    41  	MOV	a2+16(FP), A1
    42  	MOV	a3+24(FP), A2
    43  	MOV	trap+0(FP), A7	// syscall entry
    44  	ECALL
    45  	MOV	A0, r1+32(FP)
    46  	MOV	A1, r2+40(FP)
    47  	RET
    48  

View as plain text