]> Cypherpunks.ru repositories - gostls13.git/blob - src/syscall/asm_linux_ppc64x.s
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / src / syscall / asm_linux_ppc64x.s
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 //go:build linux && (ppc64 || ppc64le)
6
7 #include "textflag.h"
8
9 //
10 // System calls for ppc64, Linux
11 //
12
13 // func rawVforkSyscall(trap, a1, a2, a3 uintptr) (r1, err uintptr)
14 TEXT ·rawVforkSyscall(SB),NOSPLIT|NOFRAME,$0-48
15         MOVD    a1+8(FP), R3
16         MOVD    a2+16(FP), R4
17         MOVD    a3+24(FP), R5
18         MOVD    R0, R6
19         MOVD    R0, R7
20         MOVD    R0, R8
21         MOVD    trap+0(FP), R9  // syscall entry
22         SYSCALL R9
23         BVC     ok
24         MOVD    $-1, R4
25         MOVD    R4, r1+32(FP)   // r1
26         MOVD    R3, err+40(FP)  // errno
27         RET
28 ok:
29         MOVD    R3, r1+32(FP)   // r1
30         MOVD    R0, err+40(FP)  // errno
31         RET
32
33 TEXT ·rawSyscallNoError(SB),NOSPLIT,$0-48
34         MOVD    a1+8(FP), R3
35         MOVD    a2+16(FP), R4
36         MOVD    a3+24(FP), R5
37         MOVD    R0, R6
38         MOVD    R0, R7
39         MOVD    R0, R8
40         MOVD    trap+0(FP), R9  // syscall entry
41         SYSCALL R9
42         MOVD    R3, r1+32(FP)
43         MOVD    R0, r2+40(FP)
44         RET