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

View as plain text