13#define do_syscall(...) __asm__ volatile("ecall" : "=r"(a0) : __VA_ARGS__ : "memory")
17 register long a7 __asm__(
"a7") = n;
18 register long a0 __asm__(
"a0");
25 register long a7 __asm__(
"a7") = n;
26 register long a0 __asm__(
"a0") = a;
33 register long a7 __asm__(
"a7") = n;
34 register long a0 __asm__(
"a0") = a;
35 register long a1 __asm__(
"a1") = b;
42 register long a7 __asm__(
"a7") = n;
43 register long a0 __asm__(
"a0") = a;
44 register long a1 __asm__(
"a1") = b;
45 register long a2 __asm__(
"a2") = c;
46 do_syscall(
"r"(a0),
"r"(a7),
"r"(a1),
"r"(a2));
52 register long a7 __asm__(
"a7") = n;
53 register long a0 __asm__(
"a0") = a;
54 register long a1 __asm__(
"a1") = b;
55 register long a2 __asm__(
"a2") = c;
56 register long a3 __asm__(
"a3") = d;
57 do_syscall(
"r"(a0),
"r"(a7),
"r"(a1),
"r"(a2),
"r"(a3));
63 register long a7 __asm__(
"a7") = n;
64 register long a0 __asm__(
"a0") = a;
65 register long a1 __asm__(
"a1") = b;
66 register long a2 __asm__(
"a2") = c;
67 register long a3 __asm__(
"a3") = d;
68 register long a4 __asm__(
"a4") = e;
69 do_syscall(
"r"(a0),
"r"(a7),
"r"(a1),
"r"(a2),
"r"(a3),
"r"(a4));
75 register long a7 __asm__(
"a7") = n;
76 register long a0 __asm__(
"a0") = a;
77 register long a1 __asm__(
"a1") = b;
78 register long a2 __asm__(
"a2") = c;
79 register long a3 __asm__(
"a3") = d;
80 register long a4 __asm__(
"a4") = e;
81 register long a5 __asm__(
"a5") = f;
82 do_syscall(
"r"(a0),
"r"(a7),
"r"(a1),
"r"(a2),
"r"(a3),
"r"(a4),
"r"(a5));