Listtree.mcc: make Listtree inherit from List as it should
[AROS.git] / compiler / arossupport / include / asmcall.h
blob1caae43853c02fa04ac823160cca7e65151d7f31
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef AROS_ASMCALL_H
7 #define AROS_ASMCALL_H
9 /******************************************************************************
11 MODUL
12 $Id$
14 DESCRIPTION
15 Some macros to build and call functions with registerized parameters on
16 the different compilers around. Usage:
18 AROS_UFH<n><f>(type, name, [AROS_UFHA(type1, name1, reg1),] ...)
20 AROS_USERFUNC_INIT
21 ...
22 AROS_USERFUNC_EXIT
25 <n> - Number of arguments of the function.
27 <f> - 'S' means: define function as static.
29 type - Returntype of the function.
31 name - Name of the function. A underscore '_' is prepended so that
32 following functions jump over the base vector and don't call
33 the function directly.
35 type<i>, name<i>, reg<i> - Type, name and register for the
36 arguments. Register names are written uppercase because they
37 are preprocessor symbols.
39 Example: Define a function which can be used for a callback hook.
41 AROS_UFH3(ULONG, myfunction,
42 AROS_UFHA(struct Hook *, h, A0),
43 AROS_UFHA(Object *, object, A2),
44 AROS_UFHA(APTR, msg, A1))
46 AROS_USERFUNC_INIT
47 ...
48 return retval;
49 AROS_USERFUNC_EXIT
53 ******************************************************************************/
55 /* System-Specific things */
56 #ifndef AROS_SYSTEM_H
57 # include <aros/system.h>
58 #endif
60 #ifdef __AROS_ASMCALL_H_FILE
61 #include __AROS_ASMCALL_H_FILE
62 #endif
64 #ifndef __typedef_VOID_FUNC
65 #define __typedef_VOID_FUNC
66 typedef void (*VOID_FUNC)();
67 #endif
68 #ifndef __typedef_LONG_FUNC
69 #define __typedef_LONG_FUNC
70 typedef int (*LONG_FUNC)();
71 #endif
72 #ifndef __typedef_ULONG_FUNC
73 #define __typedef_ULONG_FUNC
74 typedef unsigned int (*ULONG_FUNC)();
75 #endif
77 #ifndef __AROS_UFHA
78 #define __AROS_UFHA(type,name,reg) type name
79 #endif
80 #ifndef __AROS_UFPA
81 #define __AROS_UFPA(type,name,reg) type
82 #endif
83 #ifndef __AROS_UFCA
84 #define __AROS_UFCA(type,name,reg) (name)
85 #endif
86 #ifndef __AROS_UFDA
87 #define __AROS_UFDA(type,name,reg) type
88 #endif
90 #ifndef __AROS_UFH_PREFIX
91 #define __AROS_UFH_PREFIX /* eps */
92 #endif
93 #ifndef __AROS_UFP_PREFIX
94 #define __AROS_UFP_PREFIX /* eps */
95 #endif
96 #ifndef __AROS_UFC_PREFIX
97 #define __AROS_UFC_PREFIX /* eps */
98 #endif
99 #ifndef __AROS_UFD_PREFIX
100 #define __AROS_UFD_PREFIX /* eps */
101 #endif
103 #ifndef __AROS_CPU_SPECIFIC_ASMCALLS
105 #if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) /* Function headers for user functions */
106 #define AROS_UFH0(t,n) \
107 __AROS_UFH_PREFIX t n (void) {
108 #define AROS_UFH1S(t,n,a1) \
109 __AROS_UFH_PREFIX static t n (\
110 __AROS_UFHA(a1)\
112 #define AROS_UFH1(t,n,a1) \
113 __AROS_UFH_PREFIX t n (\
114 __AROS_UFHA(a1)\
116 #define AROS_UFH2S(t,n,a1,a2) \
117 __AROS_UFH_PREFIX static t n (\
118 __AROS_UFHA(a1),\
119 __AROS_UFHA(a2)\
121 #define AROS_UFH2(t,n,a1,a2) \
122 __AROS_UFH_PREFIX t n (\
123 __AROS_UFHA(a1),\
124 __AROS_UFHA(a2)\
126 #define AROS_UFH3(t,n,a1,a2,a3) \
127 __AROS_UFH_PREFIX t n (\
128 __AROS_UFHA(a1),\
129 __AROS_UFHA(a2),\
130 __AROS_UFHA(a3)\
132 #define AROS_UFH3S(t,n,a1,a2,a3) \
133 __AROS_UFH_PREFIX static t n (\
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 (\
140 __AROS_UFHA(a1),\
141 __AROS_UFHA(a2),\
142 __AROS_UFHA(a3),\
143 __AROS_UFHA(a4)\
145 #define AROS_UFH5(t,n,a1,a2,a3,a4,a5) \
146 __AROS_UFH_PREFIX t n (\
147 __AROS_UFHA(a1),\
148 __AROS_UFHA(a2),\
149 __AROS_UFHA(a3),\
150 __AROS_UFHA(a4),\
151 __AROS_UFHA(a5)\
153 #define AROS_UFH5S(t,n,a1,a2,a3,a4,a5) \
154 __AROS_UFH_PREFIX static t n (\
155 __AROS_UFHA(a1),\
156 __AROS_UFHA(a2),\
157 __AROS_UFHA(a3),\
158 __AROS_UFHA(a4),\
159 __AROS_UFHA(a5)\
161 #define AROS_UFH6(t,n,a1,a2,a3,a4,a5,a6) \
162 __AROS_UFH_PREFIX t n (\
163 __AROS_UFHA(a1),\
164 __AROS_UFHA(a2),\
165 __AROS_UFHA(a3),\
166 __AROS_UFHA(a4),\
167 __AROS_UFHA(a5),\
168 __AROS_UFHA(a6)\
170 #define AROS_UFH7(t,n,a1,a2,a3,a4,a5,a6,a7) \
171 __AROS_UFH_PREFIX t n (\
172 __AROS_UFHA(a1),\
173 __AROS_UFHA(a2),\
174 __AROS_UFHA(a3),\
175 __AROS_UFHA(a4),\
176 __AROS_UFHA(a5),\
177 __AROS_UFHA(a6),\
178 __AROS_UFHA(a7)\
180 #define AROS_UFH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
181 __AROS_UFH_PREFIX t n (\
182 __AROS_UFHA(a1),\
183 __AROS_UFHA(a2),\
184 __AROS_UFHA(a3),\
185 __AROS_UFHA(a4),\
186 __AROS_UFHA(a5),\
187 __AROS_UFHA(a6),\
188 __AROS_UFHA(a7),\
189 __AROS_UFHA(a8)\
191 #define AROS_UFH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
192 __AROS_UFH_PREFIX t n (\
193 __AROS_UFHA(a1),\
194 __AROS_UFHA(a2),\
195 __AROS_UFHA(a3),\
196 __AROS_UFHA(a4),\
197 __AROS_UFHA(a5),\
198 __AROS_UFHA(a6),\
199 __AROS_UFHA(a7),\
200 __AROS_UFHA(a8),\
201 __AROS_UFHA(a9)\
203 #define AROS_UFH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
204 __AROS_UFH_PREFIX t n (\
205 __AROS_UFHA(a1),\
206 __AROS_UFHA(a2),\
207 __AROS_UFHA(a3),\
208 __AROS_UFHA(a4),\
209 __AROS_UFHA(a5),\
210 __AROS_UFHA(a6),\
211 __AROS_UFHA(a7),\
212 __AROS_UFHA(a8),\
213 __AROS_UFHA(a9),\
214 __AROS_UFHA(a10)\
216 #define AROS_UFH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
217 __AROS_UFH_PREFIX t n (\
218 __AROS_UFHA(a1),\
219 __AROS_UFHA(a2),\
220 __AROS_UFHA(a3),\
221 __AROS_UFHA(a4),\
222 __AROS_UFHA(a5),\
223 __AROS_UFHA(a6),\
224 __AROS_UFHA(a7),\
225 __AROS_UFHA(a8),\
226 __AROS_UFHA(a9),\
227 __AROS_UFHA(a10),\
228 __AROS_UFHA(a11)\
230 #define AROS_UFH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
231 __AROS_UFH_PREFIX t n (\
232 __AROS_UFHA(a1),\
233 __AROS_UFHA(a2),\
234 __AROS_UFHA(a3),\
235 __AROS_UFHA(a4),\
236 __AROS_UFHA(a5),\
237 __AROS_UFHA(a6),\
238 __AROS_UFHA(a7),\
239 __AROS_UFHA(a8),\
240 __AROS_UFHA(a9),\
241 __AROS_UFHA(a10),\
242 __AROS_UFHA(a11),\
243 __AROS_UFHA(a12)\
245 #define AROS_UFH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
246 __AROS_UFH_PREFIX t n (\
247 __AROS_UFHA(a1),\
248 __AROS_UFHA(a2),\
249 __AROS_UFHA(a3),\
250 __AROS_UFHA(a4),\
251 __AROS_UFHA(a5),\
252 __AROS_UFHA(a6),\
253 __AROS_UFHA(a7),\
254 __AROS_UFHA(a8),\
255 __AROS_UFHA(a9),\
256 __AROS_UFHA(a10),\
257 __AROS_UFHA(a11),\
258 __AROS_UFHA(a12),\
259 __AROS_UFHA(a13)\
261 #define AROS_UFH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
262 __AROS_UFH_PREFIX t n (\
263 __AROS_UFHA(a1),\
264 __AROS_UFHA(a2),\
265 __AROS_UFHA(a3),\
266 __AROS_UFHA(a4),\
267 __AROS_UFHA(a5),\
268 __AROS_UFHA(a6),\
269 __AROS_UFHA(a7),\
270 __AROS_UFHA(a8),\
271 __AROS_UFHA(a9),\
272 __AROS_UFHA(a10),\
273 __AROS_UFHA(a11),\
274 __AROS_UFHA(a12),\
275 __AROS_UFHA(a13),\
276 __AROS_UFHA(a14)\
278 #define AROS_UFH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
279 __AROS_UFH_PREFIX t n (\
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),\
293 __AROS_UFHA(a14),\
294 __AROS_UFHA(a15)\
297 /* Call a user function */
298 #define AROS_UFC0(t,n) \
299 (((__AROS_UFC_PREFIX t(*)(void))n)())
300 #define AROS_UFC1(t,n,a1) \
301 (((__AROS_UFC_PREFIX t(*)(\
302 __AROS_UFPA(a1)\
303 ))n)(\
304 __AROS_UFCA(a1)\
306 #define AROS_UFC2(t,n,a1,a2) \
307 (((__AROS_UFC_PREFIX t(*)(\
308 __AROS_UFPA(a1),\
309 __AROS_UFPA(a2)\
310 ))n)(\
311 __AROS_UFCA(a1),\
312 __AROS_UFCA(a2)\
314 #define AROS_UFC3(t,n,a1,a2,a3) \
315 (((__AROS_UFC_PREFIX t(*)(\
316 __AROS_UFPA(a1),\
317 __AROS_UFPA(a2),\
318 __AROS_UFPA(a3)\
319 ))n)(\
320 __AROS_UFCA(a1),\
321 __AROS_UFCA(a2),\
322 __AROS_UFCA(a3)\
324 #define AROS_UFC4(t,n,a1,a2,a3,a4) \
325 (((__AROS_UFC_PREFIX t(*)(\
326 __AROS_UFPA(a1),\
327 __AROS_UFPA(a2),\
328 __AROS_UFPA(a3),\
329 __AROS_UFPA(a4)\
330 ))n)(\
331 __AROS_UFCA(a1),\
332 __AROS_UFCA(a2),\
333 __AROS_UFCA(a3),\
334 __AROS_UFCA(a4)\
336 #define AROS_UFC5(t,n,a1,a2,a3,a4,a5) \
337 (((__AROS_UFC_PREFIX t(*)(\
338 __AROS_UFPA(a1),\
339 __AROS_UFPA(a2),\
340 __AROS_UFPA(a3),\
341 __AROS_UFPA(a4),\
342 __AROS_UFPA(a5)\
343 ))n)(\
344 __AROS_UFCA(a1),\
345 __AROS_UFCA(a2),\
346 __AROS_UFCA(a3),\
347 __AROS_UFCA(a4),\
348 __AROS_UFCA(a5)\
350 #define AROS_UFC6(t,n,a1,a2,a3,a4,a5,a6) \
351 (((__AROS_UFC_PREFIX t(*)(\
352 __AROS_UFPA(a1),\
353 __AROS_UFPA(a2),\
354 __AROS_UFPA(a3),\
355 __AROS_UFPA(a4),\
356 __AROS_UFPA(a5),\
357 __AROS_UFPA(a6)\
358 ))n)(\
359 __AROS_UFCA(a1),\
360 __AROS_UFCA(a2),\
361 __AROS_UFCA(a3),\
362 __AROS_UFCA(a4),\
363 __AROS_UFCA(a5),\
364 __AROS_UFCA(a6)\
366 #define AROS_UFC7(t,n,a1,a2,a3,a4,a5,a6,a7) \
367 (((__AROS_UFC_PREFIX t(*)(\
368 __AROS_UFPA(a1),\
369 __AROS_UFPA(a2),\
370 __AROS_UFPA(a3),\
371 __AROS_UFPA(a4),\
372 __AROS_UFPA(a5),\
373 __AROS_UFPA(a6),\
374 __AROS_UFPA(a7)\
375 ))n)(\
376 __AROS_UFCA(a1),\
377 __AROS_UFCA(a2),\
378 __AROS_UFCA(a3),\
379 __AROS_UFCA(a4),\
380 __AROS_UFCA(a5),\
381 __AROS_UFCA(a6),\
382 __AROS_UFCA(a7)\
384 #define AROS_UFC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
385 (((__AROS_UFC_PREFIX t(*)(\
386 __AROS_UFPA(a1),\
387 __AROS_UFPA(a2),\
388 __AROS_UFPA(a3),\
389 __AROS_UFPA(a4),\
390 __AROS_UFPA(a5),\
391 __AROS_UFPA(a6),\
392 __AROS_UFPA(a7),\
393 __AROS_UFPA(a8)\
394 ))n)(\
395 __AROS_UFCA(a1),\
396 __AROS_UFCA(a2),\
397 __AROS_UFCA(a3),\
398 __AROS_UFCA(a4),\
399 __AROS_UFCA(a5),\
400 __AROS_UFCA(a6),\
401 __AROS_UFCA(a7),\
402 __AROS_UFCA(a8)\
404 #define AROS_UFC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
405 (((__AROS_UFC_PREFIX t(*)(\
406 __AROS_UFPA(a1),\
407 __AROS_UFPA(a2),\
408 __AROS_UFPA(a3),\
409 __AROS_UFPA(a4),\
410 __AROS_UFPA(a5),\
411 __AROS_UFPA(a6),\
412 __AROS_UFPA(a7),\
413 __AROS_UFPA(a8),\
414 __AROS_UFPA(a9)\
415 ))n)(\
416 __AROS_UFCA(a1),\
417 __AROS_UFCA(a2),\
418 __AROS_UFCA(a3),\
419 __AROS_UFCA(a4),\
420 __AROS_UFCA(a5),\
421 __AROS_UFCA(a6),\
422 __AROS_UFCA(a7),\
423 __AROS_UFCA(a8),\
424 __AROS_UFCA(a9)\
426 #define AROS_UFC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
427 (((__AROS_UFC_PREFIX t(*)(\
428 __AROS_UFPA(a1),\
429 __AROS_UFPA(a2),\
430 __AROS_UFPA(a3),\
431 __AROS_UFPA(a4),\
432 __AROS_UFPA(a5),\
433 __AROS_UFPA(a6),\
434 __AROS_UFPA(a7),\
435 __AROS_UFPA(a8),\
436 __AROS_UFPA(a9),\
437 __AROS_UFPA(a10)\
438 ))n)(\
439 __AROS_UFCA(a1),\
440 __AROS_UFCA(a2),\
441 __AROS_UFCA(a3),\
442 __AROS_UFCA(a4),\
443 __AROS_UFCA(a5),\
444 __AROS_UFCA(a6),\
445 __AROS_UFCA(a7),\
446 __AROS_UFCA(a8),\
447 __AROS_UFCA(a9),\
448 __AROS_UFCA(a10)\
450 #define AROS_UFC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
451 (((__AROS_UFC_PREFIX t(*)(\
452 __AROS_UFPA(a1),\
453 __AROS_UFPA(a2),\
454 __AROS_UFPA(a3),\
455 __AROS_UFPA(a4),\
456 __AROS_UFPA(a5),\
457 __AROS_UFPA(a6),\
458 __AROS_UFPA(a7),\
459 __AROS_UFPA(a8),\
460 __AROS_UFPA(a9),\
461 __AROS_UFPA(a10),\
462 __AROS_UFPA(a11)\
463 ))n)(\
464 __AROS_UFCA(a1),\
465 __AROS_UFCA(a2),\
466 __AROS_UFCA(a3),\
467 __AROS_UFCA(a4),\
468 __AROS_UFCA(a5),\
469 __AROS_UFCA(a6),\
470 __AROS_UFCA(a7),\
471 __AROS_UFCA(a8),\
472 __AROS_UFCA(a9),\
473 __AROS_UFCA(a10),\
474 __AROS_UFCA(a11)\
476 #define AROS_UFC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
477 (((__AROS_UFC_PREFIX t(*)(\
478 __AROS_UFPA(a1),\
479 __AROS_UFPA(a2),\
480 __AROS_UFPA(a3),\
481 __AROS_UFPA(a4),\
482 __AROS_UFPA(a5),\
483 __AROS_UFPA(a6),\
484 __AROS_UFPA(a7),\
485 __AROS_UFPA(a8),\
486 __AROS_UFPA(a9),\
487 __AROS_UFPA(a10),\
488 __AROS_UFPA(a11),\
489 __AROS_UFPA(a12)\
490 ))n)(\
491 __AROS_UFCA(a1),\
492 __AROS_UFCA(a2),\
493 __AROS_UFCA(a3),\
494 __AROS_UFCA(a4),\
495 __AROS_UFCA(a5),\
496 __AROS_UFCA(a6),\
497 __AROS_UFCA(a7),\
498 __AROS_UFCA(a8),\
499 __AROS_UFCA(a9),\
500 __AROS_UFCA(a10),\
501 __AROS_UFCA(a11),\
502 __AROS_UFCA(a12)\
504 #define AROS_UFC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
505 (((__AROS_UFC_PREFIX t(*)(\
506 __AROS_UFPA(a1),\
507 __AROS_UFPA(a2),\
508 __AROS_UFPA(a3),\
509 __AROS_UFPA(a4),\
510 __AROS_UFPA(a5),\
511 __AROS_UFPA(a6),\
512 __AROS_UFPA(a7),\
513 __AROS_UFPA(a8),\
514 __AROS_UFPA(a9),\
515 __AROS_UFPA(a10),\
516 __AROS_UFPA(a11),\
517 __AROS_UFPA(a12),\
518 __AROS_UFPA(a13)\
519 ))n)(\
520 __AROS_UFCA(a1),\
521 __AROS_UFCA(a2),\
522 __AROS_UFCA(a3),\
523 __AROS_UFCA(a4),\
524 __AROS_UFCA(a5),\
525 __AROS_UFCA(a6),\
526 __AROS_UFCA(a7),\
527 __AROS_UFCA(a8),\
528 __AROS_UFCA(a9),\
529 __AROS_UFCA(a10),\
530 __AROS_UFCA(a11),\
531 __AROS_UFCA(a12),\
532 __AROS_UFCA(a13)\
534 #define AROS_UFC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
535 (((__AROS_UFC_PREFIX t(*)(\
536 __AROS_UFPA(a1),\
537 __AROS_UFPA(a2),\
538 __AROS_UFPA(a3),\
539 __AROS_UFPA(a4),\
540 __AROS_UFPA(a5),\
541 __AROS_UFPA(a6),\
542 __AROS_UFPA(a7),\
543 __AROS_UFPA(a8),\
544 __AROS_UFPA(a9),\
545 __AROS_UFPA(a10),\
546 __AROS_UFPA(a11),\
547 __AROS_UFPA(a12),\
548 __AROS_UFPA(a13),\
549 __AROS_UFPA(a14)\
550 ))n)(\
551 __AROS_UFCA(a1),\
552 __AROS_UFCA(a2),\
553 __AROS_UFCA(a3),\
554 __AROS_UFCA(a4),\
555 __AROS_UFCA(a5),\
556 __AROS_UFCA(a6),\
557 __AROS_UFCA(a7),\
558 __AROS_UFCA(a8),\
559 __AROS_UFCA(a9),\
560 __AROS_UFCA(a10),\
561 __AROS_UFCA(a11),\
562 __AROS_UFCA(a12),\
563 __AROS_UFCA(a13),\
564 __AROS_UFCA(a14)\
566 #define AROS_UFC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
567 (((__AROS_UFC_PREFIX t(*)(\
568 __AROS_UFPA(a1),\
569 __AROS_UFPA(a2),\
570 __AROS_UFPA(a3),\
571 __AROS_UFPA(a4),\
572 __AROS_UFPA(a5),\
573 __AROS_UFPA(a6),\
574 __AROS_UFPA(a7),\
575 __AROS_UFPA(a8),\
576 __AROS_UFPA(a9),\
577 __AROS_UFPA(a10),\
578 __AROS_UFPA(a11),\
579 __AROS_UFPA(a12),\
580 __AROS_UFPA(a13),\
581 __AROS_UFPA(a14),\
582 __AROS_UFPA(a15)\
583 ))n)(\
584 __AROS_UFCA(a1),\
585 __AROS_UFCA(a2),\
586 __AROS_UFCA(a3),\
587 __AROS_UFCA(a4),\
588 __AROS_UFCA(a5),\
589 __AROS_UFCA(a6),\
590 __AROS_UFCA(a7),\
591 __AROS_UFCA(a8),\
592 __AROS_UFCA(a9),\
593 __AROS_UFCA(a10),\
594 __AROS_UFCA(a11),\
595 __AROS_UFCA(a12),\
596 __AROS_UFCA(a13),\
597 __AROS_UFCA(a14),\
598 __AROS_UFCA(a15)\
600 #define AROS_UFC0NR AROS_UFC0
601 #define AROS_UFC1NR AROS_UFC1
602 #define AROS_UFC2NR AROS_UFC2
603 #define AROS_UFC3NR AROS_UFC3
604 #define AROS_UFC4NR AROS_UFC4
605 #define AROS_UFC5NR AROS_UFC5
606 #define AROS_UFC6NR AROS_UFC6
607 #define AROS_UFC7NR AROS_UFC7
608 #define AROS_UFC8NR AROS_UFC8
609 #define AROS_UFC9NR AROS_UFC9
610 #define AROS_UFC10NR AROS_UFC10
611 #define AROS_UFC11NR AROS_UFC11
612 #define AROS_UFC12NR AROS_UFC12
613 #define AROS_UFC13NR AROS_UFC13
614 #define AROS_UFC14NR AROS_UFC14
615 #define AROS_UFC15NR AROS_UFC15
616 #endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
618 /* Prototypes for user functions */
619 # define AROS_UFP0(t,n) \
620 __AROS_UFP_PREFIX t n (void)
621 # define AROS_UFP1(t,n,a1) \
622 __AROS_UFP_PREFIX t n (\
623 __AROS_UFPA(a1))
624 # define AROS_UFP2(t,n,a1,a2) \
625 __AROS_UFP_PREFIX t n (\
626 __AROS_UFPA(a1),\
627 __AROS_UFPA(a2))
628 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
629 # define AROS_UFP2S(t,n,a1,a2) \
630 __AROS_UFP_PREFIX static t n (\
631 __AROS_UFPA(a1),\
632 __AROS_UFPA(a2))
633 # else
634 # define AROS_UFP2S(t,n,a1,a2) \
635 __AROS_UFP_PREFIX t n (\
636 __AROS_UFPA(a1),\
637 __AROS_UFPA(a2))
638 # endif
639 # define AROS_UFP3(t,n,a1,a2,a3) \
640 __AROS_UFP_PREFIX t n (\
641 __AROS_UFPA(a1),\
642 __AROS_UFPA(a2),\
643 __AROS_UFPA(a3))
644 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
645 # define AROS_UFP3S(t,n,a1,a2,a3) \
646 __AROS_UFP_PREFIX static t n (\
647 __AROS_UFPA(a1),\
648 __AROS_UFPA(a2),\
649 __AROS_UFPA(a3))
650 # else
651 # define AROS_UFP3S(t,n,a1,a2,a3) \
652 __AROS_UFP_PREFIX t n (\
653 __AROS_UFPA(a1),\
654 __AROS_UFPA(a2),\
655 __AROS_UFPA(a3))
656 # endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
657 # define AROS_UFP4(t,n,a1,a2,a3,a4) \
658 __AROS_UFP_PREFIX t n (\
659 __AROS_UFPA(a1),\
660 __AROS_UFPA(a2),\
661 __AROS_UFPA(a3),\
662 __AROS_UFPA(a4))
663 # define AROS_UFP5(t,n,a1,a2,a3,a4,a5) \
664 __AROS_UFP_PREFIX t n (\
665 __AROS_UFPA(a1),\
666 __AROS_UFPA(a2),\
667 __AROS_UFPA(a3),\
668 __AROS_UFPA(a4),\
669 __AROS_UFPA(a5))
670 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
671 # define AROS_UFP5S(t,n,a1,a2,a3,a4,a5) \
672 __AROS_UFP_PREFIX static t n (\
673 __AROS_UFPA(a1),\
674 __AROS_UFPA(a2),\
675 __AROS_UFPA(a3),\
676 __AROS_UFPA(a4),\
677 __AROS_UFPA(a5))
678 # else
679 # define AROS_UFP5S(t,n,a1,a2,a3,a4,a5) \
680 __AROS_UFP_PREFIX t n (\
681 __AROS_UFPA(a1),\
682 __AROS_UFPA(a2),\
683 __AROS_UFPA(a3),\
684 __AROS_UFPA(a4),\
685 __AROS_UFPA(a5))
686 # endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
687 # define AROS_UFP6(t,n,a1,a2,a3,a4,a5,a6) \
688 __AROS_UFP_PREFIX t n (\
689 __AROS_UFPA(a1),\
690 __AROS_UFPA(a2),\
691 __AROS_UFPA(a3),\
692 __AROS_UFPA(a4),\
693 __AROS_UFPA(a5),\
694 __AROS_UFPA(a6))
695 # define AROS_UFP7(t,n,a1,a2,a3,a4,a5,a6,a7) \
696 __AROS_UFP_PREFIX t n (\
697 __AROS_UFPA(a1),\
698 __AROS_UFPA(a2),\
699 __AROS_UFPA(a3),\
700 __AROS_UFPA(a4),\
701 __AROS_UFPA(a5),\
702 __AROS_UFPA(a6),\
703 __AROS_UFPA(a7))
704 # define AROS_UFP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
705 __AROS_UFP_PREFIX t n (\
706 __AROS_UFPA(a1),\
707 __AROS_UFPA(a2),\
708 __AROS_UFPA(a3),\
709 __AROS_UFPA(a4),\
710 __AROS_UFPA(a5),\
711 __AROS_UFPA(a6),\
712 __AROS_UFPA(a7),\
713 __AROS_UFPA(a8))
714 # define AROS_UFP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
715 __AROS_UFP_PREFIX t n (\
716 __AROS_UFPA(a1),\
717 __AROS_UFPA(a2),\
718 __AROS_UFPA(a3),\
719 __AROS_UFPA(a4),\
720 __AROS_UFPA(a5),\
721 __AROS_UFPA(a6),\
722 __AROS_UFPA(a7),\
723 __AROS_UFPA(a8),\
724 __AROS_UFPA(a9))
725 # define AROS_UFP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
726 __AROS_UFP_PREFIX t n (\
727 __AROS_UFPA(a1),\
728 __AROS_UFPA(a2),\
729 __AROS_UFPA(a3),\
730 __AROS_UFPA(a4),\
731 __AROS_UFPA(a5),\
732 __AROS_UFPA(a6),\
733 __AROS_UFPA(a7),\
734 __AROS_UFPA(a8),\
735 __AROS_UFPA(a9),\
736 __AROS_UFPA(a10))
737 # define AROS_UFP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
738 __AROS_UFP_PREFIX t n (\
739 __AROS_UFPA(a1),\
740 __AROS_UFPA(a2),\
741 __AROS_UFPA(a3),\
742 __AROS_UFPA(a4),\
743 __AROS_UFPA(a5),\
744 __AROS_UFPA(a6),\
745 __AROS_UFPA(a7),\
746 __AROS_UFPA(a8),\
747 __AROS_UFPA(a9),\
748 __AROS_UFPA(a10),\
749 __AROS_UFPA(a11))
750 # define AROS_UFP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
751 __AROS_UFP_PREFIX t n (\
752 __AROS_UFPA(a1),\
753 __AROS_UFPA(a2),\
754 __AROS_UFPA(a3),\
755 __AROS_UFPA(a4),\
756 __AROS_UFPA(a5),\
757 __AROS_UFPA(a6),\
758 __AROS_UFPA(a7),\
759 __AROS_UFPA(a8),\
760 __AROS_UFPA(a9),\
761 __AROS_UFPA(a10),\
762 __AROS_UFPA(a11),\
763 __AROS_UFPA(a12))
764 # define AROS_UFP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
765 __AROS_UFP_PREFIX t n (\
766 __AROS_UFPA(a1),\
767 __AROS_UFPA(a2),\
768 __AROS_UFPA(a3),\
769 __AROS_UFPA(a4),\
770 __AROS_UFPA(a5),\
771 __AROS_UFPA(a6),\
772 __AROS_UFPA(a7),\
773 __AROS_UFPA(a8),\
774 __AROS_UFPA(a9),\
775 __AROS_UFPA(a10),\
776 __AROS_UFPA(a11),\
777 __AROS_UFPA(a12),\
778 __AROS_UFPA(a13))
779 # define AROS_UFP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
780 __AROS_UFP_PREFIX t n (\
781 __AROS_UFPA(a1),\
782 __AROS_UFPA(a2),\
783 __AROS_UFPA(a3),\
784 __AROS_UFPA(a4),\
785 __AROS_UFPA(a5),\
786 __AROS_UFPA(a6),\
787 __AROS_UFPA(a7),\
788 __AROS_UFPA(a8),\
789 __AROS_UFPA(a9),\
790 __AROS_UFPA(a10),\
791 __AROS_UFPA(a11),\
792 __AROS_UFPA(a12),\
793 __AROS_UFPA(a13),\
794 __AROS_UFPA(a14))
795 # define AROS_UFP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
796 __AROS_UFP_PREFIX t n (\
797 __AROS_UFPA(a1),\
798 __AROS_UFPA(a2),\
799 __AROS_UFPA(a3),\
800 __AROS_UFPA(a4),\
801 __AROS_UFPA(a5),\
802 __AROS_UFPA(a6),\
803 __AROS_UFPA(a7),\
804 __AROS_UFPA(a8),\
805 __AROS_UFPA(a9),\
806 __AROS_UFPA(a10),\
807 __AROS_UFPA(a11),\
808 __AROS_UFPA(a12),\
809 __AROS_UFPA(a13),\
810 __AROS_UFPA(a14),\
811 __AROS_UFPA(a15))
813 #endif /* !__AROS_CPU_SPECIFIC_ASMCALLS */
814 #define AROS_UFHA(type,name,reg) type,name,reg
815 #define AROS_UFPA(type,name,reg) type,name,reg
816 #define AROS_UFCA(type,name,reg) type,name,reg
818 #ifndef AROS_USERFUNC_INIT
819 # define AROS_USERFUNC_INIT {
820 #endif
821 #ifndef AROS_USERFUNC_EXIT
822 # define AROS_USERFUNC_EXIT }}
823 #endif
825 /* DOS/CreateProc() entry point definition
827 #ifndef AROS_PROCH
828 struct ExecBase;
830 #define AROS_PROCH(n, _argptr, _argsize, _SysBase) \
831 AROS_UFH3(SIPTR, n, \
832 AROS_UFHA(STRPTR, _argptr, A0), \
833 AROS_UFHA(ULONG, _argsize, D0), \
834 AROS_UFHA(struct ExecBase *, _SysBase, A6))
835 #endif
836 #ifndef AROS_PROCP
837 #define AROS_PROCP(n) \
838 AROS_UFP3(SIPTR, n, \
839 AROS_UFPA(STRPTR, _argptr, A0), \
840 AROS_UFPA(ULONG, _argsize, D0), \
841 AROS_UFPA(struct ExecBase *, _SysBase, A6))
842 #endif
843 #ifndef AROS_PROCC
844 #define AROS_PROCC(n) \
845 AROS_UFC3(SIPTR, n, \
846 AROS_UFCA(STRPTR, _argptr, A0), \
847 AROS_UFCA(ULONG, _argsize, D0), \
848 AROS_UFCA(struct ExecBase *, _SysBase, A6))
849 #endif
851 #define AROS_PROCFUNC_INIT AROS_USERFUNC_INIT
852 #define AROS_PROCFUNC_EXIT AROS_USERFUNC_EXIT
854 /******************************************************************************
855 ***** ENDE aros/asmcall.h
856 ******************************************************************************/
858 #endif /* AROS_ASMCALL_H */