revert between 56095 -> 55830 in arch
[AROS.git] / tools / fd2inline / cross / share / ix86be-amithlon / macros.h
blobda1d076b1a0b46bf4e8ec394084bad030c9db525
1 #ifndef __INLINE_MACROS_H
2 #define __INLINE_MACROS_H
4 /*
5 General macros for Amiga function calls from little- or big-endian
6 ix86 code.
8 LPX - functions that take X arguments.
10 Modifiers (variations are possible):
11 NR - no return (void),
12 UB - base will be given explicitly by user (see cia.resource).
16 #ifndef __INLINE_STUB_H
17 #include <inline/stubs.h>
18 #endif
20 #ifndef __INLINE_MACROS_H_REGS
21 #define __INLINE_MACROS_H_REGS
23 struct _Regs
25 ULONG d0;
26 ULONG d1;
27 ULONG d2;
28 ULONG d3;
29 ULONG d4;
30 ULONG d5;
31 ULONG d6;
32 ULONG d7;
33 ULONG a0;
34 ULONG a1;
35 ULONG a2;
36 ULONG a3;
37 ULONG a4;
38 ULONG a5;
39 ULONG a6;
40 ULONG a7;
43 #endif /* __INLINE_MACROS_H_REGS */
45 ULONG _CallLib68k(struct _Regs*,LONG) __attribute__((__regparm__(3)));
46 static __inline__ __SIZE_TYPE__ _Return1(void) { return 1; }
48 #define LP0(offs, rt, name, bt, bn) \
49 ({ \
50 { \
51 rt _##name##_re; \
52 struct _Regs _##name##_r[_Return1()]; \
53 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
54 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
55 _##name##_re; \
56 } \
59 #define LP0NR(offs, name, bt, bn) \
60 ({ \
61 { \
62 struct _Regs _##name##_r[_Return1()]; \
63 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
64 _CallLib68k(&_##name##_r[0],-offs); \
65 } \
68 #define LP1(offs, rt, name, t1, v1, r1, bt, bn) \
69 ({ \
70 { \
71 rt _##name##_re; \
72 struct _Regs _##name##_r[_Return1()]; \
73 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
74 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
75 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
76 _##name##_re; \
77 } \
80 #define LP1UB(offs, rt, name, t1, v1, r1) \
81 ({ \
82 { \
83 rt _##name##_re; \
84 struct _Regs _##name##_r[_Return1()]; \
85 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
86 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
87 _##name##_re; \
88 } \
91 #define LP1NR(offs, name, t1, v1, r1, bt, bn) \
92 ({ \
93 { \
94 struct _Regs _##name##_r[_Return1()]; \
95 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
96 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
97 _CallLib68k(&_##name##_r[0],-offs); \
98 } \
101 #define LP2(offs, rt, name, t1, v1, r1, t2, v2, r2, bt, bn) \
102 ({ \
104 rt _##name##_re; \
105 struct _Regs _##name##_r[_Return1()]; \
106 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
107 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
108 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
109 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
110 _##name##_re; \
114 #define LP2UB(offs, rt, name, t1, v1, r1, t2, v2, r2) \
115 ({ \
117 rt _##name##_re; \
118 struct _Regs _##name##_r[_Return1()]; \
119 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
120 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
121 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
122 _##name##_re; \
126 #define LP2NR(offs, name, t1, v1, r1, t2, v2, r2, bt, bn) \
127 ({ \
129 struct _Regs _##name##_r[_Return1()]; \
130 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
131 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
132 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
133 _CallLib68k(&_##name##_r[0],-offs); \
137 #define LP2NRUB(offs, name, t1, v1, r1, t2, v2, r2) \
138 ({ \
140 struct _Regs _##name##_r[_Return1()]; \
141 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
142 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
143 _CallLib68k(&_##name##_r[0],-offs); \
147 #define LP3(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn) \
148 ({ \
150 rt _##name##_re; \
151 struct _Regs _##name##_r[_Return1()]; \
152 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
153 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
154 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
155 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
156 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
157 _##name##_re; \
161 #define LP3UB(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3) \
162 ({ \
164 rt _##name##_re; \
165 struct _Regs _##name##_r[_Return1()]; \
166 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
167 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
168 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
169 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
170 _##name##_re; \
174 #define LP3NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, bt, bn) \
175 ({ \
177 struct _Regs _##name##_r[_Return1()]; \
178 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
179 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
180 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
181 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
182 _CallLib68k(&_##name##_r[0],-offs); \
186 #define LP3NRUB(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3) \
187 ({ \
189 struct _Regs _##name##_r[_Return1()]; \
190 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
191 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
192 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
193 _CallLib68k(&_##name##_r[0],-offs); \
197 #define LP4(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn) \
198 ({ \
200 rt _##name##_re; \
201 struct _Regs _##name##_r[_Return1()]; \
202 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
203 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
204 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
205 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
206 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
207 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
208 _##name##_re; \
212 #define LP4NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, bt, bn) \
213 ({ \
215 struct _Regs _##name##_r[_Return1()]; \
216 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
217 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
218 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
219 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
220 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
221 _CallLib68k(&_##name##_r[0],-offs); \
225 #define LP5(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn) \
226 ({ \
228 rt _##name##_re; \
229 struct _Regs _##name##_r[_Return1()]; \
230 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
231 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
232 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
233 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
234 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
235 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
236 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
237 _##name##_re; \
241 #define LP5NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, bt, bn) \
242 ({ \
244 struct _Regs _##name##_r[_Return1()]; \
245 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
246 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
247 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
248 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
249 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
250 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
251 _CallLib68k(&_##name##_r[0],-offs); \
255 #define LP6(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn) \
256 ({ \
258 rt _##name##_re; \
259 struct _Regs _##name##_r[_Return1()]; \
260 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
261 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
262 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
263 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
264 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
265 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
266 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
267 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
268 _##name##_re; \
272 #define LP6NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, bt, bn) \
273 ({ \
275 struct _Regs _##name##_r[_Return1()]; \
276 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
277 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
278 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
279 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
280 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
281 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
282 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
283 _CallLib68k(&_##name##_r[0],-offs); \
287 #define LP7(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn) \
288 ({ \
290 rt _##name##_re; \
291 struct _Regs _##name##_r[_Return1()]; \
292 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
293 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
294 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
295 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
296 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
297 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
298 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
299 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
300 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
301 _##name##_re; \
305 #define LP7NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, bt, bn) \
306 ({ \
308 struct _Regs _##name##_r[_Return1()]; \
309 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
310 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
311 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
312 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
313 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
314 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
315 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
316 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
317 _CallLib68k(&_##name##_r[0],-offs); \
321 #define LP8(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, bt, bn) \
322 ({ \
324 rt _##name##_re; \
325 struct _Regs _##name##_r[_Return1()]; \
326 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
327 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
328 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
329 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
330 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
331 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
332 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
333 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
334 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
335 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
336 _##name##_re; \
340 #define LP8NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, bt, bn) \
341 ({ \
343 struct _Regs _##name##_r[_Return1()]; \
344 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
345 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
346 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
347 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
348 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
349 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
350 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
351 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
352 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
353 _CallLib68k(&_##name##_r[0],-offs); \
357 #define LP9(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, bt, bn) \
358 ({ \
360 rt _##name##_re; \
361 struct _Regs _##name##_r[_Return1()]; \
362 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
363 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
364 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
365 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
366 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
367 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
368 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
369 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
370 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r9):"ri"((ULONG)(v9)));\
371 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
372 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
373 _##name##_re; \
377 #define LP9NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, bt, bn) \
378 ({ \
380 struct _Regs _##name##_r[_Return1()]; \
381 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
382 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
383 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
384 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
385 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
386 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
387 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
388 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
389 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r9):"ri"((ULONG)(v9)));\
390 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
391 _CallLib68k(&_##name##_r[0],-offs); \
395 #define LP10(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, bt, bn) \
396 ({ \
398 rt _##name##_re; \
399 struct _Regs _##name##_r[_Return1()]; \
400 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
401 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
402 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
403 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
404 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
405 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
406 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
407 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
408 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r9):"ri"((ULONG)(v9)));\
409 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r10):"ri"((ULONG)(v10)));\
410 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
411 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
412 _##name##_re; \
416 #define LP10NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, bt, bn) \
417 ({ \
419 struct _Regs _##name##_r[_Return1()]; \
420 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
421 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
422 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
423 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
424 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
425 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
426 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
427 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
428 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r9):"ri"((ULONG)(v9)));\
429 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r10):"ri"((ULONG)(v10)));\
430 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
431 _CallLib68k(&_##name##_r[0],-offs); \
435 #define LP11(offs, rt, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, t11, v11, r11, bt, bn) \
436 ({ \
438 rt _##name##_re; \
439 struct _Regs _##name##_r[_Return1()]; \
440 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
441 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
442 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
443 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
444 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
445 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
446 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
447 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
448 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r9):"ri"((ULONG)(v9)));\
449 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r10):"ri"((ULONG)(v10)));\
450 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r11):"ri"((ULONG)(v11)));\
451 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
452 _##name##_re = (rt) _CallLib68k(&_##name##_r[0],-offs); \
453 _##name##_re; \
457 #define LP11NR(offs, name, t1, v1, r1, t2, v2, r2, t3, v3, r3, t4, v4, r4, t5, v5, r5, t6, v6, r6, t7, v7, r7, t8, v8, r8, t9, v9, r9, t10, v10, r10, t11, v11, r11, bt, bn) \
458 ({ \
460 struct _Regs _##name##_r[_Return1()]; \
461 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r1):"ri"((ULONG)(v1)));\
462 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r2):"ri"((ULONG)(v2)));\
463 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r3):"ri"((ULONG)(v3)));\
464 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r4):"ri"((ULONG)(v4)));\
465 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r5):"ri"((ULONG)(v5)));\
466 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r6):"ri"((ULONG)(v6)));\
467 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r7):"ri"((ULONG)(v7)));\
468 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r8):"ri"((ULONG)(v8)));\
469 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r9):"ri"((ULONG)(v9)));\
470 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r10):"ri"((ULONG)(v10)));\
471 __asm__("movl %1,%0":"=m"(_##name##_r[0].##r11):"ri"((ULONG)(v11)));\
472 __asm__("movl %1,%0":"=m"(_##name##_r[0].a6) :"ri"((ULONG)(bn)));\
473 _CallLib68k(&_##name##_r[0],-offs); \
478 #endif /* __INLINE_MACROS_H */