blob: c46aab33959403e570d12f96be0d8a716c22da1d [file] [log] [blame]
William Kurkianea869482019-04-09 15:16:11 -04001// Copyright 2016 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
khenaidoo106c61a2021-08-11 18:05:46 -04005//go:build linux && s390x && gc
William Kurkianea869482019-04-09 15:16:11 -04006// +build linux
khenaidoo106c61a2021-08-11 18:05:46 -04007// +build s390x
8// +build gc
William Kurkianea869482019-04-09 15:16:11 -04009
10#include "textflag.h"
11
12//
13// System calls for s390x, Linux
14//
15
16// Just jump to package syscall's implementation for all these functions.
17// The runtime may know about them.
18
19TEXT ·Syscall(SB),NOSPLIT,$0-56
20 BR syscall·Syscall(SB)
21
22TEXT ·Syscall6(SB),NOSPLIT,$0-80
23 BR syscall·Syscall6(SB)
24
25TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
26 BL runtime·entersyscall(SB)
27 MOVD a1+8(FP), R2
28 MOVD a2+16(FP), R3
29 MOVD a3+24(FP), R4
30 MOVD $0, R5
31 MOVD $0, R6
32 MOVD $0, R7
33 MOVD trap+0(FP), R1 // syscall entry
34 SYSCALL
35 MOVD R2, r1+32(FP)
36 MOVD R3, r2+40(FP)
37 BL runtime·exitsyscall(SB)
38 RET
39
40TEXT ·RawSyscall(SB),NOSPLIT,$0-56
41 BR syscall·RawSyscall(SB)
42
43TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
44 BR syscall·RawSyscall6(SB)
45
46TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
47 MOVD a1+8(FP), R2
48 MOVD a2+16(FP), R3
49 MOVD a3+24(FP), R4
50 MOVD $0, R5
51 MOVD $0, R6
52 MOVD $0, R7
53 MOVD trap+0(FP), R1 // syscall entry
54 SYSCALL
55 MOVD R2, r1+32(FP)
56 MOVD R3, r2+40(FP)
57 RET