1570af302Sopenharmony_ci#define __SYSCALL_LL_E(x) (x) 2570af302Sopenharmony_ci#define __SYSCALL_LL_O(x) (x) 3570af302Sopenharmony_ci 4570af302Sopenharmony_cistatic __inline long __syscall0(long n) 5570af302Sopenharmony_ci{ 6570af302Sopenharmony_ci unsigned long ret; 7570af302Sopenharmony_ci __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n) : "rcx", "r11", "memory"); 8570af302Sopenharmony_ci return ret; 9570af302Sopenharmony_ci} 10570af302Sopenharmony_ci 11570af302Sopenharmony_cistatic __inline long __syscall1(long n, long a1) 12570af302Sopenharmony_ci{ 13570af302Sopenharmony_ci unsigned long ret; 14570af302Sopenharmony_ci __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1) : "rcx", "r11", "memory"); 15570af302Sopenharmony_ci return ret; 16570af302Sopenharmony_ci} 17570af302Sopenharmony_ci 18570af302Sopenharmony_cistatic __inline long __syscall2(long n, long a1, long a2) 19570af302Sopenharmony_ci{ 20570af302Sopenharmony_ci unsigned long ret; 21570af302Sopenharmony_ci __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2) 22570af302Sopenharmony_ci : "rcx", "r11", "memory"); 23570af302Sopenharmony_ci return ret; 24570af302Sopenharmony_ci} 25570af302Sopenharmony_ci 26570af302Sopenharmony_cistatic __inline long __syscall3(long n, long a1, long a2, long a3) 27570af302Sopenharmony_ci{ 28570af302Sopenharmony_ci unsigned long ret; 29570af302Sopenharmony_ci __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), 30570af302Sopenharmony_ci "d"(a3) : "rcx", "r11", "memory"); 31570af302Sopenharmony_ci return ret; 32570af302Sopenharmony_ci} 33570af302Sopenharmony_ci 34570af302Sopenharmony_cistatic __inline long __syscall4(long n, long a1, long a2, long a3, long a4) 35570af302Sopenharmony_ci{ 36570af302Sopenharmony_ci unsigned long ret; 37570af302Sopenharmony_ci register long r10 __asm__("r10") = a4; 38570af302Sopenharmony_ci __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), 39570af302Sopenharmony_ci "d"(a3), "r"(r10): "rcx", "r11", "memory"); 40570af302Sopenharmony_ci return ret; 41570af302Sopenharmony_ci} 42570af302Sopenharmony_ci 43570af302Sopenharmony_cistatic __inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5) 44570af302Sopenharmony_ci{ 45570af302Sopenharmony_ci unsigned long ret; 46570af302Sopenharmony_ci register long r10 __asm__("r10") = a4; 47570af302Sopenharmony_ci register long r8 __asm__("r8") = a5; 48570af302Sopenharmony_ci __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), 49570af302Sopenharmony_ci "d"(a3), "r"(r10), "r"(r8) : "rcx", "r11", "memory"); 50570af302Sopenharmony_ci return ret; 51570af302Sopenharmony_ci} 52570af302Sopenharmony_ci 53570af302Sopenharmony_cistatic __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6) 54570af302Sopenharmony_ci{ 55570af302Sopenharmony_ci unsigned long ret; 56570af302Sopenharmony_ci register long r10 __asm__("r10") = a4; 57570af302Sopenharmony_ci register long r8 __asm__("r8") = a5; 58570af302Sopenharmony_ci register long r9 __asm__("r9") = a6; 59570af302Sopenharmony_ci __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), 60570af302Sopenharmony_ci "d"(a3), "r"(r10), "r"(r8), "r"(r9) : "rcx", "r11", "memory"); 61570af302Sopenharmony_ci return ret; 62570af302Sopenharmony_ci} 63570af302Sopenharmony_ci 64570af302Sopenharmony_ci#define VDSO_USEFUL 65570af302Sopenharmony_ci#define VDSO_CGT_SYM "__vdso_clock_gettime" 66570af302Sopenharmony_ci#define VDSO_CGT_VER "LINUX_2.6" 67570af302Sopenharmony_ci#define VDSO_GETCPU_SYM "__vdso_getcpu" 68570af302Sopenharmony_ci#define VDSO_GETCPU_VER "LINUX_2.6" 69570af302Sopenharmony_ci 70570af302Sopenharmony_ci#define IPC_64 0 71