blob: 19d4989344df7e2447524417b821f90b8793b0d4 [file] [log] [blame]
Ian Lance Taylor4cd067a2015-05-13 16:19:56 -07001// 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
Tobias Klauser09eb48e2021-04-23 12:12:02 +02005//go:build linux && (ppc64 || ppc64le) && gc
Ian Lance Taylor4cd067a2015-05-13 16:19:56 -07006// +build linux
7// +build ppc64 ppc64le
Tamir Duberstein0a15ea82020-11-12 17:30:29 -05008// +build gc
Ian Lance Taylor4cd067a2015-05-13 16:19:56 -07009
10#include "textflag.h"
11
12//
13// System calls for ppc64, Linux
14//
15
16// Just jump to package syscall's implementation for all these functions.
17// The runtime may know about them.
18
Tobias Klauser28a72762018-01-02 12:13:44 +010019TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
20 BL runtime·entersyscall(SB)
21 MOVD a1+8(FP), R3
22 MOVD a2+16(FP), R4
23 MOVD a3+24(FP), R5
24 MOVD R0, R6
25 MOVD R0, R7
26 MOVD R0, R8
27 MOVD trap+0(FP), R9 // syscall entry
28 SYSCALL R9
29 MOVD R3, r1+32(FP)
30 MOVD R4, r2+40(FP)
31 BL runtime·exitsyscall(SB)
32 RET
33
Tobias Klauser28a72762018-01-02 12:13:44 +010034TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
35 MOVD a1+8(FP), R3
36 MOVD a2+16(FP), R4
37 MOVD a3+24(FP), R5
38 MOVD R0, R6
39 MOVD R0, R7
40 MOVD R0, R8
41 MOVD trap+0(FP), R9 // syscall entry
42 SYSCALL R9
43 MOVD R3, r1+32(FP)
44 MOVD R4, r2+40(FP)
45 RET