make fat.handler build again with debug enabled
[tangerine.git] / compiler / arossupport / include / asmcall.h
blobdafd0026a162b4170eac53247d4b6612368d1062
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 #ifndef __typedef_VOID_FUNC
61 #define __typedef_VOID_FUNC
62 typedef void (*VOID_FUNC)();
63 #endif
64 #ifndef __typedef_LONG_FUNC
65 #define __typedef_LONG_FUNC
66 typedef int (*LONG_FUNC)();
67 #endif
68 #ifndef __typedef_ULONG_FUNC
69 #define __typedef_ULONG_FUNC
70 typedef unsigned int (*ULONG_FUNC)();
71 #endif
73 #ifndef __AROS_CPU_SPECIFIC_ASMCALLS
75 #if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) /* Function headers for user functions */
76 #define AROS_UFH0(t,n) \
77 __AROS_UFH_PREFIX t n (void) {
78 #define AROS_UFH1(t,n,a1) \
79 __AROS_UFH_PREFIX t n (\
80 __AROS_UFHA(a1)\
81 ) {
82 #define AROS_UFH2S(t,n,a1,a2) \
83 __AROS_UFH_PREFIX static t n (\
84 __AROS_UFHA(a1),\
85 __AROS_UFHA(a2)\
86 ) {
87 #define AROS_UFH2(t,n,a1,a2) \
88 __AROS_UFH_PREFIX t n (\
89 __AROS_UFHA(a1),\
90 __AROS_UFHA(a2)\
91 ) {
92 #define AROS_UFH3(t,n,a1,a2,a3) \
93 __AROS_UFH_PREFIX t n (\
94 __AROS_UFHA(a1),\
95 __AROS_UFHA(a2),\
96 __AROS_UFHA(a3)\
97 ) {
98 #define AROS_UFH3S(t,n,a1,a2,a3) \
99 __AROS_UFH_PREFIX static t n (\
100 __AROS_UFHA(a1),\
101 __AROS_UFHA(a2),\
102 __AROS_UFHA(a3)\
104 #define AROS_UFH4(t,n,a1,a2,a3,a4) \
105 __AROS_UFH_PREFIX t n (\
106 __AROS_UFHA(a1),\
107 __AROS_UFHA(a2),\
108 __AROS_UFHA(a3),\
109 __AROS_UFHA(a4)\
111 #define AROS_UFH5(t,n,a1,a2,a3,a4,a5) \
112 __AROS_UFH_PREFIX t n (\
113 __AROS_UFHA(a1),\
114 __AROS_UFHA(a2),\
115 __AROS_UFHA(a3),\
116 __AROS_UFHA(a4),\
117 __AROS_UFHA(a5)\
119 #define AROS_UFH5S(t,n,a1,a2,a3,a4,a5) \
120 __AROS_UFH_PREFIX static t n (\
121 __AROS_UFHA(a1),\
122 __AROS_UFHA(a2),\
123 __AROS_UFHA(a3),\
124 __AROS_UFHA(a4),\
125 __AROS_UFHA(a5)\
127 #define AROS_UFH6(t,n,a1,a2,a3,a4,a5,a6) \
128 __AROS_UFH_PREFIX t n (\
129 __AROS_UFHA(a1),\
130 __AROS_UFHA(a2),\
131 __AROS_UFHA(a3),\
132 __AROS_UFHA(a4),\
133 __AROS_UFHA(a5),\
134 __AROS_UFHA(a6)\
136 #define AROS_UFH7(t,n,a1,a2,a3,a4,a5,a6,a7) \
137 __AROS_UFH_PREFIX t n (\
138 __AROS_UFHA(a1),\
139 __AROS_UFHA(a2),\
140 __AROS_UFHA(a3),\
141 __AROS_UFHA(a4),\
142 __AROS_UFHA(a5),\
143 __AROS_UFHA(a6),\
144 __AROS_UFHA(a7)\
146 #define AROS_UFH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
147 __AROS_UFH_PREFIX t n (\
148 __AROS_UFHA(a1),\
149 __AROS_UFHA(a2),\
150 __AROS_UFHA(a3),\
151 __AROS_UFHA(a4),\
152 __AROS_UFHA(a5),\
153 __AROS_UFHA(a6),\
154 __AROS_UFHA(a7),\
155 __AROS_UFHA(a8)\
157 #define AROS_UFH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
158 __AROS_UFH_PREFIX t n (\
159 __AROS_UFHA(a1),\
160 __AROS_UFHA(a2),\
161 __AROS_UFHA(a3),\
162 __AROS_UFHA(a4),\
163 __AROS_UFHA(a5),\
164 __AROS_UFHA(a6),\
165 __AROS_UFHA(a7),\
166 __AROS_UFHA(a8),\
167 __AROS_UFHA(a9)\
169 #define AROS_UFH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
170 __AROS_UFH_PREFIX t n (\
171 __AROS_UFHA(a1),\
172 __AROS_UFHA(a2),\
173 __AROS_UFHA(a3),\
174 __AROS_UFHA(a4),\
175 __AROS_UFHA(a5),\
176 __AROS_UFHA(a6),\
177 __AROS_UFHA(a7),\
178 __AROS_UFHA(a8),\
179 __AROS_UFHA(a9),\
180 __AROS_UFHA(a10)\
182 #define AROS_UFH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
183 __AROS_UFH_PREFIX t n (\
184 __AROS_UFHA(a1),\
185 __AROS_UFHA(a2),\
186 __AROS_UFHA(a3),\
187 __AROS_UFHA(a4),\
188 __AROS_UFHA(a5),\
189 __AROS_UFHA(a6),\
190 __AROS_UFHA(a7),\
191 __AROS_UFHA(a8),\
192 __AROS_UFHA(a9),\
193 __AROS_UFHA(a10),\
194 __AROS_UFHA(a11)\
196 #define AROS_UFH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
197 __AROS_UFH_PREFIX t n (\
198 __AROS_UFHA(a1),\
199 __AROS_UFHA(a2),\
200 __AROS_UFHA(a3),\
201 __AROS_UFHA(a4),\
202 __AROS_UFHA(a5),\
203 __AROS_UFHA(a6),\
204 __AROS_UFHA(a7),\
205 __AROS_UFHA(a8),\
206 __AROS_UFHA(a9),\
207 __AROS_UFHA(a10),\
208 __AROS_UFHA(a11),\
209 __AROS_UFHA(a12)\
211 #define AROS_UFH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
212 __AROS_UFH_PREFIX t n (\
213 __AROS_UFHA(a1),\
214 __AROS_UFHA(a2),\
215 __AROS_UFHA(a3),\
216 __AROS_UFHA(a4),\
217 __AROS_UFHA(a5),\
218 __AROS_UFHA(a6),\
219 __AROS_UFHA(a7),\
220 __AROS_UFHA(a8),\
221 __AROS_UFHA(a9),\
222 __AROS_UFHA(a10),\
223 __AROS_UFHA(a11),\
224 __AROS_UFHA(a12),\
225 __AROS_UFHA(a13)\
227 #define AROS_UFH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
228 __AROS_UFH_PREFIX t n (\
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),\
239 __AROS_UFHA(a11),\
240 __AROS_UFHA(a12),\
241 __AROS_UFHA(a13),\
242 __AROS_UFHA(a14)\
244 #define AROS_UFH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
245 __AROS_UFH_PREFIX t n (\
246 __AROS_UFHA(a1),\
247 __AROS_UFHA(a2),\
248 __AROS_UFHA(a3),\
249 __AROS_UFHA(a4),\
250 __AROS_UFHA(a5),\
251 __AROS_UFHA(a6),\
252 __AROS_UFHA(a7),\
253 __AROS_UFHA(a8),\
254 __AROS_UFHA(a9),\
255 __AROS_UFHA(a10),\
256 __AROS_UFHA(a11),\
257 __AROS_UFHA(a12),\
258 __AROS_UFHA(a13),\
259 __AROS_UFHA(a14),\
260 __AROS_UFHA(a15)\
263 /* Call a user function */
264 #define AROS_UFC0(t,n) \
265 (((__AROS_UFC_PREFIX t(*)(void))n)())
266 #define AROS_UFC1(t,n,a1) \
267 (((__AROS_UFC_PREFIX t(*)(\
268 __AROS_UFPA(a1)\
269 ))n)(\
270 __AROS_UFCA(a1)\
272 #define AROS_UFC2(t,n,a1,a2) \
273 (((__AROS_UFC_PREFIX t(*)(\
274 __AROS_UFPA(a1),\
275 __AROS_UFPA(a2)\
276 ))n)(\
277 __AROS_UFCA(a1),\
278 __AROS_UFCA(a2)\
280 #define AROS_UFC3(t,n,a1,a2,a3) \
281 (((__AROS_UFC_PREFIX t(*)(\
282 __AROS_UFPA(a1),\
283 __AROS_UFPA(a2),\
284 __AROS_UFPA(a3)\
285 ))n)(\
286 __AROS_UFCA(a1),\
287 __AROS_UFCA(a2),\
288 __AROS_UFCA(a3)\
290 #define AROS_UFC4(t,n,a1,a2,a3,a4) \
291 (((__AROS_UFC_PREFIX t(*)(\
292 __AROS_UFPA(a1),\
293 __AROS_UFPA(a2),\
294 __AROS_UFPA(a3),\
295 __AROS_UFPA(a4)\
296 ))n)(\
297 __AROS_UFCA(a1),\
298 __AROS_UFCA(a2),\
299 __AROS_UFCA(a3),\
300 __AROS_UFCA(a4)\
302 #define AROS_UFC5(t,n,a1,a2,a3,a4,a5) \
303 (((__AROS_UFC_PREFIX t(*)(\
304 __AROS_UFPA(a1),\
305 __AROS_UFPA(a2),\
306 __AROS_UFPA(a3),\
307 __AROS_UFPA(a4),\
308 __AROS_UFPA(a5)\
309 ))n)(\
310 __AROS_UFCA(a1),\
311 __AROS_UFCA(a2),\
312 __AROS_UFCA(a3),\
313 __AROS_UFCA(a4),\
314 __AROS_UFCA(a5)\
316 #define AROS_UFC6(t,n,a1,a2,a3,a4,a5,a6) \
317 (((__AROS_UFC_PREFIX t(*)(\
318 __AROS_UFPA(a1),\
319 __AROS_UFPA(a2),\
320 __AROS_UFPA(a3),\
321 __AROS_UFPA(a4),\
322 __AROS_UFPA(a5),\
323 __AROS_UFPA(a6)\
324 ))n)(\
325 __AROS_UFCA(a1),\
326 __AROS_UFCA(a2),\
327 __AROS_UFCA(a3),\
328 __AROS_UFCA(a4),\
329 __AROS_UFCA(a5),\
330 __AROS_UFCA(a6)\
332 #define AROS_UFC7(t,n,a1,a2,a3,a4,a5,a6,a7) \
333 (((__AROS_UFC_PREFIX t(*)(\
334 __AROS_UFPA(a1),\
335 __AROS_UFPA(a2),\
336 __AROS_UFPA(a3),\
337 __AROS_UFPA(a4),\
338 __AROS_UFPA(a5),\
339 __AROS_UFPA(a6),\
340 __AROS_UFPA(a7)\
341 ))n)(\
342 __AROS_UFCA(a1),\
343 __AROS_UFCA(a2),\
344 __AROS_UFCA(a3),\
345 __AROS_UFCA(a4),\
346 __AROS_UFCA(a5),\
347 __AROS_UFCA(a6),\
348 __AROS_UFCA(a7)\
350 #define AROS_UFC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
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 __AROS_UFPA(a7),\
359 __AROS_UFPA(a8)\
360 ))n)(\
361 __AROS_UFCA(a1),\
362 __AROS_UFCA(a2),\
363 __AROS_UFCA(a3),\
364 __AROS_UFCA(a4),\
365 __AROS_UFCA(a5),\
366 __AROS_UFCA(a6),\
367 __AROS_UFCA(a7),\
368 __AROS_UFCA(a8)\
370 #define AROS_UFC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
371 (((__AROS_UFC_PREFIX t(*)(\
372 __AROS_UFPA(a1),\
373 __AROS_UFPA(a2),\
374 __AROS_UFPA(a3),\
375 __AROS_UFPA(a4),\
376 __AROS_UFPA(a5),\
377 __AROS_UFPA(a6),\
378 __AROS_UFPA(a7),\
379 __AROS_UFPA(a8),\
380 __AROS_UFPA(a9)\
381 ))n)(\
382 __AROS_UFCA(a1),\
383 __AROS_UFCA(a2),\
384 __AROS_UFCA(a3),\
385 __AROS_UFCA(a4),\
386 __AROS_UFCA(a5),\
387 __AROS_UFCA(a6),\
388 __AROS_UFCA(a7),\
389 __AROS_UFCA(a8),\
390 __AROS_UFCA(a9)\
392 #define AROS_UFC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
393 (((__AROS_UFC_PREFIX t(*)(\
394 __AROS_UFPA(a1),\
395 __AROS_UFPA(a2),\
396 __AROS_UFPA(a3),\
397 __AROS_UFPA(a4),\
398 __AROS_UFPA(a5),\
399 __AROS_UFPA(a6),\
400 __AROS_UFPA(a7),\
401 __AROS_UFPA(a8),\
402 __AROS_UFPA(a9),\
403 __AROS_UFPA(a10)\
404 ))n)(\
405 __AROS_UFCA(a1),\
406 __AROS_UFCA(a2),\
407 __AROS_UFCA(a3),\
408 __AROS_UFCA(a4),\
409 __AROS_UFCA(a5),\
410 __AROS_UFCA(a6),\
411 __AROS_UFCA(a7),\
412 __AROS_UFCA(a8),\
413 __AROS_UFCA(a9),\
414 __AROS_UFCA(a10)\
416 #define AROS_UFC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
417 (((__AROS_UFC_PREFIX t(*)(\
418 __AROS_UFPA(a1),\
419 __AROS_UFPA(a2),\
420 __AROS_UFPA(a3),\
421 __AROS_UFPA(a4),\
422 __AROS_UFPA(a5),\
423 __AROS_UFPA(a6),\
424 __AROS_UFPA(a7),\
425 __AROS_UFPA(a8),\
426 __AROS_UFPA(a9),\
427 __AROS_UFPA(a10),\
428 __AROS_UFPA(a11)\
429 ))n)(\
430 __AROS_UFCA(a1),\
431 __AROS_UFCA(a2),\
432 __AROS_UFCA(a3),\
433 __AROS_UFCA(a4),\
434 __AROS_UFCA(a5),\
435 __AROS_UFCA(a6),\
436 __AROS_UFCA(a7),\
437 __AROS_UFCA(a8),\
438 __AROS_UFCA(a9),\
439 __AROS_UFCA(a10),\
440 __AROS_UFCA(a11)\
442 #define AROS_UFC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
443 (((__AROS_UFC_PREFIX t(*)(\
444 __AROS_UFPA(a1),\
445 __AROS_UFPA(a2),\
446 __AROS_UFPA(a3),\
447 __AROS_UFPA(a4),\
448 __AROS_UFPA(a5),\
449 __AROS_UFPA(a6),\
450 __AROS_UFPA(a7),\
451 __AROS_UFPA(a8),\
452 __AROS_UFPA(a9),\
453 __AROS_UFPA(a10),\
454 __AROS_UFPA(a11),\
455 __AROS_UFPA(a12)\
456 ))n)(\
457 __AROS_UFCA(a1),\
458 __AROS_UFCA(a2),\
459 __AROS_UFCA(a3),\
460 __AROS_UFCA(a4),\
461 __AROS_UFCA(a5),\
462 __AROS_UFCA(a6),\
463 __AROS_UFCA(a7),\
464 __AROS_UFCA(a8),\
465 __AROS_UFCA(a9),\
466 __AROS_UFCA(a10),\
467 __AROS_UFCA(a11),\
468 __AROS_UFCA(a12)\
470 #define AROS_UFC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
471 (((__AROS_UFC_PREFIX t(*)(\
472 __AROS_UFPA(a1),\
473 __AROS_UFPA(a2),\
474 __AROS_UFPA(a3),\
475 __AROS_UFPA(a4),\
476 __AROS_UFPA(a5),\
477 __AROS_UFPA(a6),\
478 __AROS_UFPA(a7),\
479 __AROS_UFPA(a8),\
480 __AROS_UFPA(a9),\
481 __AROS_UFPA(a10),\
482 __AROS_UFPA(a11),\
483 __AROS_UFPA(a12),\
484 __AROS_UFPA(a13)\
485 ))n)(\
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 __AROS_UFCA(a11),\
497 __AROS_UFCA(a12),\
498 __AROS_UFCA(a13)\
500 #define AROS_UFC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
501 (((__AROS_UFC_PREFIX t(*)(\
502 __AROS_UFPA(a1),\
503 __AROS_UFPA(a2),\
504 __AROS_UFPA(a3),\
505 __AROS_UFPA(a4),\
506 __AROS_UFPA(a5),\
507 __AROS_UFPA(a6),\
508 __AROS_UFPA(a7),\
509 __AROS_UFPA(a8),\
510 __AROS_UFPA(a9),\
511 __AROS_UFPA(a10),\
512 __AROS_UFPA(a11),\
513 __AROS_UFPA(a12),\
514 __AROS_UFPA(a13),\
515 __AROS_UFPA(a14)\
516 ))n)(\
517 __AROS_UFCA(a1),\
518 __AROS_UFCA(a2),\
519 __AROS_UFCA(a3),\
520 __AROS_UFCA(a4),\
521 __AROS_UFCA(a5),\
522 __AROS_UFCA(a6),\
523 __AROS_UFCA(a7),\
524 __AROS_UFCA(a8),\
525 __AROS_UFCA(a9),\
526 __AROS_UFCA(a10),\
527 __AROS_UFCA(a11),\
528 __AROS_UFCA(a12),\
529 __AROS_UFCA(a13),\
530 __AROS_UFCA(a14)\
532 #define AROS_UFC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
533 (((__AROS_UFC_PREFIX t(*)(\
534 __AROS_UFPA(a1),\
535 __AROS_UFPA(a2),\
536 __AROS_UFPA(a3),\
537 __AROS_UFPA(a4),\
538 __AROS_UFPA(a5),\
539 __AROS_UFPA(a6),\
540 __AROS_UFPA(a7),\
541 __AROS_UFPA(a8),\
542 __AROS_UFPA(a9),\
543 __AROS_UFPA(a10),\
544 __AROS_UFPA(a11),\
545 __AROS_UFPA(a12),\
546 __AROS_UFPA(a13),\
547 __AROS_UFPA(a14),\
548 __AROS_UFPA(a15)\
549 ))n)(\
550 __AROS_UFCA(a1),\
551 __AROS_UFCA(a2),\
552 __AROS_UFCA(a3),\
553 __AROS_UFCA(a4),\
554 __AROS_UFCA(a5),\
555 __AROS_UFCA(a6),\
556 __AROS_UFCA(a7),\
557 __AROS_UFCA(a8),\
558 __AROS_UFCA(a9),\
559 __AROS_UFCA(a10),\
560 __AROS_UFCA(a11),\
561 __AROS_UFCA(a12),\
562 __AROS_UFCA(a13),\
563 __AROS_UFCA(a14),\
564 __AROS_UFCA(a15)\
566 #endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
568 /* Prototypes for user functions */
569 # define AROS_UFP0(t,n) \
570 __AROS_UFP_PREFIX t n (void)
571 # define AROS_UFP1(t,n,a1) \
572 __AROS_UFP_PREFIX t n (\
573 __AROS_UFPA(a1))
574 # define AROS_UFP2(t,n,a1,a2) \
575 __AROS_UFP_PREFIX t n (\
576 __AROS_UFPA(a1),\
577 __AROS_UFPA(a2))
578 # define AROS_UFP3(t,n,a1,a2,a3) \
579 __AROS_UFP_PREFIX t n (\
580 __AROS_UFPA(a1),\
581 __AROS_UFPA(a2),\
582 __AROS_UFPA(a3))
583 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
584 # define AROS_UFP3S(t,n,a1,a2,a3) \
585 __AROS_UFP_PREFIX static t n (\
586 __AROS_UFPA(a1),\
587 __AROS_UFPA(a2),\
588 __AROS_UFPA(a3))
589 # else
590 # define AROS_UFP3S(t,n,a1,a2,a3) \
591 __AROS_UFP_PREFIX t n (\
592 __AROS_UFPA(a1),\
593 __AROS_UFPA(a2),\
594 __AROS_UFPA(a3))
595 # endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
596 # define AROS_UFP4(t,n,a1,a2,a3,a4) \
597 __AROS_UFP_PREFIX t n (\
598 __AROS_UFPA(a1),\
599 __AROS_UFPA(a2),\
600 __AROS_UFPA(a3),\
601 __AROS_UFPA(a4))
602 # define AROS_UFP5(t,n,a1,a2,a3,a4,a5) \
603 __AROS_UFP_PREFIX t n (\
604 __AROS_UFPA(a1),\
605 __AROS_UFPA(a2),\
606 __AROS_UFPA(a3),\
607 __AROS_UFPA(a4),\
608 __AROS_UFPA(a5))
609 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
610 # define AROS_UFP5S(t,n,a1,a2,a3,a4,a5) \
611 __AROS_UFP_PREFIX static t n (\
612 __AROS_UFPA(a1),\
613 __AROS_UFPA(a2),\
614 __AROS_UFPA(a3),\
615 __AROS_UFPA(a4),\
616 __AROS_UFPA(a5))
617 # else
618 # define AROS_UFP5S(t,n,a1,a2,a3,a4,a5) \
619 __AROS_UFP_PREFIX t n (\
620 __AROS_UFPA(a1),\
621 __AROS_UFPA(a2),\
622 __AROS_UFPA(a3),\
623 __AROS_UFPA(a4),\
624 __AROS_UFPA(a5))
625 # endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
626 # define AROS_UFP6(t,n,a1,a2,a3,a4,a5,a6) \
627 __AROS_UFP_PREFIX t n (\
628 __AROS_UFPA(a1),\
629 __AROS_UFPA(a2),\
630 __AROS_UFPA(a3),\
631 __AROS_UFPA(a4),\
632 __AROS_UFPA(a5),\
633 __AROS_UFPA(a6))
634 # define AROS_UFP7(t,n,a1,a2,a3,a4,a5,a6,a7) \
635 __AROS_UFP_PREFIX t n (\
636 __AROS_UFPA(a1),\
637 __AROS_UFPA(a2),\
638 __AROS_UFPA(a3),\
639 __AROS_UFPA(a4),\
640 __AROS_UFPA(a5),\
641 __AROS_UFPA(a6),\
642 __AROS_UFPA(a7))
643 # define AROS_UFP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
644 __AROS_UFP_PREFIX t n (\
645 __AROS_UFPA(a1),\
646 __AROS_UFPA(a2),\
647 __AROS_UFPA(a3),\
648 __AROS_UFPA(a4),\
649 __AROS_UFPA(a5),\
650 __AROS_UFPA(a6),\
651 __AROS_UFPA(a7),\
652 __AROS_UFPA(a8))
653 # define AROS_UFP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
654 __AROS_UFP_PREFIX t n (\
655 __AROS_UFPA(a1),\
656 __AROS_UFPA(a2),\
657 __AROS_UFPA(a3),\
658 __AROS_UFPA(a4),\
659 __AROS_UFPA(a5),\
660 __AROS_UFPA(a6),\
661 __AROS_UFPA(a7),\
662 __AROS_UFPA(a8),\
663 __AROS_UFPA(a9))
664 # define AROS_UFP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
665 __AROS_UFP_PREFIX t n (\
666 __AROS_UFPA(a1),\
667 __AROS_UFPA(a2),\
668 __AROS_UFPA(a3),\
669 __AROS_UFPA(a4),\
670 __AROS_UFPA(a5),\
671 __AROS_UFPA(a6),\
672 __AROS_UFPA(a7),\
673 __AROS_UFPA(a8),\
674 __AROS_UFPA(a9),\
675 __AROS_UFPA(a10))
676 # define AROS_UFP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
677 __AROS_UFP_PREFIX t n (\
678 __AROS_UFPA(a1),\
679 __AROS_UFPA(a2),\
680 __AROS_UFPA(a3),\
681 __AROS_UFPA(a4),\
682 __AROS_UFPA(a5),\
683 __AROS_UFPA(a6),\
684 __AROS_UFPA(a7),\
685 __AROS_UFPA(a8),\
686 __AROS_UFPA(a9),\
687 __AROS_UFPA(a10),\
688 __AROS_UFPA(a11))
689 # define AROS_UFP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
690 __AROS_UFP_PREFIX t n (\
691 __AROS_UFPA(a1),\
692 __AROS_UFPA(a2),\
693 __AROS_UFPA(a3),\
694 __AROS_UFPA(a4),\
695 __AROS_UFPA(a5),\
696 __AROS_UFPA(a6),\
697 __AROS_UFPA(a7),\
698 __AROS_UFPA(a8),\
699 __AROS_UFPA(a9),\
700 __AROS_UFPA(a10),\
701 __AROS_UFPA(a11),\
702 __AROS_UFPA(a12))
703 # define AROS_UFP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
704 __AROS_UFP_PREFIX t n (\
705 __AROS_UFPA(a1),\
706 __AROS_UFPA(a2),\
707 __AROS_UFPA(a3),\
708 __AROS_UFPA(a4),\
709 __AROS_UFPA(a5),\
710 __AROS_UFPA(a6),\
711 __AROS_UFPA(a7),\
712 __AROS_UFPA(a8),\
713 __AROS_UFPA(a9),\
714 __AROS_UFPA(a10),\
715 __AROS_UFPA(a11),\
716 __AROS_UFPA(a12),\
717 __AROS_UFPA(a13))
718 # define AROS_UFP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
719 __AROS_UFP_PREFIX t n (\
720 __AROS_UFPA(a1),\
721 __AROS_UFPA(a2),\
722 __AROS_UFPA(a3),\
723 __AROS_UFPA(a4),\
724 __AROS_UFPA(a5),\
725 __AROS_UFPA(a6),\
726 __AROS_UFPA(a7),\
727 __AROS_UFPA(a8),\
728 __AROS_UFPA(a9),\
729 __AROS_UFPA(a10),\
730 __AROS_UFPA(a11),\
731 __AROS_UFPA(a12),\
732 __AROS_UFPA(a13),\
733 __AROS_UFPA(a14))
734 # define AROS_UFP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
735 __AROS_UFP_PREFIX t n (\
736 __AROS_UFPA(a1),\
737 __AROS_UFPA(a2),\
738 __AROS_UFPA(a3),\
739 __AROS_UFPA(a4),\
740 __AROS_UFPA(a5),\
741 __AROS_UFPA(a6),\
742 __AROS_UFPA(a7),\
743 __AROS_UFPA(a8),\
744 __AROS_UFPA(a9),\
745 __AROS_UFPA(a10),\
746 __AROS_UFPA(a11),\
747 __AROS_UFPA(a12),\
748 __AROS_UFPA(a13),\
749 __AROS_UFPA(a14),\
750 __AROS_UFPA(a15))
752 #endif /* !__AROS_CPU_SPECIFIC_ASMCALLS */
753 #define AROS_UFHA(type,name,reg) type,name,reg
754 #define AROS_UFPA(type,name,reg) type,name,reg
755 #define AROS_UFCA(type,name,reg) type,name,reg
757 #ifndef AROS_USERFUNC_INIT
758 # define AROS_USERFUNC_INIT {
759 #endif
760 #ifndef AROS_USERFUNC_EXIT
761 # define AROS_USERFUNC_EXIT }}
762 #endif
764 /******************************************************************************
765 ***** ENDE aros/asmcall.h
766 ******************************************************************************/
768 #endif /* AROS_ASMCALL_H */