Go to the documentation of this file. 1 #ifndef _ASM_CRIS_ARCH_UNISTD_H_
2 #define _ASM_CRIS_ARCH_UNISTD_H_
9 #define _syscall0(type,name) \
12 register long __a __asm__ ("r10"); \
13 register long __n_ __asm__ ("r9") = (__NR_##name); \
14 __asm__ __volatile__ (".ifnc %0%1,$r10$r9\n\t" \
27 #define _syscall1(type,name,type1,arg1) \
28 type name(type1 arg1) \
30 register long __a __asm__ ("r10") = (long) arg1; \
31 register long __n_ __asm__ ("r9") = (__NR_##name); \
32 __asm__ __volatile__ (".ifnc %0%1,$r10$r9\n\t" \
37 : "r" (__n_), "0" (__a) \
45 #define _syscall2(type,name,type1,arg1,type2,arg2) \
46 type name(type1 arg1,type2 arg2) \
48 register long __a __asm__ ("r10") = (long) arg1; \
49 register long __b __asm__ ("r11") = (long) arg2; \
50 register long __n_ __asm__ ("r9") = (__NR_##name); \
51 __asm__ __volatile__ (".ifnc %0%1%3,$r10$r9$r11\n\t" \
56 : "r" (__n_), "0" (__a), "r" (__b) \
64 #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
65 type name(type1 arg1,type2 arg2,type3 arg3) \
67 register long __a __asm__ ("r10") = (long) arg1; \
68 register long __b __asm__ ("r11") = (long) arg2; \
69 register long __c __asm__ ("r12") = (long) arg3; \
70 register long __n_ __asm__ ("r9") = (__NR_##name); \
71 __asm__ __volatile__ (".ifnc %0%1%3%4,$r10$r9$r11$r12\n\t" \
76 : "r" (__n_), "0" (__a), "r" (__b), "r" (__c) \
84 #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
85 type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
87 register long __a __asm__ ("r10") = (long) arg1; \
88 register long __b __asm__ ("r11") = (long) arg2; \
89 register long __c __asm__ ("r12") = (long) arg3; \
90 register long __d __asm__ ("r13") = (long) arg4; \
91 register long __n_ __asm__ ("r9") = (__NR_##name); \
92 __asm__ __volatile__ (".ifnc %0%1%3%4%5,$r10$r9$r11$r12$r13\n\t" \
97 : "r" (__n_), "0" (__a), "r" (__b), \
106 #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
108 type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
110 register long __a __asm__ ("r10") = (long) arg1; \
111 register long __b __asm__ ("r11") = (long) arg2; \
112 register long __c __asm__ ("r12") = (long) arg3; \
113 register long __d __asm__ ("r13") = (long) arg4; \
114 register long __e __asm__ ("mof") = (long) arg5; \
115 register long __n_ __asm__ ("r9") = (__NR_##name); \
116 __asm__ __volatile__ (".ifnc %0%1%3%4%5%6,$r10$r9$r11$r12$r13$mof\n\t" \
121 : "r" (__n_), "0" (__a), "r" (__b), \
122 "r" (__c), "r" (__d), "h" (__e) \
130 #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
131 type5,arg5,type6,arg6) \
132 type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
134 register long __a __asm__ ("r10") = (long) arg1; \
135 register long __b __asm__ ("r11") = (long) arg2; \
136 register long __c __asm__ ("r12") = (long) arg3; \
137 register long __d __asm__ ("r13") = (long) arg4; \
138 register long __e __asm__ ("mof") = (long) arg5; \
139 register long __f __asm__ ("srp") = (long) arg6; \
140 register long __n_ __asm__ ("r9") = (__NR_##name); \
141 __asm__ __volatile__ (".ifnc %0%1%3%4%5%6%7,$r10$r9$r11$r12$r13$mof$srp\n\t" \
146 : "r" (__n_), "0" (__a), "r" (__b), \
147 "r" (__c), "r" (__d), "h" (__e), "x" (__f) \