arm-native/processor.resource: build for raspi target
[AROS.git] / compiler / arossupport / include / asmcall.h
blob2fbf60a0348dce531d6ede6370f2449793357e9e
1 /*
2 Copyright © 1995-2015, 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_UFH0S(t,n) \
109 __AROS_UFH_PREFIX static t n (void) {
110 #define AROS_UFH1(t,n,a1) \
111 __AROS_UFH_PREFIX t n (\
112 __AROS_UFHA(a1)\
114 #define AROS_UFH1S(t,n,a1) \
115 __AROS_UFH_PREFIX static t n (\
116 __AROS_UFHA(a1)\
118 #define AROS_UFH2(t,n,a1,a2) \
119 __AROS_UFH_PREFIX t n (\
120 __AROS_UFHA(a1),\
121 __AROS_UFHA(a2)\
123 #define AROS_UFH2S(t,n,a1,a2) \
124 __AROS_UFH_PREFIX static t n (\
125 __AROS_UFHA(a1),\
126 __AROS_UFHA(a2)\
128 #define AROS_UFH3(t,n,a1,a2,a3) \
129 __AROS_UFH_PREFIX t n (\
130 __AROS_UFHA(a1),\
131 __AROS_UFHA(a2),\
132 __AROS_UFHA(a3)\
134 #define AROS_UFH3S(t,n,a1,a2,a3) \
135 __AROS_UFH_PREFIX static t n (\
136 __AROS_UFHA(a1),\
137 __AROS_UFHA(a2),\
138 __AROS_UFHA(a3)\
140 #define AROS_UFH4(t,n,a1,a2,a3,a4) \
141 __AROS_UFH_PREFIX t n (\
142 __AROS_UFHA(a1),\
143 __AROS_UFHA(a2),\
144 __AROS_UFHA(a3),\
145 __AROS_UFHA(a4)\
147 #define AROS_UFH4S(t,n,a1,a2,a3,a4) \
148 __AROS_UFH_PREFIX static t n (\
149 __AROS_UFHA(a1),\
150 __AROS_UFHA(a2),\
151 __AROS_UFHA(a3),\
152 __AROS_UFHA(a4)\
154 #define AROS_UFH5(t,n,a1,a2,a3,a4,a5) \
155 __AROS_UFH_PREFIX t n (\
156 __AROS_UFHA(a1),\
157 __AROS_UFHA(a2),\
158 __AROS_UFHA(a3),\
159 __AROS_UFHA(a4),\
160 __AROS_UFHA(a5)\
162 #define AROS_UFH5S(t,n,a1,a2,a3,a4,a5) \
163 __AROS_UFH_PREFIX static t n (\
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 (\
172 __AROS_UFHA(a1),\
173 __AROS_UFHA(a2),\
174 __AROS_UFHA(a3),\
175 __AROS_UFHA(a4),\
176 __AROS_UFHA(a5),\
177 __AROS_UFHA(a6)\
179 #define AROS_UFH7(t,n,a1,a2,a3,a4,a5,a6,a7) \
180 __AROS_UFH_PREFIX t n (\
181 __AROS_UFHA(a1),\
182 __AROS_UFHA(a2),\
183 __AROS_UFHA(a3),\
184 __AROS_UFHA(a4),\
185 __AROS_UFHA(a5),\
186 __AROS_UFHA(a6),\
187 __AROS_UFHA(a7)\
189 #define AROS_UFH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
190 __AROS_UFH_PREFIX t n (\
191 __AROS_UFHA(a1),\
192 __AROS_UFHA(a2),\
193 __AROS_UFHA(a3),\
194 __AROS_UFHA(a4),\
195 __AROS_UFHA(a5),\
196 __AROS_UFHA(a6),\
197 __AROS_UFHA(a7),\
198 __AROS_UFHA(a8)\
200 #define AROS_UFH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
201 __AROS_UFH_PREFIX t n (\
202 __AROS_UFHA(a1),\
203 __AROS_UFHA(a2),\
204 __AROS_UFHA(a3),\
205 __AROS_UFHA(a4),\
206 __AROS_UFHA(a5),\
207 __AROS_UFHA(a6),\
208 __AROS_UFHA(a7),\
209 __AROS_UFHA(a8),\
210 __AROS_UFHA(a9)\
212 #define AROS_UFH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
213 __AROS_UFH_PREFIX t n (\
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),\
223 __AROS_UFHA(a10)\
225 #define AROS_UFH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
226 __AROS_UFH_PREFIX t n (\
227 __AROS_UFHA(a1),\
228 __AROS_UFHA(a2),\
229 __AROS_UFHA(a3),\
230 __AROS_UFHA(a4),\
231 __AROS_UFHA(a5),\
232 __AROS_UFHA(a6),\
233 __AROS_UFHA(a7),\
234 __AROS_UFHA(a8),\
235 __AROS_UFHA(a9),\
236 __AROS_UFHA(a10),\
237 __AROS_UFHA(a11)\
239 #define AROS_UFH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
240 __AROS_UFH_PREFIX t n (\
241 __AROS_UFHA(a1),\
242 __AROS_UFHA(a2),\
243 __AROS_UFHA(a3),\
244 __AROS_UFHA(a4),\
245 __AROS_UFHA(a5),\
246 __AROS_UFHA(a6),\
247 __AROS_UFHA(a7),\
248 __AROS_UFHA(a8),\
249 __AROS_UFHA(a9),\
250 __AROS_UFHA(a10),\
251 __AROS_UFHA(a11),\
252 __AROS_UFHA(a12)\
254 #define AROS_UFH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
255 __AROS_UFH_PREFIX t n (\
256 __AROS_UFHA(a1),\
257 __AROS_UFHA(a2),\
258 __AROS_UFHA(a3),\
259 __AROS_UFHA(a4),\
260 __AROS_UFHA(a5),\
261 __AROS_UFHA(a6),\
262 __AROS_UFHA(a7),\
263 __AROS_UFHA(a8),\
264 __AROS_UFHA(a9),\
265 __AROS_UFHA(a10),\
266 __AROS_UFHA(a11),\
267 __AROS_UFHA(a12),\
268 __AROS_UFHA(a13)\
270 #define AROS_UFH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
271 __AROS_UFH_PREFIX t n (\
272 __AROS_UFHA(a1),\
273 __AROS_UFHA(a2),\
274 __AROS_UFHA(a3),\
275 __AROS_UFHA(a4),\
276 __AROS_UFHA(a5),\
277 __AROS_UFHA(a6),\
278 __AROS_UFHA(a7),\
279 __AROS_UFHA(a8),\
280 __AROS_UFHA(a9),\
281 __AROS_UFHA(a10),\
282 __AROS_UFHA(a11),\
283 __AROS_UFHA(a12),\
284 __AROS_UFHA(a13),\
285 __AROS_UFHA(a14)\
287 #define AROS_UFH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
288 __AROS_UFH_PREFIX t n (\
289 __AROS_UFHA(a1),\
290 __AROS_UFHA(a2),\
291 __AROS_UFHA(a3),\
292 __AROS_UFHA(a4),\
293 __AROS_UFHA(a5),\
294 __AROS_UFHA(a6),\
295 __AROS_UFHA(a7),\
296 __AROS_UFHA(a8),\
297 __AROS_UFHA(a9),\
298 __AROS_UFHA(a10),\
299 __AROS_UFHA(a11),\
300 __AROS_UFHA(a12),\
301 __AROS_UFHA(a13),\
302 __AROS_UFHA(a14),\
303 __AROS_UFHA(a15)\
306 /* Call a user function */
307 #define AROS_UFC0(t,n) \
308 (((__AROS_UFC_PREFIX t(*)(void))n)())
309 #define AROS_UFC1(t,n,a1) \
310 (((__AROS_UFC_PREFIX t(*)(\
311 __AROS_UFPA(a1)\
312 ))n)(\
313 __AROS_UFCA(a1)\
315 #define AROS_UFC2(t,n,a1,a2) \
316 (((__AROS_UFC_PREFIX t(*)(\
317 __AROS_UFPA(a1),\
318 __AROS_UFPA(a2)\
319 ))n)(\
320 __AROS_UFCA(a1),\
321 __AROS_UFCA(a2)\
323 #define AROS_UFC3(t,n,a1,a2,a3) \
324 (((__AROS_UFC_PREFIX t(*)(\
325 __AROS_UFPA(a1),\
326 __AROS_UFPA(a2),\
327 __AROS_UFPA(a3)\
328 ))n)(\
329 __AROS_UFCA(a1),\
330 __AROS_UFCA(a2),\
331 __AROS_UFCA(a3)\
333 #define AROS_UFC4(t,n,a1,a2,a3,a4) \
334 (((__AROS_UFC_PREFIX t(*)(\
335 __AROS_UFPA(a1),\
336 __AROS_UFPA(a2),\
337 __AROS_UFPA(a3),\
338 __AROS_UFPA(a4)\
339 ))n)(\
340 __AROS_UFCA(a1),\
341 __AROS_UFCA(a2),\
342 __AROS_UFCA(a3),\
343 __AROS_UFCA(a4)\
345 #define AROS_UFC5(t,n,a1,a2,a3,a4,a5) \
346 (((__AROS_UFC_PREFIX t(*)(\
347 __AROS_UFPA(a1),\
348 __AROS_UFPA(a2),\
349 __AROS_UFPA(a3),\
350 __AROS_UFPA(a4),\
351 __AROS_UFPA(a5)\
352 ))n)(\
353 __AROS_UFCA(a1),\
354 __AROS_UFCA(a2),\
355 __AROS_UFCA(a3),\
356 __AROS_UFCA(a4),\
357 __AROS_UFCA(a5)\
359 #define AROS_UFC6(t,n,a1,a2,a3,a4,a5,a6) \
360 (((__AROS_UFC_PREFIX t(*)(\
361 __AROS_UFPA(a1),\
362 __AROS_UFPA(a2),\
363 __AROS_UFPA(a3),\
364 __AROS_UFPA(a4),\
365 __AROS_UFPA(a5),\
366 __AROS_UFPA(a6)\
367 ))n)(\
368 __AROS_UFCA(a1),\
369 __AROS_UFCA(a2),\
370 __AROS_UFCA(a3),\
371 __AROS_UFCA(a4),\
372 __AROS_UFCA(a5),\
373 __AROS_UFCA(a6)\
375 #define AROS_UFC7(t,n,a1,a2,a3,a4,a5,a6,a7) \
376 (((__AROS_UFC_PREFIX t(*)(\
377 __AROS_UFPA(a1),\
378 __AROS_UFPA(a2),\
379 __AROS_UFPA(a3),\
380 __AROS_UFPA(a4),\
381 __AROS_UFPA(a5),\
382 __AROS_UFPA(a6),\
383 __AROS_UFPA(a7)\
384 ))n)(\
385 __AROS_UFCA(a1),\
386 __AROS_UFCA(a2),\
387 __AROS_UFCA(a3),\
388 __AROS_UFCA(a4),\
389 __AROS_UFCA(a5),\
390 __AROS_UFCA(a6),\
391 __AROS_UFCA(a7)\
393 #define AROS_UFC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
394 (((__AROS_UFC_PREFIX t(*)(\
395 __AROS_UFPA(a1),\
396 __AROS_UFPA(a2),\
397 __AROS_UFPA(a3),\
398 __AROS_UFPA(a4),\
399 __AROS_UFPA(a5),\
400 __AROS_UFPA(a6),\
401 __AROS_UFPA(a7),\
402 __AROS_UFPA(a8)\
403 ))n)(\
404 __AROS_UFCA(a1),\
405 __AROS_UFCA(a2),\
406 __AROS_UFCA(a3),\
407 __AROS_UFCA(a4),\
408 __AROS_UFCA(a5),\
409 __AROS_UFCA(a6),\
410 __AROS_UFCA(a7),\
411 __AROS_UFCA(a8)\
413 #define AROS_UFC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
414 (((__AROS_UFC_PREFIX t(*)(\
415 __AROS_UFPA(a1),\
416 __AROS_UFPA(a2),\
417 __AROS_UFPA(a3),\
418 __AROS_UFPA(a4),\
419 __AROS_UFPA(a5),\
420 __AROS_UFPA(a6),\
421 __AROS_UFPA(a7),\
422 __AROS_UFPA(a8),\
423 __AROS_UFPA(a9)\
424 ))n)(\
425 __AROS_UFCA(a1),\
426 __AROS_UFCA(a2),\
427 __AROS_UFCA(a3),\
428 __AROS_UFCA(a4),\
429 __AROS_UFCA(a5),\
430 __AROS_UFCA(a6),\
431 __AROS_UFCA(a7),\
432 __AROS_UFCA(a8),\
433 __AROS_UFCA(a9)\
435 #define AROS_UFC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
436 (((__AROS_UFC_PREFIX t(*)(\
437 __AROS_UFPA(a1),\
438 __AROS_UFPA(a2),\
439 __AROS_UFPA(a3),\
440 __AROS_UFPA(a4),\
441 __AROS_UFPA(a5),\
442 __AROS_UFPA(a6),\
443 __AROS_UFPA(a7),\
444 __AROS_UFPA(a8),\
445 __AROS_UFPA(a9),\
446 __AROS_UFPA(a10)\
447 ))n)(\
448 __AROS_UFCA(a1),\
449 __AROS_UFCA(a2),\
450 __AROS_UFCA(a3),\
451 __AROS_UFCA(a4),\
452 __AROS_UFCA(a5),\
453 __AROS_UFCA(a6),\
454 __AROS_UFCA(a7),\
455 __AROS_UFCA(a8),\
456 __AROS_UFCA(a9),\
457 __AROS_UFCA(a10)\
459 #define AROS_UFC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
460 (((__AROS_UFC_PREFIX t(*)(\
461 __AROS_UFPA(a1),\
462 __AROS_UFPA(a2),\
463 __AROS_UFPA(a3),\
464 __AROS_UFPA(a4),\
465 __AROS_UFPA(a5),\
466 __AROS_UFPA(a6),\
467 __AROS_UFPA(a7),\
468 __AROS_UFPA(a8),\
469 __AROS_UFPA(a9),\
470 __AROS_UFPA(a10),\
471 __AROS_UFPA(a11)\
472 ))n)(\
473 __AROS_UFCA(a1),\
474 __AROS_UFCA(a2),\
475 __AROS_UFCA(a3),\
476 __AROS_UFCA(a4),\
477 __AROS_UFCA(a5),\
478 __AROS_UFCA(a6),\
479 __AROS_UFCA(a7),\
480 __AROS_UFCA(a8),\
481 __AROS_UFCA(a9),\
482 __AROS_UFCA(a10),\
483 __AROS_UFCA(a11)\
485 #define AROS_UFC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
486 (((__AROS_UFC_PREFIX t(*)(\
487 __AROS_UFPA(a1),\
488 __AROS_UFPA(a2),\
489 __AROS_UFPA(a3),\
490 __AROS_UFPA(a4),\
491 __AROS_UFPA(a5),\
492 __AROS_UFPA(a6),\
493 __AROS_UFPA(a7),\
494 __AROS_UFPA(a8),\
495 __AROS_UFPA(a9),\
496 __AROS_UFPA(a10),\
497 __AROS_UFPA(a11),\
498 __AROS_UFPA(a12)\
499 ))n)(\
500 __AROS_UFCA(a1),\
501 __AROS_UFCA(a2),\
502 __AROS_UFCA(a3),\
503 __AROS_UFCA(a4),\
504 __AROS_UFCA(a5),\
505 __AROS_UFCA(a6),\
506 __AROS_UFCA(a7),\
507 __AROS_UFCA(a8),\
508 __AROS_UFCA(a9),\
509 __AROS_UFCA(a10),\
510 __AROS_UFCA(a11),\
511 __AROS_UFCA(a12)\
513 #define AROS_UFC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
514 (((__AROS_UFC_PREFIX t(*)(\
515 __AROS_UFPA(a1),\
516 __AROS_UFPA(a2),\
517 __AROS_UFPA(a3),\
518 __AROS_UFPA(a4),\
519 __AROS_UFPA(a5),\
520 __AROS_UFPA(a6),\
521 __AROS_UFPA(a7),\
522 __AROS_UFPA(a8),\
523 __AROS_UFPA(a9),\
524 __AROS_UFPA(a10),\
525 __AROS_UFPA(a11),\
526 __AROS_UFPA(a12),\
527 __AROS_UFPA(a13)\
528 ))n)(\
529 __AROS_UFCA(a1),\
530 __AROS_UFCA(a2),\
531 __AROS_UFCA(a3),\
532 __AROS_UFCA(a4),\
533 __AROS_UFCA(a5),\
534 __AROS_UFCA(a6),\
535 __AROS_UFCA(a7),\
536 __AROS_UFCA(a8),\
537 __AROS_UFCA(a9),\
538 __AROS_UFCA(a10),\
539 __AROS_UFCA(a11),\
540 __AROS_UFCA(a12),\
541 __AROS_UFCA(a13)\
543 #define AROS_UFC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
544 (((__AROS_UFC_PREFIX t(*)(\
545 __AROS_UFPA(a1),\
546 __AROS_UFPA(a2),\
547 __AROS_UFPA(a3),\
548 __AROS_UFPA(a4),\
549 __AROS_UFPA(a5),\
550 __AROS_UFPA(a6),\
551 __AROS_UFPA(a7),\
552 __AROS_UFPA(a8),\
553 __AROS_UFPA(a9),\
554 __AROS_UFPA(a10),\
555 __AROS_UFPA(a11),\
556 __AROS_UFPA(a12),\
557 __AROS_UFPA(a13),\
558 __AROS_UFPA(a14)\
559 ))n)(\
560 __AROS_UFCA(a1),\
561 __AROS_UFCA(a2),\
562 __AROS_UFCA(a3),\
563 __AROS_UFCA(a4),\
564 __AROS_UFCA(a5),\
565 __AROS_UFCA(a6),\
566 __AROS_UFCA(a7),\
567 __AROS_UFCA(a8),\
568 __AROS_UFCA(a9),\
569 __AROS_UFCA(a10),\
570 __AROS_UFCA(a11),\
571 __AROS_UFCA(a12),\
572 __AROS_UFCA(a13),\
573 __AROS_UFCA(a14)\
575 #define AROS_UFC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
576 (((__AROS_UFC_PREFIX t(*)(\
577 __AROS_UFPA(a1),\
578 __AROS_UFPA(a2),\
579 __AROS_UFPA(a3),\
580 __AROS_UFPA(a4),\
581 __AROS_UFPA(a5),\
582 __AROS_UFPA(a6),\
583 __AROS_UFPA(a7),\
584 __AROS_UFPA(a8),\
585 __AROS_UFPA(a9),\
586 __AROS_UFPA(a10),\
587 __AROS_UFPA(a11),\
588 __AROS_UFPA(a12),\
589 __AROS_UFPA(a13),\
590 __AROS_UFPA(a14),\
591 __AROS_UFPA(a15)\
592 ))n)(\
593 __AROS_UFCA(a1),\
594 __AROS_UFCA(a2),\
595 __AROS_UFCA(a3),\
596 __AROS_UFCA(a4),\
597 __AROS_UFCA(a5),\
598 __AROS_UFCA(a6),\
599 __AROS_UFCA(a7),\
600 __AROS_UFCA(a8),\
601 __AROS_UFCA(a9),\
602 __AROS_UFCA(a10),\
603 __AROS_UFCA(a11),\
604 __AROS_UFCA(a12),\
605 __AROS_UFCA(a13),\
606 __AROS_UFCA(a14),\
607 __AROS_UFCA(a15)\
609 #define AROS_UFC0NR AROS_UFC0
610 #define AROS_UFC1NR AROS_UFC1
611 #define AROS_UFC2NR AROS_UFC2
612 #define AROS_UFC3NR AROS_UFC3
613 #define AROS_UFC4NR AROS_UFC4
614 #define AROS_UFC5NR AROS_UFC5
615 #define AROS_UFC6NR AROS_UFC6
616 #define AROS_UFC7NR AROS_UFC7
617 #define AROS_UFC8NR AROS_UFC8
618 #define AROS_UFC9NR AROS_UFC9
619 #define AROS_UFC10NR AROS_UFC10
620 #define AROS_UFC11NR AROS_UFC11
621 #define AROS_UFC12NR AROS_UFC12
622 #define AROS_UFC13NR AROS_UFC13
623 #define AROS_UFC14NR AROS_UFC14
624 #define AROS_UFC15NR AROS_UFC15
625 #endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
627 /* Prototypes for user functions */
628 # define AROS_UFP0(t,n) \
629 __AROS_UFP_PREFIX t n (void)
630 # define AROS_UFP1(t,n,a1) \
631 __AROS_UFP_PREFIX t n (\
632 __AROS_UFPA(a1))
633 # define AROS_UFP2(t,n,a1,a2) \
634 __AROS_UFP_PREFIX t n (\
635 __AROS_UFPA(a1),\
636 __AROS_UFPA(a2))
637 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
638 # define AROS_UFP2S(t,n,a1,a2) \
639 __AROS_UFP_PREFIX static t n (\
640 __AROS_UFPA(a1),\
641 __AROS_UFPA(a2))
642 # else
643 # define AROS_UFP2S(t,n,a1,a2) \
644 __AROS_UFP_PREFIX t n (\
645 __AROS_UFPA(a1),\
646 __AROS_UFPA(a2))
647 # endif
648 # define AROS_UFP3(t,n,a1,a2,a3) \
649 __AROS_UFP_PREFIX t n (\
650 __AROS_UFPA(a1),\
651 __AROS_UFPA(a2),\
652 __AROS_UFPA(a3))
653 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
654 # define AROS_UFP3S(t,n,a1,a2,a3) \
655 __AROS_UFP_PREFIX static t n (\
656 __AROS_UFPA(a1),\
657 __AROS_UFPA(a2),\
658 __AROS_UFPA(a3))
659 # else
660 # define AROS_UFP3S(t,n,a1,a2,a3) \
661 __AROS_UFP_PREFIX t n (\
662 __AROS_UFPA(a1),\
663 __AROS_UFPA(a2),\
664 __AROS_UFPA(a3))
665 # endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
666 # define AROS_UFP4(t,n,a1,a2,a3,a4) \
667 __AROS_UFP_PREFIX t n (\
668 __AROS_UFPA(a1),\
669 __AROS_UFPA(a2),\
670 __AROS_UFPA(a3),\
671 __AROS_UFPA(a4))
672 # define AROS_UFP5(t,n,a1,a2,a3,a4,a5) \
673 __AROS_UFP_PREFIX t n (\
674 __AROS_UFPA(a1),\
675 __AROS_UFPA(a2),\
676 __AROS_UFPA(a3),\
677 __AROS_UFPA(a4),\
678 __AROS_UFPA(a5))
679 # if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
680 # define AROS_UFP5S(t,n,a1,a2,a3,a4,a5) \
681 __AROS_UFP_PREFIX static t n (\
682 __AROS_UFPA(a1),\
683 __AROS_UFPA(a2),\
684 __AROS_UFPA(a3),\
685 __AROS_UFPA(a4),\
686 __AROS_UFPA(a5))
687 # else
688 # define AROS_UFP5S(t,n,a1,a2,a3,a4,a5) \
689 __AROS_UFP_PREFIX t n (\
690 __AROS_UFPA(a1),\
691 __AROS_UFPA(a2),\
692 __AROS_UFPA(a3),\
693 __AROS_UFPA(a4),\
694 __AROS_UFPA(a5))
695 # endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
696 # define AROS_UFP6(t,n,a1,a2,a3,a4,a5,a6) \
697 __AROS_UFP_PREFIX t n (\
698 __AROS_UFPA(a1),\
699 __AROS_UFPA(a2),\
700 __AROS_UFPA(a3),\
701 __AROS_UFPA(a4),\
702 __AROS_UFPA(a5),\
703 __AROS_UFPA(a6))
704 # define AROS_UFP7(t,n,a1,a2,a3,a4,a5,a6,a7) \
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 # define AROS_UFP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8) \
714 __AROS_UFP_PREFIX t n (\
715 __AROS_UFPA(a1),\
716 __AROS_UFPA(a2),\
717 __AROS_UFPA(a3),\
718 __AROS_UFPA(a4),\
719 __AROS_UFPA(a5),\
720 __AROS_UFPA(a6),\
721 __AROS_UFPA(a7),\
722 __AROS_UFPA(a8))
723 # define AROS_UFP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
724 __AROS_UFP_PREFIX t n (\
725 __AROS_UFPA(a1),\
726 __AROS_UFPA(a2),\
727 __AROS_UFPA(a3),\
728 __AROS_UFPA(a4),\
729 __AROS_UFPA(a5),\
730 __AROS_UFPA(a6),\
731 __AROS_UFPA(a7),\
732 __AROS_UFPA(a8),\
733 __AROS_UFPA(a9))
734 # define AROS_UFP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
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 # define AROS_UFP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \
747 __AROS_UFP_PREFIX t n (\
748 __AROS_UFPA(a1),\
749 __AROS_UFPA(a2),\
750 __AROS_UFPA(a3),\
751 __AROS_UFPA(a4),\
752 __AROS_UFPA(a5),\
753 __AROS_UFPA(a6),\
754 __AROS_UFPA(a7),\
755 __AROS_UFPA(a8),\
756 __AROS_UFPA(a9),\
757 __AROS_UFPA(a10),\
758 __AROS_UFPA(a11))
759 # define AROS_UFP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
760 __AROS_UFP_PREFIX t n (\
761 __AROS_UFPA(a1),\
762 __AROS_UFPA(a2),\
763 __AROS_UFPA(a3),\
764 __AROS_UFPA(a4),\
765 __AROS_UFPA(a5),\
766 __AROS_UFPA(a6),\
767 __AROS_UFPA(a7),\
768 __AROS_UFPA(a8),\
769 __AROS_UFPA(a9),\
770 __AROS_UFPA(a10),\
771 __AROS_UFPA(a11),\
772 __AROS_UFPA(a12))
773 # define AROS_UFP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) \
774 __AROS_UFP_PREFIX t n (\
775 __AROS_UFPA(a1),\
776 __AROS_UFPA(a2),\
777 __AROS_UFPA(a3),\
778 __AROS_UFPA(a4),\
779 __AROS_UFPA(a5),\
780 __AROS_UFPA(a6),\
781 __AROS_UFPA(a7),\
782 __AROS_UFPA(a8),\
783 __AROS_UFPA(a9),\
784 __AROS_UFPA(a10),\
785 __AROS_UFPA(a11),\
786 __AROS_UFPA(a12),\
787 __AROS_UFPA(a13))
788 # define AROS_UFP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \
789 __AROS_UFP_PREFIX t n (\
790 __AROS_UFPA(a1),\
791 __AROS_UFPA(a2),\
792 __AROS_UFPA(a3),\
793 __AROS_UFPA(a4),\
794 __AROS_UFPA(a5),\
795 __AROS_UFPA(a6),\
796 __AROS_UFPA(a7),\
797 __AROS_UFPA(a8),\
798 __AROS_UFPA(a9),\
799 __AROS_UFPA(a10),\
800 __AROS_UFPA(a11),\
801 __AROS_UFPA(a12),\
802 __AROS_UFPA(a13),\
803 __AROS_UFPA(a14))
804 # define AROS_UFP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
805 __AROS_UFP_PREFIX t n (\
806 __AROS_UFPA(a1),\
807 __AROS_UFPA(a2),\
808 __AROS_UFPA(a3),\
809 __AROS_UFPA(a4),\
810 __AROS_UFPA(a5),\
811 __AROS_UFPA(a6),\
812 __AROS_UFPA(a7),\
813 __AROS_UFPA(a8),\
814 __AROS_UFPA(a9),\
815 __AROS_UFPA(a10),\
816 __AROS_UFPA(a11),\
817 __AROS_UFPA(a12),\
818 __AROS_UFPA(a13),\
819 __AROS_UFPA(a14),\
820 __AROS_UFPA(a15))
822 #endif /* !__AROS_CPU_SPECIFIC_ASMCALLS */
823 #define AROS_UFHA(type,name,reg) type,name,reg
824 #define AROS_UFPA(type,name,reg) type,name,reg
825 #define AROS_UFCA(type,name,reg) type,name,reg
827 #ifndef AROS_USERFUNC_INIT
828 # define AROS_USERFUNC_INIT {
829 #endif
830 #ifndef AROS_USERFUNC_EXIT
831 # define AROS_USERFUNC_EXIT }}
832 #endif
834 /* DOS/CreateProc() entry point definition
836 #ifndef AROS_PROCH
837 struct ExecBase;
839 #define AROS_PROCH(n, _argptr, _argsize, _SysBase) \
840 AROS_UFH3(SIPTR, n, \
841 AROS_UFHA(STRPTR, _argptr, A0), \
842 AROS_UFHA(ULONG, _argsize, D0), \
843 AROS_UFHA(struct ExecBase *, _SysBase, A6))
844 #endif
845 #ifndef AROS_PROCP
846 #define AROS_PROCP(n) \
847 AROS_UFP3(SIPTR, n, \
848 AROS_UFPA(STRPTR, _argptr, A0), \
849 AROS_UFPA(ULONG, _argsize, D0), \
850 AROS_UFPA(struct ExecBase *, _SysBase, A6))
851 #endif
852 #ifndef AROS_PROCC
853 #define AROS_PROCC(n) \
854 AROS_UFC3(SIPTR, n, \
855 AROS_UFCA(STRPTR, _argptr, A0), \
856 AROS_UFCA(ULONG, _argsize, D0), \
857 AROS_UFCA(struct ExecBase *, _SysBase, A6))
858 #endif
860 #define AROS_PROCFUNC_INIT AROS_USERFUNC_INIT
861 #define AROS_PROCFUNC_EXIT AROS_USERFUNC_EXIT
863 /******************************************************************************
864 ***** ENDE aros/asmcall.h
865 ******************************************************************************/
867 #endif /* AROS_ASMCALL_H */