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