1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
// Copyright 2024 The Libc Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux && (amd64 || arm64 || loong64)
package libc // import "modernc.org/libc"
import (
"runtime"
"syscall"
)
func ___syscall_cp(tls *TLS, n, a, b, c, d, e, f long) long {
r1, _, err := (syscall.Syscall6(uintptr(n), uintptr(a), uintptr(b), uintptr(c), uintptr(d), uintptr(e), uintptr(f)))
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall0(tls *TLS, n long) long {
switch n {
case __NR_sched_yield:
runtime.Gosched()
return 0
default:
r1, _, err := syscall.Syscall(uintptr(n), 0, 0, 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
}
func X__syscall1(tls *TLS, n, a1 long) long {
r1, _, err := syscall.Syscall(uintptr(n), uintptr(a1), 0, 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall2(tls *TLS, n, a1, a2 long) long {
r1, _, err := syscall.Syscall(uintptr(n), uintptr(a1), uintptr(a2), 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall3(tls *TLS, n, a1, a2, a3 long) long {
r1, _, err := syscall.Syscall(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3))
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall4(tls *TLS, n, a1, a2, a3, a4 long) long {
r1, _, err := syscall.Syscall6(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), 0, 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall5(tls *TLS, n, a1, a2, a3, a4, a5 long) long {
r1, _, err := syscall.Syscall6(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), uintptr(a5), 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall6(tls *TLS, n, a1, a2, a3, a4, a5, a6 long) long {
r1, _, err := syscall.Syscall6(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), uintptr(a5), uintptr(a6))
if err != 0 {
return long(-err)
}
return long(r1)
}
|