asm_linux_mips64x.s 1.15 KB
Newer Older
1
// Copyright 2015 The Go Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

5 6
// +build linux
// +build mips64 mips64le
7 8 9 10 11
// +build !gccgo

#include "textflag.h"

//
12
// System calls for mips64, Linux
13 14 15 16 17
//

// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.

18
TEXT ·Syscall(SB),NOSPLIT,$0-56
19 20
	JMP	syscall·Syscall(SB)

21
TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 23
	JMP	syscall·Syscall6(SB)

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
	JAL	runtime·entersyscall(SB)
	MOVV	a1+8(FP), R4
	MOVV	a2+16(FP), R5
	MOVV	a3+24(FP), R6
	MOVV	R0, R7
	MOVV	R0, R8
	MOVV	R0, R9
	MOVV	trap+0(FP), R2	// syscall entry
	SYSCALL
	MOVV	R2, r1+32(FP)
	MOVV	R3, r2+40(FP)
	JAL	runtime·exitsyscall(SB)
	RET

TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 41
	JMP	syscall·RawSyscall(SB)

42
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43
	JMP	syscall·RawSyscall6(SB)
44 45 46 47 48 49 50 51 52 53 54 55 56

TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
	MOVV	a1+8(FP), R4
	MOVV	a2+16(FP), R5
	MOVV	a3+24(FP), R6
	MOVV	R0, R7
	MOVV	R0, R8
	MOVV	R0, R9
	MOVV	trap+0(FP), R2	// syscall entry
	SYSCALL
	MOVV	R2, r1+32(FP)
	MOVV	R3, r2+40(FP)
	RET