1570af302Sopenharmony_ci#define __SYSCALL_LL_E(x) (x)
2570af302Sopenharmony_ci#define __SYSCALL_LL_O(x) (x)
3570af302Sopenharmony_ci
4570af302Sopenharmony_ci#define SYSCALL_CLOBBERLIST \
5570af302Sopenharmony_ci	"$t0", "$t1", "$t2", "$t3", \
6570af302Sopenharmony_ci	"$t4", "$t5", "$t6", "$t7", "$t8", "memory"
7570af302Sopenharmony_ci
8570af302Sopenharmony_cistatic inline long __syscall0(long n)
9570af302Sopenharmony_ci{
10570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
11570af302Sopenharmony_ci	register long a0 __asm__("$a0");
12570af302Sopenharmony_ci
13570af302Sopenharmony_ci	__asm__ __volatile__ (
14570af302Sopenharmony_ci		"syscall 0"
15570af302Sopenharmony_ci		: "=r"(a0)
16570af302Sopenharmony_ci		: "r"(a7)
17570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
18570af302Sopenharmony_ci	return a0;
19570af302Sopenharmony_ci}
20570af302Sopenharmony_ci
21570af302Sopenharmony_cistatic inline long __syscall1(long n, long a)
22570af302Sopenharmony_ci{
23570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
24570af302Sopenharmony_ci	register long a0 __asm__("$a0") = a;
25570af302Sopenharmony_ci
26570af302Sopenharmony_ci	__asm__ __volatile__ (
27570af302Sopenharmony_ci		"syscall 0"
28570af302Sopenharmony_ci		: "+r"(a0)
29570af302Sopenharmony_ci		: "r"(a7)
30570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
31570af302Sopenharmony_ci	return a0;
32570af302Sopenharmony_ci}
33570af302Sopenharmony_ci
34570af302Sopenharmony_cistatic inline long __syscall2(long n, long a, long b)
35570af302Sopenharmony_ci{
36570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
37570af302Sopenharmony_ci	register long a0 __asm__("$a0") = a;
38570af302Sopenharmony_ci	register long a1 __asm__("$a1") = b;
39570af302Sopenharmony_ci
40570af302Sopenharmony_ci	__asm__ __volatile__ (
41570af302Sopenharmony_ci		"syscall 0"
42570af302Sopenharmony_ci		: "+r"(a0)
43570af302Sopenharmony_ci	        : "r"(a7), "r"(a1)
44570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
45570af302Sopenharmony_ci	return a0;
46570af302Sopenharmony_ci}
47570af302Sopenharmony_ci
48570af302Sopenharmony_cistatic inline long __syscall3(long n, long a, long b, long c)
49570af302Sopenharmony_ci{
50570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
51570af302Sopenharmony_ci	register long a0 __asm__("$a0") = a;
52570af302Sopenharmony_ci	register long a1 __asm__("$a1") = b;
53570af302Sopenharmony_ci	register long a2 __asm__("$a2") = c;
54570af302Sopenharmony_ci
55570af302Sopenharmony_ci	__asm__ __volatile__ (
56570af302Sopenharmony_ci		"syscall 0"
57570af302Sopenharmony_ci		: "+r"(a0)
58570af302Sopenharmony_ci	        : "r"(a7), "r"(a1), "r"(a2)
59570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
60570af302Sopenharmony_ci	return a0;
61570af302Sopenharmony_ci}
62570af302Sopenharmony_ci
63570af302Sopenharmony_cistatic inline long __syscall4(long n, long a, long b, long c, long d)
64570af302Sopenharmony_ci{
65570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
66570af302Sopenharmony_ci	register long a0 __asm__("$a0") = a;
67570af302Sopenharmony_ci	register long a1 __asm__("$a1") = b;
68570af302Sopenharmony_ci	register long a2 __asm__("$a2") = c;
69570af302Sopenharmony_ci	register long a3 __asm__("$a3") = d;
70570af302Sopenharmony_ci
71570af302Sopenharmony_ci	__asm__ __volatile__ (
72570af302Sopenharmony_ci		"syscall 0"
73570af302Sopenharmony_ci		: "+r"(a0)
74570af302Sopenharmony_ci	        : "r"(a7), "r"(a1), "r"(a2), "r"(a3)
75570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
76570af302Sopenharmony_ci	return a0;
77570af302Sopenharmony_ci}
78570af302Sopenharmony_ci
79570af302Sopenharmony_cistatic inline long __syscall5(long n, long a, long b, long c, long d, long e)
80570af302Sopenharmony_ci{
81570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
82570af302Sopenharmony_ci	register long a0 __asm__("$a0") = a;
83570af302Sopenharmony_ci	register long a1 __asm__("$a1") = b;
84570af302Sopenharmony_ci	register long a2 __asm__("$a2") = c;
85570af302Sopenharmony_ci	register long a3 __asm__("$a3") = d;
86570af302Sopenharmony_ci	register long a4 __asm__("$a4") = e;
87570af302Sopenharmony_ci
88570af302Sopenharmony_ci	__asm__ __volatile__ (
89570af302Sopenharmony_ci		"syscall 0"
90570af302Sopenharmony_ci		: "+r"(a0)
91570af302Sopenharmony_ci	        : "r"(a7), "r"(a1), "r"(a2), "r"(a3), "r"(a4)
92570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
93570af302Sopenharmony_ci	return a0;
94570af302Sopenharmony_ci}
95570af302Sopenharmony_ci
96570af302Sopenharmony_cistatic inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
97570af302Sopenharmony_ci{
98570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
99570af302Sopenharmony_ci	register long a0 __asm__("$a0") = a;
100570af302Sopenharmony_ci	register long a1 __asm__("$a1") = b;
101570af302Sopenharmony_ci	register long a2 __asm__("$a2") = c;
102570af302Sopenharmony_ci	register long a3 __asm__("$a3") = d;
103570af302Sopenharmony_ci	register long a4 __asm__("$a4") = e;
104570af302Sopenharmony_ci	register long a5 __asm__("$a5") = f;
105570af302Sopenharmony_ci
106570af302Sopenharmony_ci	__asm__ __volatile__ (
107570af302Sopenharmony_ci		"syscall 0"
108570af302Sopenharmony_ci		: "+r"(a0)
109570af302Sopenharmony_ci	        : "r"(a7), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5)
110570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
111570af302Sopenharmony_ci	return a0;
112570af302Sopenharmony_ci}
113570af302Sopenharmony_ci
114570af302Sopenharmony_cistatic inline long __syscall7(long n, long a, long b, long c, long d, long e, long f, long g)
115570af302Sopenharmony_ci{
116570af302Sopenharmony_ci	register long a7 __asm__("$a7") = n;
117570af302Sopenharmony_ci	register long a0 __asm__("$a0") = a;
118570af302Sopenharmony_ci	register long a1 __asm__("$a1") = b;
119570af302Sopenharmony_ci	register long a2 __asm__("$a2") = c;
120570af302Sopenharmony_ci	register long a3 __asm__("$a3") = d;
121570af302Sopenharmony_ci	register long a4 __asm__("$a4") = e;
122570af302Sopenharmony_ci	register long a5 __asm__("$a5") = f;
123570af302Sopenharmony_ci	register long a6 __asm__("$a6") = g;
124570af302Sopenharmony_ci
125570af302Sopenharmony_ci	__asm__ __volatile__ (
126570af302Sopenharmony_ci		"syscall 0"
127570af302Sopenharmony_ci		: "+r"(a0)
128570af302Sopenharmony_ci	        : "r"(a7), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5), "r"(a6)
129570af302Sopenharmony_ci		: SYSCALL_CLOBBERLIST);
130570af302Sopenharmony_ci	return a0;
131570af302Sopenharmony_ci}
132570af302Sopenharmony_ci
133570af302Sopenharmony_ci#define VDSO_USEFUL
134570af302Sopenharmony_ci#define VDSO_CGT_SYM "__vdso_clock_gettime"
135570af302Sopenharmony_ci#define VDSO_CGT_VER "LINUX_5.10"
136570af302Sopenharmony_ci
137570af302Sopenharmony_ci#define IPC_64  0
138