...
Run Format

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

View as plain text