github.com/HACKERALERT/Picocrypt/src/external/sys@v0.0.0-20210609020157-e519952f829f/unix/asm_linux_mipsx.s (about)

     1  // Copyright 2016 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 && (mips || mipsle) && gc
     6  // +build linux
     7  // +build mips mipsle
     8  // +build gc
     9  
    10  #include "textflag.h"
    11  
    12  //
    13  // System calls for mips, Linux
    14  //
    15  
    16  // Just jump to package syscall's implementation for all these functions.
    17  // The runtime may know about them.
    18  
    19  TEXT ·Syscall(SB),NOSPLIT,$0-28
    20  	JMP syscall·Syscall(SB)
    21  
    22  TEXT ·Syscall6(SB),NOSPLIT,$0-40
    23  	JMP syscall·Syscall6(SB)
    24  
    25  TEXT ·Syscall9(SB),NOSPLIT,$0-52
    26  	JMP syscall·Syscall9(SB)
    27  
    28  TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
    29  	JAL	runtime·entersyscall(SB)
    30  	MOVW	a1+4(FP), R4
    31  	MOVW	a2+8(FP), R5
    32  	MOVW	a3+12(FP), R6
    33  	MOVW	R0, R7
    34  	MOVW	trap+0(FP), R2	// syscall entry
    35  	SYSCALL
    36  	MOVW	R2, r1+16(FP)	// r1
    37  	MOVW	R3, r2+20(FP)	// r2
    38  	JAL	runtime·exitsyscall(SB)
    39  	RET
    40  
    41  TEXT ·RawSyscall(SB),NOSPLIT,$0-28
    42  	JMP syscall·RawSyscall(SB)
    43  
    44  TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
    45  	JMP syscall·RawSyscall6(SB)
    46  
    47  TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
    48  	MOVW	a1+4(FP), R4
    49  	MOVW	a2+8(FP), R5
    50  	MOVW	a3+12(FP), R6
    51  	MOVW	trap+0(FP), R2	// syscall entry
    52  	SYSCALL
    53  	MOVW	R2, r1+16(FP)
    54  	MOVW	R3, r2+20(FP)
    55  	RET