27 #error "SF_USER_ERRNO not supported yet"
29 #define __sfsyscall_return(type, res) \
38 #define PENE __NR_##name
40 #define _sfsyscall0(type, name) \
47 : "K"(__NR_##name)); \
48 __sfsyscall_return(type, __res); \
51 #define _sfsyscall1(type, name, type1, arg1) \
52 type name(type1 arg1) { \
59 : "g"(__NR_##name), "g"((long)(arg1))); \
60 __sfsyscall_return(type, __res); \
63 #define _sfsyscall2(type, name, type1, arg1, type2, arg2) \
64 type name(type1 arg1, type2 arg2) { \
72 : "I"(__NR_##name), "g"((long)(arg1)), "g"((long)(arg2))); \
73 __sfsyscall_return(type, __res); \
76 #define _sfsyscall3ipi(type, name, type1, arg1, type2, arg2, type3, arg3) \
77 type name(type1 arg1, type2 arg2, type3 arg3) { \
90 __sfsyscall_return(type, __res); \
93 #define _sfsyscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \
94 type name(type1 arg1, type2 arg2, type3 arg3) { \
103 : "I"(__NR_##name), "g"((long)(arg1)), "g"((long)(arg2)), \
104 "g"((long)(arg3))); \
105 __sfsyscall_return(type, __res); \
108 #define _sfsyscall4(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) \
109 type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
119 : "I"(__NR_##name), "g"((long)(arg1)), "r"((long)(arg2)), \
120 "r"((long)(arg3)), "S"((long)(arg4))); \
121 __sfsyscall_return(type, __res); \
124 #define _sfsyscall5(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, \
126 type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \
128 __asm__ volatile("mov x0, %2\n\t" \
136 : "I"(__NR_##name), "g"((long)(arg1)), "g"((long)(arg2)), \
137 "g"((long)(arg3)), "g"((long)(arg4)), "g"((long)(arg5))); \
138 __sfsyscall_return(type, __res); \
141 #define _sfsyscall6(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, \
142 type5, arg5, type6, arg6) \
143 type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) { \
145 __asm__ volatile("mov x0, %2\n\t" \
154 : "I"(__NR_##name), "g"((long)(arg1)), "g"((long)(arg2)), \
155 "g"((long)(arg3)), "g"((long)(arg4)), "g"((long)(arg5)), \
156 "g"((long)(arg6))); \
157 __sfsyscall_return(type, __res); \