Go to the documentation of this file. 1 #ifndef XTF_X86_64_HYPERCALL_H 2 #define XTF_X86_64_HYPERCALL_H 10 #define _hypercall64_0(type, hcall) \ 14 "call hypercall_page + %c[offset]" \ 16 : [offset] "i" (hcall * 32) \ 21 #define _hypercall64_1(type, hcall, a1) \ 23 long res, _a1 = (long)(a1); \ 25 "call hypercall_page + %c[offset]" \ 26 : "=a" (res), "+D" (_a1) \ 27 : [offset] "i" (hcall * 32) \ 32 #define _hypercall64_2(type, hcall, a1, a2) \ 34 long res, _a1 = (long)(a1), _a2 = (long)(a2); \ 36 "call hypercall_page + %c[offset]" \ 37 : "=a" (res), "+D" (_a1), "+S" (_a2) \ 38 : [offset] "i" (hcall * 32) \ 43 #define _hypercall64_3(type, hcall, a1, a2, a3) \ 45 long res, _a1 = (long)(a1), _a2 = (long)(a2), _a3 = (long)(a3); \ 47 "call hypercall_page + %c[offset]" \ 48 : "=a" (res), "+D" (_a1), "+S" (_a2), "+d" (_a3) \ 49 : [offset] "i" (hcall * 32) \ 54 #define _hypercall64_4(type, hcall, a1, a2, a3, a4) \ 56 long res, _a1 = (long)(a1), _a2 = (long)(a2), _a3 = (long)(a3); \ 57 register long _a4 asm ("r10") = (long)(a4); \ 59 "call hypercall_page + %c[offset]" \ 60 : "=a" (res), "+D" (_a1), "+S" (_a2), "+d" (_a3), \ 62 : [offset] "i" (hcall * 32) \ 67 #define _hypercall64_5(type, hcall, a1, a2, a3, a4, a5) \ 69 long res, _a1 = (long)(a1), _a2 = (long)(a2), _a3 = (long)(a3); \ 70 register long _a4 asm ("r10") = (long)(a4); \ 71 register long _a5 asm ("r8") = (long)(a5); \ 73 "call hypercall_page + %c[offset]" \ 74 : "=a" (res), "+D" (_a1), "+S" (_a2), "+d" (_a3), \ 75 "+r" (_a4), "+r" (_a5) \ 76 : [offset] "i" (hcall * 32) \