revert between 56095 -> 55830 in arch
[AROS.git] / arch / .unmaintained / morphos / Include / aros / asmcall.h
blobfc863ca4b4aabec78854638ee00a08c4e8983e29
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #pragma pack(2)
7 #ifndef AROS_ASMCALL_H
8 #define AROS_ASMCALL_H
10 /******************************************************************************
12 MODUL
13 $Id$
15 DESCRIPTION
16 Some macros to build and call functions with registerized parameters on
17 the different compilers around. Usage:
19 AROS_UFH<n><f>(type, name, type1, name1, reg1, ...)
21 \* Function starts here. *\
24 <n> - Number of arguments of the function (not including the
25 library base).
27 <f> - 'I' means: Function ignores library base.
28 This is useful to get rid of warnings about unused arguments.
30 type - Returntype of the function.
32 name - Name of the function. A underscore '_' is prepended so that
33 following functions jump over the base vector and don't call
34 the function directly.
36 type<i>, name<i>, reg<i> - Type, name and register for the
37 arguments. Register names are written uppercase because they
38 are preprocessor symbols.
40 Example: Define a Exec compatible RemHead function.
42 AROS_UFH1(struct Node *, RemHead,
43 AROS_UFHA(struct List *, list, A0)
46 struct Node *node;
48 node=list->lh_Head;
49 if(node->ln_Succ==NULL)
50 return NULL;
51 Remove(node);
52 return node;
55 ******************************************************************************/
57 #define Xj(a,b) a##b
59 /* System-Specific things */
60 #ifndef AROS_SYSTEM_H
61 # include <aros/system.h>
62 #endif
64 #ifndef __typedef_VOID_FUNC
65 #define __typedef_VOID_FUNC
66 typedef void (*VOID_FUNC)(void);
67 #endif
68 #ifndef __typedef_LONG_FUNC
69 #define __typedef_LONG_FUNC
70 typedef long (*LONG_FUNC)(void);
71 #endif
72 #ifndef __typedef_ULONG_FUNC
73 #define __typedef_ULONG_FUNC
74 typedef unsigned long (*ULONG_FUNC)(void);
75 #endif
77 #ifndef AROS_ASMSYMNAME
78 # define AROS_ASMSYMNAME(n) ((APTR)&Xj(n,_Gate))
79 #endif
81 #define reg_D0 reg_d0
82 #define reg_D1 reg_d1
83 #define reg_D2 reg_d2
84 #define reg_D3 reg_d3
85 #define reg_D4 reg_d4
86 #define reg_D5 reg_d5
87 #define reg_D6 reg_d6
88 #define reg_D7 reg_d7
89 #define reg_A0 reg_a0
90 #define reg_A1 reg_a1
91 #define reg_A2 reg_a2
92 #define reg_A3 reg_a3
93 #define reg_A4 reg_a4
94 #define reg_A5 reg_a5
95 #define reg_A6 reg_a6
97 #if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
98 /* Function headers for user functions */
99 #define AROS_UFH0(t,n) \
100 __AROS_UFH_PREFIX t n##_Func (void); \
101 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
102 __AROS_UFH_PREFIX t n##_Func(void) \
105 #define AROS_UFH1(t,n,a1) \
106 __AROS_UFH_PREFIX t n##_Func (void); \
107 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
108 __AROS_UFH_PREFIX t n##_Func(void) \
110 __AROS_UFHA(a1);
112 #define AROS_UFH2(t,n,a1,a2) \
113 __AROS_UFH_PREFIX t n##_Func (void); \
114 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
115 __AROS_UFH_PREFIX t n##_Func(void) \
117 __AROS_UFHA(a1); \
118 __AROS_UFHA(a2);
120 #define AROS_UFH3(t,n,a1,a2,a3) \
121 __AROS_UFH_PREFIX t n##_Func (void); \
122 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
123 __AROS_UFH_PREFIX t n##_Func(void) \
125 __AROS_UFHA(a1); \
126 __AROS_UFHA(a2); \
127 __AROS_UFHA(a3);
129 #define AROS_UFH3S(t,n,a1,a2,a3) \
130 static __AROS_UFH_PREFIX t n##_Func (void); \
131 static const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
132 static __AROS_UFH_PREFIX t n##_Func(void) \
134 __AROS_UFHA(a1); \
135 __AROS_UFHA(a2); \
136 __AROS_UFHA(a3);
138 #define AROS_UFH4(t,n,a1,a2,a3,a4) \
139 __AROS_UFH_PREFIX t n##_Func (void); \
140 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
141 __AROS_UFH_PREFIX t n##_Func(void) \
143 __AROS_UFHA(a1); \
144 __AROS_UFHA(a2); \
145 __AROS_UFHA(a3); \
146 __AROS_UFHA(a4);
148 #define AROS_UFH5(t,n,a1,a2,a3,a4,a5) \
149 __AROS_UFH_PREFIX t n##_Func (void); \
150 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
151 __AROS_UFH_PREFIX t n##_Func(void) \
153 __AROS_UFHA(a1); \
154 __AROS_UFHA(a2); \
155 __AROS_UFHA(a3); \
156 __AROS_UFHA(a4); \
157 __AROS_UFHA(a5);
159 #define AROS_UFH5S(t,n,a1,a2,a3,a4,a5) \
160 __AROS_UFH_PREFIX static t n##_Func (void); \
161 static const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
162 __AROS_UFH_PREFIX static t n##_Func(void) \
164 __AROS_UFHA(a1); \
165 __AROS_UFHA(a2); \
166 __AROS_UFHA(a3); \
167 __AROS_UFHA(a4); \
168 __AROS_UFHA(a5);
170 #define AROS_UFH6(t,n,a1,a2,a3,a4,a5,a6) \
171 __AROS_UFH_PREFIX t n##_Func (void); \
172 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
173 __AROS_UFH_PREFIX t n##_Func(void) \
175 __AROS_UFHA(a1); \
176 __AROS_UFHA(a2); \
177 __AROS_UFHA(a3); \
178 __AROS_UFHA(a4); \
179 __AROS_UFHA(a5); \
180 __AROS_UFHA(a6);
182 #define AROS_UFH7(t,n,a1,a2,a3,a4,a5,a6,a7) \
183 __AROS_UFH_PREFIX t n##_Func (void); \
184 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
185 __AROS_UFH_PREFIX t n##_Func(void) \
187 __AROS_UFHA(a1); \
188 __AROS_UFHA(a2); \
189 __AROS_UFHA(a3); \
190 __AROS_UFHA(a4); \
191 __AROS_UFHA(a5); \
192 __AROS_UFHA(a6); \
193 __AROS_UFHA(a7);
195 #define AROS_UFH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
196 __AROS_UFH_PREFIX t n##_Func (void); \
197 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
198 __AROS_UFH_PREFIX t n##_Func(void) \
200 __AROS_UFHA(a1); \
201 __AROS_UFHA(a2); \
202 __AROS_UFHA(a3); \
203 __AROS_UFHA(a4); \
204 __AROS_UFHA(a5); \
205 __AROS_UFHA(a6); \
206 __AROS_UFHA(a7); \
207 __AROS_UFHA(a8);
209 #define AROS_UFH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
210 __AROS_UFH_PREFIX t n##_Func (void); \
211 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
212 __AROS_UFH_PREFIX t n##_Func(void) \
214 __AROS_UFHA(a1); \
215 __AROS_UFHA(a2); \
216 __AROS_UFHA(a3); \
217 __AROS_UFHA(a4); \
218 __AROS_UFHA(a5); \
219 __AROS_UFHA(a6); \
220 __AROS_UFHA(a7); \
221 __AROS_UFHA(a8); \
222 __AROS_UFHA(a9);
224 #define AROS_UFH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
225 __AROS_UFH_PREFIX t n##_Func (void); \
226 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
227 __AROS_UFH_PREFIX t n##_Func(void) \
229 __AROS_UFHA(a1); \
230 __AROS_UFHA(a2); \
231 __AROS_UFHA(a3); \
232 __AROS_UFHA(a4); \
233 __AROS_UFHA(a5); \
234 __AROS_UFHA(a6); \
235 __AROS_UFHA(a7); \
236 __AROS_UFHA(a8); \
237 __AROS_UFHA(a9); \
238 __AROS_UFHA(a10);
240 #define AROS_UFH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
241 __AROS_UFH_PREFIX t n##_Func (void); \
242 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
243 __AROS_UFH_PREFIX t n##_Func(void) \
245 __AROS_UFHA(a1); \
246 __AROS_UFHA(a2); \
247 __AROS_UFHA(a3); \
248 __AROS_UFHA(a4); \
249 __AROS_UFHA(a5); \
250 __AROS_UFHA(a6); \
251 __AROS_UFHA(a7); \
252 __AROS_UFHA(a8); \
253 __AROS_UFHA(a9); \
254 __AROS_UFHA(a10); \
255 __AROS_UFHA(a11);
257 #define AROS_UFH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
258 __AROS_UFH_PREFIX t n##_Func (void); \
259 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
260 __AROS_UFH_PREFIX t n##_Func(void) \
262 __AROS_UFHA(a1); \
263 __AROS_UFHA(a2); \
264 __AROS_UFHA(a3); \
265 __AROS_UFHA(a4); \
266 __AROS_UFHA(a5); \
267 __AROS_UFHA(a6); \
268 __AROS_UFHA(a7); \
269 __AROS_UFHA(a8); \
270 __AROS_UFHA(a9); \
271 __AROS_UFHA(a10); \
272 __AROS_UFHA(a11); \
273 __AROS_UFHA(a12);
275 #define AROS_UFH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
276 __AROS_UFH_PREFIX t n##_Func (void); \
277 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
278 __AROS_UFH_PREFIX t n##_Func(void) \
280 __AROS_UFHA(a1); \
281 __AROS_UFHA(a2); \
282 __AROS_UFHA(a3); \
283 __AROS_UFHA(a4); \
284 __AROS_UFHA(a5); \
285 __AROS_UFHA(a6); \
286 __AROS_UFHA(a7); \
287 __AROS_UFHA(a8); \
288 __AROS_UFHA(a9); \
289 __AROS_UFHA(a10); \
290 __AROS_UFHA(a11); \
291 __AROS_UFHA(a12); \
292 __AROS_UFHA(a13);
294 #define AROS_UFH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
295 __AROS_UFH_PREFIX t n##_Func (void); \
296 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
297 __AROS_UFH_PREFIX t n##_Func(void) \
299 __AROS_UFHA(a1); \
300 __AROS_UFHA(a2); \
301 __AROS_UFHA(a3); \
302 __AROS_UFHA(a4); \
303 __AROS_UFHA(a5); \
304 __AROS_UFHA(a6); \
305 __AROS_UFHA(a7); \
306 __AROS_UFHA(a8); \
307 __AROS_UFHA(a9); \
308 __AROS_UFHA(a10); \
309 __AROS_UFHA(a11); \
310 __AROS_UFHA(a12); \
311 __AROS_UFHA(a13); \
312 __AROS_UFHA(a14);
314 #define AROS_UFH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
315 __AROS_UFH_PREFIX t n##_Func (void); \
316 const struct EmulLibEntry n##_Gate = { TRAP_LIB, 0, (void(*))n##_Func }; \
317 __AROS_UFH_PREFIX t n##_Func(void) \
319 __AROS_UFHA(a1); \
320 __AROS_UFHA(a2); \
321 __AROS_UFHA(a3); \
322 __AROS_UFHA(a4); \
323 __AROS_UFHA(a5); \
324 __AROS_UFHA(a6); \
325 __AROS_UFHA(a7); \
326 __AROS_UFHA(a8); \
327 __AROS_UFHA(a9); \
328 __AROS_UFHA(a10); \
329 __AROS_UFHA(a11); \
330 __AROS_UFHA(a12); \
331 __AROS_UFHA(a13); \
332 __AROS_UFHA(a14); \
333 __AROS_UFHA(a15);
335 /* Call a user function */
336 #define AROS_UFC0(t,n) \
337 ((t)MyEmulHandle->EmulCallDirect68k((APTR)(n)))
339 #define AROS_UFC1(t,n,a1) \
340 ({ \
341 __AROS_UFPA(a1); \
342 __AROS_UFCA(a1); \
343 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
346 #define AROS_UFC2(t,n,a1,a2) \
347 ({ \
348 __AROS_UFPA(a1); \
349 __AROS_UFPA(a2); \
350 __AROS_UFCA(a1); \
351 __AROS_UFCA(a2); \
352 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
355 #define AROS_UFC3(t,n,a1,a2,a3) \
356 ({ \
357 __AROS_UFPA(a1); \
358 __AROS_UFPA(a2); \
359 __AROS_UFPA(a3); \
360 __AROS_UFCA(a1); \
361 __AROS_UFCA(a2); \
362 __AROS_UFCA(a3); \
363 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
366 #define AROS_UFC4(t,n,a1,a2,a3,a4) \
367 ({ \
368 __AROS_UFPA(a1); \
369 __AROS_UFPA(a2); \
370 __AROS_UFPA(a3); \
371 __AROS_UFPA(a4); \
372 __AROS_UFCA(a1); \
373 __AROS_UFCA(a2); \
374 __AROS_UFCA(a3); \
375 __AROS_UFCA(a4); \
376 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
379 #define AROS_UFC5(t,n,a1,a2,a3,a4,a5) \
380 ({ \
381 __AROS_UFPA(a1); \
382 __AROS_UFPA(a2); \
383 __AROS_UFPA(a3); \
384 __AROS_UFPA(a4); \
385 __AROS_UFPA(a5); \
386 __AROS_UFCA(a1); \
387 __AROS_UFCA(a2); \
388 __AROS_UFCA(a3); \
389 __AROS_UFCA(a4); \
390 __AROS_UFCA(a5); \
391 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
394 #define AROS_UFC6(t,n,a1,a2,a3,a4,a5,a6) \
395 ({ \
396 __AROS_UFPA(a1); \
397 __AROS_UFPA(a2); \
398 __AROS_UFPA(a3); \
399 __AROS_UFPA(a4); \
400 __AROS_UFPA(a5); \
401 __AROS_UFPA(a6); \
402 __AROS_UFCA(a1); \
403 __AROS_UFCA(a2); \
404 __AROS_UFCA(a3); \
405 __AROS_UFCA(a4); \
406 __AROS_UFCA(a5); \
407 __AROS_UFCA(a6); \
408 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
411 #define AROS_UFC7(t,n,a1,a2,a3,a4,a5,a6,a7) \
412 ({ \
413 __AROS_UFPA(a1); \
414 __AROS_UFPA(a2); \
415 __AROS_UFPA(a3); \
416 __AROS_UFPA(a4); \
417 __AROS_UFPA(a5); \
418 __AROS_UFPA(a6); \
419 __AROS_UFPA(a7); \
420 __AROS_UFCA(a1); \
421 __AROS_UFCA(a2); \
422 __AROS_UFCA(a3); \
423 __AROS_UFCA(a4); \
424 __AROS_UFCA(a5); \
425 __AROS_UFCA(a6); \
426 __AROS_UFCA(a7); \
427 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
430 #define AROS_UFC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
431 ({ \
432 __AROS_UFPA(a1); \
433 __AROS_UFPA(a2); \
434 __AROS_UFPA(a3); \
435 __AROS_UFPA(a4); \
436 __AROS_UFPA(a5); \
437 __AROS_UFPA(a6); \
438 __AROS_UFPA(a7); \
439 __AROS_UFPA(a8); \
440 __AROS_UFCA(a1); \
441 __AROS_UFCA(a2); \
442 __AROS_UFCA(a3); \
443 __AROS_UFCA(a4); \
444 __AROS_UFCA(a5); \
445 __AROS_UFCA(a6); \
446 __AROS_UFCA(a7); \
447 __AROS_UFCA(a8); \
448 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
451 #define AROS_UFC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
452 ({ \
453 __AROS_UFPA(a1); \
454 __AROS_UFPA(a2); \
455 __AROS_UFPA(a3); \
456 __AROS_UFPA(a4); \
457 __AROS_UFPA(a5); \
458 __AROS_UFPA(a6); \
459 __AROS_UFPA(a7); \
460 __AROS_UFPA(a8); \
461 __AROS_UFPA(a9); \
462 __AROS_UFCA(a1); \
463 __AROS_UFCA(a2); \
464 __AROS_UFCA(a3); \
465 __AROS_UFCA(a4); \
466 __AROS_UFCA(a5); \
467 __AROS_UFCA(a6); \
468 __AROS_UFCA(a7); \
469 __AROS_UFCA(a8); \
470 __AROS_UFCA(a9); \
471 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
474 #define AROS_UFC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
475 ({ \
476 __AROS_UFPA(a1); \
477 __AROS_UFPA(a2); \
478 __AROS_UFPA(a3); \
479 __AROS_UFPA(a4); \
480 __AROS_UFPA(a5); \
481 __AROS_UFPA(a6); \
482 __AROS_UFPA(a7); \
483 __AROS_UFPA(a8); \
484 __AROS_UFPA(a9); \
485 __AROS_UFPA(a10); \
486 __AROS_UFCA(a1); \
487 __AROS_UFCA(a2); \
488 __AROS_UFCA(a3); \
489 __AROS_UFCA(a4); \
490 __AROS_UFCA(a5); \
491 __AROS_UFCA(a6); \
492 __AROS_UFCA(a7); \
493 __AROS_UFCA(a8); \
494 __AROS_UFCA(a9); \
495 __AROS_UFCA(a10); \
496 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
499 #define AROS_UFC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
500 ({ \
501 __AROS_UFPA(a1); \
502 __AROS_UFPA(a2); \
503 __AROS_UFPA(a3); \
504 __AROS_UFPA(a4); \
505 __AROS_UFPA(a5); \
506 __AROS_UFPA(a6); \
507 __AROS_UFPA(a7); \
508 __AROS_UFPA(a8); \
509 __AROS_UFPA(a9); \
510 __AROS_UFPA(a10); \
511 __AROS_UFPA(a11); \
512 __AROS_UFCA(a1); \
513 __AROS_UFCA(a2); \
514 __AROS_UFCA(a3); \
515 __AROS_UFCA(a4); \
516 __AROS_UFCA(a5); \
517 __AROS_UFCA(a6); \
518 __AROS_UFCA(a7); \
519 __AROS_UFCA(a8); \
520 __AROS_UFCA(a9); \
521 __AROS_UFCA(a10); \
522 __AROS_UFCA(a11); \
523 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
526 #define AROS_UFC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
527 ({ \
528 __AROS_UFPA(a1); \
529 __AROS_UFPA(a2); \
530 __AROS_UFPA(a3); \
531 __AROS_UFPA(a4); \
532 __AROS_UFPA(a5); \
533 __AROS_UFPA(a6); \
534 __AROS_UFPA(a7); \
535 __AROS_UFPA(a8); \
536 __AROS_UFPA(a9); \
537 __AROS_UFPA(a10); \
538 __AROS_UFPA(a11); \
539 __AROS_UFPA(a12); \
540 __AROS_UFCA(a1); \
541 __AROS_UFCA(a2); \
542 __AROS_UFCA(a3); \
543 __AROS_UFCA(a4); \
544 __AROS_UFCA(a5); \
545 __AROS_UFCA(a6); \
546 __AROS_UFCA(a7); \
547 __AROS_UFCA(a8); \
548 __AROS_UFCA(a9); \
549 __AROS_UFCA(a10); \
550 __AROS_UFCA(a11); \
551 __AROS_UFCA(a12); \
552 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
555 #define AROS_UFC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
556 ({ \
557 __AROS_UFPA(a1); \
558 __AROS_UFPA(a2); \
559 __AROS_UFPA(a3); \
560 __AROS_UFPA(a4); \
561 __AROS_UFPA(a5); \
562 __AROS_UFPA(a6); \
563 __AROS_UFPA(a7); \
564 __AROS_UFPA(a8); \
565 __AROS_UFPA(a9); \
566 __AROS_UFPA(a10); \
567 __AROS_UFPA(a11); \
568 __AROS_UFPA(a12); \
569 __AROS_UFPA(a13); \
570 __AROS_UFCA(a1); \
571 __AROS_UFCA(a2); \
572 __AROS_UFCA(a3); \
573 __AROS_UFCA(a4); \
574 __AROS_UFCA(a5); \
575 __AROS_UFCA(a6); \
576 __AROS_UFCA(a7); \
577 __AROS_UFCA(a8); \
578 __AROS_UFCA(a9); \
579 __AROS_UFCA(a10); \
580 __AROS_UFCA(a11); \
581 __AROS_UFCA(a12); \
582 __AROS_UFCA(a13); \
583 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
586 #define AROS_UFC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
587 ({ \
588 __AROS_UFPA(a1); \
589 __AROS_UFPA(a2); \
590 __AROS_UFPA(a3); \
591 __AROS_UFPA(a4); \
592 __AROS_UFPA(a5); \
593 __AROS_UFPA(a6); \
594 __AROS_UFPA(a7); \
595 __AROS_UFPA(a8); \
596 __AROS_UFPA(a9); \
597 __AROS_UFPA(a10); \
598 __AROS_UFPA(a11); \
599 __AROS_UFPA(a12); \
600 __AROS_UFPA(a13); \
601 __AROS_UFPA(a14); \
602 __AROS_UFCA(a1); \
603 __AROS_UFCA(a2); \
604 __AROS_UFCA(a3); \
605 __AROS_UFCA(a4); \
606 __AROS_UFCA(a5); \
607 __AROS_UFCA(a6); \
608 __AROS_UFCA(a7); \
609 __AROS_UFCA(a8); \
610 __AROS_UFCA(a9); \
611 __AROS_UFCA(a10); \
612 __AROS_UFCA(a11); \
613 __AROS_UFCA(a12); \
614 __AROS_UFCA(a13); \
615 __AROS_UFCA(a14); \
616 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
619 #define AROS_UFC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
620 ({ \
621 __AROS_UFPA(a1); \
622 __AROS_UFPA(a2); \
623 __AROS_UFPA(a3); \
624 __AROS_UFPA(a4); \
625 __AROS_UFPA(a5); \
626 __AROS_UFPA(a6); \
627 __AROS_UFPA(a7); \
628 __AROS_UFPA(a8); \
629 __AROS_UFPA(a9); \
630 __AROS_UFPA(a10); \
631 __AROS_UFPA(a11); \
632 __AROS_UFPA(a12); \
633 __AROS_UFPA(a13); \
634 __AROS_UFPA(a14); \
635 __AROS_UFPA(a15); \
636 __AROS_UFCA(a1); \
637 __AROS_UFCA(a2); \
638 __AROS_UFCA(a3); \
639 __AROS_UFCA(a4); \
640 __AROS_UFCA(a5); \
641 __AROS_UFCA(a6); \
642 __AROS_UFCA(a7); \
643 __AROS_UFCA(a8); \
644 __AROS_UFCA(a9); \
645 __AROS_UFCA(a10); \
646 __AROS_UFCA(a11); \
647 __AROS_UFCA(a12); \
648 __AROS_UFCA(a13); \
649 __AROS_UFCA(a14); \
650 __AROS_UFCA(a15); \
651 (t)MyEmulHandle->EmulCallDirect68k((APTR)(n)); \
654 #endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
656 /* Prototypes for user functions */
657 # define AROS_UFP0(t,n) \
658 extern const struct EmulLibEntry n##_Gate;
660 # define AROS_UFP1(t,n,a1) \
661 extern const struct EmulLibEntry n##_Gate;
663 # define AROS_UFP2(t,n,a1,a2) \
664 extern const struct EmulLibEntry n##_Gate;
666 # define AROS_UFP3(t,n,a1,a2,a3) \
667 extern const struct EmulLibEntry n##_Gate;
669 # define AROS_UFP3S(t,n,a1,a2,a3) \
670 extern const struct EmulLibEntry n##_Gate;
672 # define AROS_UFP4(t,n,a1,a2,a3,a4) \
673 const struct EmulLibEntry Xj(n,_Gate);
675 # define AROS_UFP5(t,n,a1,a2,a3,a4,a5) \
676 extern const struct EmulLibEntry n##_Gate;
678 # define AROS_UFP5S(t,n,a1,a2,a3,a4,a5) \
679 extern const struct EmulLibEntry n##_Gate;
680 # define AROS_UFP6(t,n,a1,a2,a3,a4,a5,a6) \
681 extern const struct EmulLibEntry n##_Gate;
683 # define AROS_UFP7(t,n,a1,a2,a3,a4,a5,a6,a7) \
684 extern const struct EmulLibEntry n##_Gate;
686 # define AROS_UFP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
687 extern const struct EmulLibEntry n##_Gate;
689 # define AROS_UFP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
690 extern const struct EmulLibEntry n##_Gate;
692 # define AROS_UFP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
693 extern const struct EmulLibEntry n##_Gate;
695 # define AROS_UFP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
696 extern const struct EmulLibEntry n##_Gate;
698 # define AROS_UFP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
699 extern const struct EmulLibEntry n##_Gate;
701 # define AROS_UFP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
702 extern const struct EmulLibEntry n##_Gate;
704 # define AROS_UFP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
705 extern const struct EmulLibEntry n##_Gate;
707 # define AROS_UFP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
708 extern const struct EmulLibEntry n##_Gate;
710 #define AROS_UFHA(type,name,reg) type,name,reg
711 #define AROS_UFPA(type,name,reg) type,name,reg
712 #define AROS_UFCA(type,name,reg) type,name,reg
714 #ifndef AROS_USERFUNC_INIT
715 # define AROS_USERFUNC_INIT {
716 #endif
717 #ifndef AROS_USERFUNC_EXIT
718 # define AROS_USERFUNC_EXIT }}
719 #endif
721 /******************************************************************************
722 ***** ENDE aros/asmcall.h
723 ******************************************************************************/
725 #endif /* AROS_ASMCALL_H */
726 #pragma pack()