...
Run Format

Text file src/syscall/asm_linux_mips64x.s

Documentation: syscall

     1// Copyright 2014 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 linux
     6// +build mips64 mips64le
     7
     8#include "textflag.h"
     9
    10//
    11// System calls for mips64, Linux
    12//
    13
    14// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
    15TEXT ·Syscall(SB),NOSPLIT,$0-56
    16	JAL	runtime·entersyscall(SB)
    17	MOVV	a1+8(FP), R4
    18	MOVV	a2+16(FP), R5
    19	MOVV	a3+24(FP), R6
    20	MOVV	R0, R7
    21	MOVV	R0, R8
    22	MOVV	R0, R9
    23	MOVV	trap+0(FP), R2	// syscall entry
    24	SYSCALL
    25	BEQ	R7, ok
    26	MOVV	$-1, R1
    27	MOVV	R1, r1+32(FP)	// r1
    28	MOVV	R0, r2+40(FP)	// r2
    29	MOVV	R2, err+48(FP)	// errno
    30	JAL	runtime·exitsyscall(SB)
    31	RET
    32ok:
    33	MOVV	R2, r1+32(FP)	// r1
    34	MOVV	R3, r2+40(FP)	// r2
    35	MOVV	R0, err+48(FP)	// errno
    36	JAL	runtime·exitsyscall(SB)
    37	RET
    38
    39TEXT ·Syscall6(SB),NOSPLIT,$0-80
    40	JAL	runtime·entersyscall(SB)
    41	MOVV	a1+8(FP), R4
    42	MOVV	a2+16(FP), R5
    43	MOVV	a3+24(FP), R6
    44	MOVV	a4+32(FP), R7
    45	MOVV	a5+40(FP), R8
    46	MOVV	a6+48(FP), R9
    47	MOVV	trap+0(FP), R2	// syscall entry
    48	SYSCALL
    49	BEQ	R7, ok6
    50	MOVV	$-1, R1
    51	MOVV	R1, r1+56(FP)	// r1
    52	MOVV	R0, r2+64(FP)	// r2
    53	MOVV	R2, err+72(FP)	// errno
    54	JAL	runtime·exitsyscall(SB)
    55	RET
    56ok6:
    57	MOVV	R2, r1+56(FP)	// r1
    58	MOVV	R3, r2+64(FP)	// r2
    59	MOVV	R0, err+72(FP)	// errno
    60	JAL	runtime·exitsyscall(SB)
    61	RET
    62
    63TEXT ·RawSyscall(SB),NOSPLIT,$0-56
    64	MOVV	a1+8(FP), R4
    65	MOVV	a2+16(FP), R5
    66	MOVV	a3+24(FP), R6
    67	MOVV	R0, R7
    68	MOVV	R0, R8
    69	MOVV	R0, R9
    70	MOVV	trap+0(FP), R2	// syscall entry
    71	SYSCALL
    72	BEQ	R7, ok1
    73	MOVV	$-1, R1
    74	MOVV	R1, r1+32(FP)	// r1
    75	MOVV	R0, r2+40(FP)	// r2
    76	MOVV	R2, err+48(FP)	// errno
    77	RET
    78ok1:
    79	MOVV	R2, r1+32(FP)	// r1
    80	MOVV	R3, r2+40(FP)	// r2
    81	MOVV	R0, err+48(FP)	// errno
    82	RET
    83
    84TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
    85	MOVV	a1+8(FP), R4
    86	MOVV	a2+16(FP), R5
    87	MOVV	a3+24(FP), R6
    88	MOVV	a4+32(FP), R7
    89	MOVV	a5+40(FP), R8
    90	MOVV	a6+48(FP), R9
    91	MOVV	trap+0(FP), R2	// syscall entry
    92	SYSCALL
    93	BEQ	R7, ok2
    94	MOVV	$-1, R1
    95	MOVV	R1, r1+56(FP)	// r1
    96	MOVV	R0, r2+64(FP)	// r2
    97	MOVV	R2, err+72(FP)	// errno
    98	RET
    99ok2:
   100	MOVV	R2, r1+56(FP)	// r1
   101	MOVV	R3, r2+64(FP)	// r2
   102	MOVV	R0, err+72(FP)	// errno
   103	RET
   104
   105TEXT ·rawSyscallNoError(SB),NOSPLIT,$0-48
   106	MOVV	a1+8(FP), R4
   107	MOVV	a2+16(FP), R5
   108	MOVV	a3+24(FP), R6
   109	MOVV	R0, R7
   110	MOVV	R0, R8
   111	MOVV	R0, R9
   112	MOVV	trap+0(FP), R2	// syscall entry
   113	SYSCALL
   114	MOVV	R2, r1+32(FP)
   115	MOVV	R3, r2+40(FP)
   116	RET

View as plain text