Use dos.library/CreateNewProc() instead of alib/CreateNewProcTags()
[tangerine.git] / arch / ppc-all / common / include / aros / libcall.h
blob03d4844a81fc8e318cdeccb1e32486066872d070
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #pragma pack(2)
7 #ifndef AROS_LIBCALL_H
8 #define AROS_LIBCALL_H
10 /******************************************************************************
12 MODUL
13 $Id$
15 DESCRIPTION
16 Some macros to build functions with registerized parameters on the
17 different compilers around. Usage:
19 AROS_LH<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_LH1I(struct Node *, RemHead,
43 struct List *, list, A0,
44 struct ExecBase, SysBase, 43, Exec)
46 // Hier *keine* ";" !!
47 AROS_LIBFUNC_INIT
48 // Das ist eigentlich nicht notwendig, da die Funktion
49 // SysBase nicht verwendet, aber ist ja nur ein Demo :-)
50 AROS_LIBBASE_EXT_DECL(struct ExecBase, SysBase)
52 struct Node *node;
54 node=list->lh_Head;
55 if(node->ln_Succ==NULL)
56 return NULL;
57 Remove(node);
58 return node;
60 // NACH return !!
61 AROS_LIBFUNC_EXIT
64 ******************************************************************************/
66 #include <aros/config.h>
68 #define AROS_LIBFUNC_INIT {
69 #define AROS_LIBFUNC_EXIT }}
70 #define AROS_LIBBASE_EXT_DECL(type, base)
72 /* System-Specific things */
73 #ifndef AROS_SYSTEM_H
74 # include <aros/system.h>
75 #endif
77 #ifndef AROS_ABI_H
78 # include <aros/abi.h>
79 #endif
81 #ifndef __typedef_VOID_FUNC
82 #define __typedef_VOID_FUNC
83 typedef void (*VOID_FUNC)(void);
84 #endif
85 #ifndef __typedef_LONG_FUNC
86 #define __typedef_LONG_FUNC
87 typedef long (*LONG_FUNC)(void);
88 #endif
89 #ifndef __typedef_ULONG_FUNC
90 #define __typedef_ULONG_FUNC
91 typedef unsigned long (*ULONG_FUNC)(void);
92 #endif
94 /* Declare all macros which the systems' libcall didn't */
95 #ifndef __AROS_SLIB_ENTRY
96 # define __AROS_SLIB_ENTRY(n,s) s ## _ ## n
97 #endif
98 #ifndef AROS_SLIB_ENTRY
100 This is to allow the C preprocessor to expand n and s before they are
101 maybe concatenated (the CPP first evaluates a ## b and the tries
102 to expand ab instead of expanding a and b and then concatenating the
103 results
105 # define AROS_SLIB_ENTRY(n,s) __AROS_SLIB_ENTRY(n,s)
106 #endif
108 #if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
109 /* Library functions which need the libbase */
110 #define AROS_LHQUAD1(t,n,a1,bt,bn,o,s) \
111 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
112 __AROS_LHAQUAD(a1),\
113 __AROS_LH_BASE(bt,bn))
114 #define AROS_LHQUAD2(t,n,a1,a2,bt,bn,o,s) \
115 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
116 __AROS_LHAQUAD(a1),\
117 __AROS_LHAQUAD(a2),\
118 __AROS_LH_BASE(bt,bn))
120 #define AROS_LH0(t,n,bt,bn,o,s) \
121 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
122 __AROS_LH_BASE(bt,bn);
124 #define AROS_LH1(t,n,a1,bt,bn,o,s) \
125 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
126 __AROS_LHA(a1); \
127 __AROS_LH_BASE(bt,bn);
129 #define AROS_LH2(t,n,a1,a2,bt,bn,o,s) \
130 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
131 __AROS_LHA(a1); \
132 __AROS_LHA(a2); \
133 __AROS_LH_BASE(bt,bn);
135 #define AROS_LH3(t,n,a1,a2,a3,bt,bn,o,s) \
136 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
137 __AROS_LHA(a1); \
138 __AROS_LHA(a2); \
139 __AROS_LHA(a3); \
140 __AROS_LH_BASE(bt,bn);
142 #define AROS_LH4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
143 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
144 __AROS_LHA(a1); \
145 __AROS_LHA(a2); \
146 __AROS_LHA(a3); \
147 __AROS_LHA(a4); \
148 __AROS_LH_BASE(bt,bn);
150 #define AROS_LH5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
151 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
152 __AROS_LHA(a1); \
153 __AROS_LHA(a2); \
154 __AROS_LHA(a3); \
155 __AROS_LHA(a4); \
156 __AROS_LHA(a5); \
157 __AROS_LH_BASE(bt,bn);
159 #define AROS_LH6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
160 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
161 __AROS_LHA(a1); \
162 __AROS_LHA(a2); \
163 __AROS_LHA(a3); \
164 __AROS_LHA(a4); \
165 __AROS_LHA(a5); \
166 __AROS_LHA(a6); \
167 __AROS_LH_BASE(bt,bn);
169 #define AROS_LH7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
170 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
171 __AROS_LHA(a1); \
172 __AROS_LHA(a2); \
173 __AROS_LHA(a3); \
174 __AROS_LHA(a4); \
175 __AROS_LHA(a5); \
176 __AROS_LHA(a6); \
177 __AROS_LHA(a7); \
178 __AROS_LH_BASE(bt,bn);
180 #define AROS_LH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
181 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
182 __AROS_LHA(a1); \
183 __AROS_LHA(a2); \
184 __AROS_LHA(a3); \
185 __AROS_LHA(a4); \
186 __AROS_LHA(a5); \
187 __AROS_LHA(a6); \
188 __AROS_LHA(a7); \
189 __AROS_LHA(a8); \
190 __AROS_LH_BASE(bt,bn);
192 #define AROS_LH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
193 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
194 __AROS_LHA(a1); \
195 __AROS_LHA(a2); \
196 __AROS_LHA(a3); \
197 __AROS_LHA(a4); \
198 __AROS_LHA(a5); \
199 __AROS_LHA(a6); \
200 __AROS_LHA(a7); \
201 __AROS_LHA(a8); \
202 __AROS_LHA(a9); \
203 __AROS_LH_BASE(bt,bn);
205 #define AROS_LH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
206 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
207 __AROS_LHA(a1); \
208 __AROS_LHA(a2); \
209 __AROS_LHA(a3); \
210 __AROS_LHA(a4); \
211 __AROS_LHA(a5); \
212 __AROS_LHA(a6); \
213 __AROS_LHA(a7); \
214 __AROS_LHA(a8); \
215 __AROS_LHA(a9); \
216 __AROS_LHA(a10); \
217 __AROS_LH_BASE(bt,bn);
219 #define AROS_LH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
220 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
221 __AROS_LHA(a1); \
222 __AROS_LHA(a2); \
223 __AROS_LHA(a3); \
224 __AROS_LHA(a4); \
225 __AROS_LHA(a5); \
226 __AROS_LHA(a6); \
227 __AROS_LHA(a7); \
228 __AROS_LHA(a8); \
229 __AROS_LHA(a9); \
230 __AROS_LHA(a10); \
231 __AROS_LHA(a11); \
232 __AROS_LH_BASE(bt,bn);
234 #define AROS_LH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
235 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
236 __AROS_LHA(a1); \
237 __AROS_LHA(a2); \
238 __AROS_LHA(a3); \
239 __AROS_LHA(a4); \
240 __AROS_LHA(a5); \
241 __AROS_LHA(a6); \
242 __AROS_LHA(a7); \
243 __AROS_LHA(a8); \
244 __AROS_LHA(a9); \
245 __AROS_LHA(a10); \
246 __AROS_LHA(a11); \
247 __AROS_LHA(a12); \
248 __AROS_LH_BASE(bt,bn);
250 #define AROS_LH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
251 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
252 __AROS_LHA(a1); \
253 __AROS_LHA(a2); \
254 __AROS_LHA(a3); \
255 __AROS_LHA(a4); \
256 __AROS_LHA(a5); \
257 __AROS_LHA(a6); \
258 __AROS_LHA(a7); \
259 __AROS_LHA(a8); \
260 __AROS_LHA(a9); \
261 __AROS_LHA(a10); \
262 __AROS_LHA(a11); \
263 __AROS_LHA(a12); \
264 __AROS_LHA(a13); \
265 __AROS_LH_BASE(bt,bn);
267 #define AROS_LH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
268 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
269 __AROS_LHA(a1); \
270 __AROS_LHA(a2); \
271 __AROS_LHA(a3); \
272 __AROS_LHA(a4); \
273 __AROS_LHA(a5); \
274 __AROS_LHA(a6); \
275 __AROS_LHA(a7); \
276 __AROS_LHA(a8); \
277 __AROS_LHA(a9); \
278 __AROS_LHA(a10); \
279 __AROS_LHA(a11); \
280 __AROS_LHA(a12); \
281 __AROS_LHA(a13); \
282 __AROS_LHA(a14); \
283 __AROS_LH_BASE(bt,bn);
285 #define AROS_LH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
286 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
287 __AROS_LHA(a1); \
288 __AROS_LHA(a2); \
289 __AROS_LHA(a3); \
290 __AROS_LHA(a4); \
291 __AROS_LHA(a5); \
292 __AROS_LHA(a6); \
293 __AROS_LHA(a7); \
294 __AROS_LHA(a8); \
295 __AROS_LHA(a9); \
296 __AROS_LHA(a10); \
297 __AROS_LHA(a11); \
298 __AROS_LHA(a12); \
299 __AROS_LHA(a13); \
300 __AROS_LHA(a14); \
301 __AROS_LHA(a15); \
302 __AROS_LH_BASE(bt,bn);
304 /* Library functions which don't need the libbase */
305 #define AROS_LH0I(t,n,bt,bn,o,s) \
306 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) {
308 #define AROS_LH1I(t,n,a1,bt,bn,o,s) \
309 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
310 __AROS_LHA(a1);
312 #define AROS_LH2I(t,n,a1,a2,bt,bn,o,s) \
313 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
314 __AROS_LHA(a1); \
315 __AROS_LHA(a2);
317 #define AROS_LH3I(t,n,a1,a2,a3,bt,bn,o,s) \
318 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
319 __AROS_LHA(a1); \
320 __AROS_LHA(a2); \
321 __AROS_LHA(a3);
323 #define AROS_LH4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
324 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
325 __AROS_LHA(a1); \
326 __AROS_LHA(a2); \
327 __AROS_LHA(a3); \
328 __AROS_LHA(a4);
330 #define AROS_LH5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
331 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
332 __AROS_LHA(a1); \
333 __AROS_LHA(a2); \
334 __AROS_LHA(a3); \
335 __AROS_LHA(a4); \
336 __AROS_LHA(a5);
338 #define AROS_LH6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
339 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
340 __AROS_LHA(a1); \
341 __AROS_LHA(a2); \
342 __AROS_LHA(a3); \
343 __AROS_LHA(a4); \
344 __AROS_LHA(a5); \
345 __AROS_LHA(a6);
347 #define AROS_LH7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
348 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
349 __AROS_LHA(a1); \
350 __AROS_LHA(a2); \
351 __AROS_LHA(a3); \
352 __AROS_LHA(a4); \
353 __AROS_LHA(a5); \
354 __AROS_LHA(a6); \
355 __AROS_LHA(a7);
357 #define AROS_LH8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
358 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
359 __AROS_LHA(a1); \
360 __AROS_LHA(a2); \
361 __AROS_LHA(a3); \
362 __AROS_LHA(a4); \
363 __AROS_LHA(a5); \
364 __AROS_LHA(a6); \
365 __AROS_LHA(a7); \
366 __AROS_LHA(a8);
368 #define AROS_LH9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
369 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
370 __AROS_LHA(a1); \
371 __AROS_LHA(a2); \
372 __AROS_LHA(a3); \
373 __AROS_LHA(a4); \
374 __AROS_LHA(a5); \
375 __AROS_LHA(a6); \
376 __AROS_LHA(a7); \
377 __AROS_LHA(a8); \
378 __AROS_LHA(a9);
380 #define AROS_LH10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
381 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
382 __AROS_LHA(a1); \
383 __AROS_LHA(a2); \
384 __AROS_LHA(a3); \
385 __AROS_LHA(a4); \
386 __AROS_LHA(a5); \
387 __AROS_LHA(a6); \
388 __AROS_LHA(a7); \
389 __AROS_LHA(a8); \
390 __AROS_LHA(a9); \
391 __AROS_LHA(a10);
393 #define AROS_LH11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
394 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
395 __AROS_LHA(a1); \
396 __AROS_LHA(a2); \
397 __AROS_LHA(a3); \
398 __AROS_LHA(a4); \
399 __AROS_LHA(a5); \
400 __AROS_LHA(a6); \
401 __AROS_LHA(a7); \
402 __AROS_LHA(a8); \
403 __AROS_LHA(a9); \
404 __AROS_LHA(a10); \
405 __AROS_LHA(a11);
407 #define AROS_LH12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
408 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
409 __AROS_LHA(a1); \
410 __AROS_LHA(a2); \
411 __AROS_LHA(a3); \
412 __AROS_LHA(a4); \
413 __AROS_LHA(a5); \
414 __AROS_LHA(a6); \
415 __AROS_LHA(a7); \
416 __AROS_LHA(a8); \
417 __AROS_LHA(a9); \
418 __AROS_LHA(a10); \
419 __AROS_LHA(a11); \
420 __AROS_LHA(a12);
422 #define AROS_LH13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
423 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
424 __AROS_LHA(a1); \
425 __AROS_LHA(a2); \
426 __AROS_LHA(a3); \
427 __AROS_LHA(a4); \
428 __AROS_LHA(a5); \
429 __AROS_LHA(a6); \
430 __AROS_LHA(a7); \
431 __AROS_LHA(a8); \
432 __AROS_LHA(a9); \
433 __AROS_LHA(a10); \
434 __AROS_LHA(a11); \
435 __AROS_LHA(a12); \
436 __AROS_LHA(a13);
438 #define AROS_LH14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
439 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
440 __AROS_LHA(a1); \
441 __AROS_LHA(a2); \
442 __AROS_LHA(a3); \
443 __AROS_LHA(a4); \
444 __AROS_LHA(a5); \
445 __AROS_LHA(a6); \
446 __AROS_LHA(a7); \
447 __AROS_LHA(a8); \
448 __AROS_LHA(a9); \
449 __AROS_LHA(a10); \
450 __AROS_LHA(a11); \
451 __AROS_LHA(a12); \
452 __AROS_LHA(a13); \
453 __AROS_LHA(a14);
455 #define AROS_LH15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
456 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
457 __AROS_LHA(a1); \
458 __AROS_LHA(a2); \
459 __AROS_LHA(a3); \
460 __AROS_LHA(a4); \
461 __AROS_LHA(a5); \
462 __AROS_LHA(a6); \
463 __AROS_LHA(a7); \
464 __AROS_LHA(a8); \
465 __AROS_LHA(a9); \
466 __AROS_LHA(a10); \
467 __AROS_LHA(a11); \
468 __AROS_LHA(a12); \
469 __AROS_LHA(a13); \
470 __AROS_LHA(a14); \
471 __AROS_LHA(a15);
474 /* Call a library function which requires the libbase */
475 #define AROS_LCQUAD1(t,n,a1,bt,bn,o,s) \
476 (((__AROS_LC_PREFIX t(*)(\
477 __AROS_LPAQUAD(a1),\
478 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
479 __AROS_LCAQUAD(a1),\
480 __AROS_LC_BASE(bt,bn)))
482 #define AROS_LCQUAD2(t,n,a1,a2,bt,bn,o,s) \
483 (((__AROS_LC_PREFIX t(*)(\
484 __AROS_LPAQUAD(a1),\
485 __AROS_LPAQUAD(a2),\
486 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
487 __AROS_LCAQUAD(a1),\
488 __AROS_LCAQUAD(a2),\
489 __AROS_LC_BASE(bt,bn)))
491 #define AROS_LC0(t,n,bt,bn,o,s) \
492 ({ \
493 __AROS_LP_BASE(bt,bn); \
494 __AROS_LC_BASE(bt,bn); \
495 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
498 #define AROS_LC1(t,n,a1,bt,bn,o,s) \
499 ({ \
500 __AROS_LPA(a1); \
501 __AROS_LP_BASE(bt,bn); \
502 __AROS_LCA(a1); \
503 __AROS_LC_BASE(bt,bn); \
504 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
507 #define AROS_LC2(t,n,a1,a2,bt,bn,o,s) \
508 ({ \
509 __AROS_LPA(a1); \
510 __AROS_LPA(a2); \
511 __AROS_LP_BASE(bt,bn); \
512 __AROS_LCA(a1); \
513 __AROS_LCA(a2); \
514 __AROS_LC_BASE(bt,bn); \
515 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
518 #define AROS_LC3(t,n,a1,a2,a3,bt,bn,o,s) \
519 ({ \
520 __AROS_LPA(a1); \
521 __AROS_LPA(a2); \
522 __AROS_LPA(a3); \
523 __AROS_LP_BASE(bt,bn); \
524 __AROS_LCA(a1); \
525 __AROS_LCA(a2); \
526 __AROS_LCA(a3); \
527 __AROS_LC_BASE(bt,bn); \
528 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
531 #define AROS_LC4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
532 ({ \
533 __AROS_LPA(a1); \
534 __AROS_LPA(a2); \
535 __AROS_LPA(a3); \
536 __AROS_LPA(a4); \
537 __AROS_LP_BASE(bt,bn); \
538 __AROS_LCA(a1); \
539 __AROS_LCA(a2); \
540 __AROS_LCA(a3); \
541 __AROS_LCA(a4); \
542 __AROS_LC_BASE(bt,bn); \
543 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
546 #define AROS_LC5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
547 ({ \
548 __AROS_LPA(a1); \
549 __AROS_LPA(a2); \
550 __AROS_LPA(a3); \
551 __AROS_LPA(a4); \
552 __AROS_LPA(a5); \
553 __AROS_LP_BASE(bt,bn); \
554 __AROS_LCA(a1); \
555 __AROS_LCA(a2); \
556 __AROS_LCA(a3); \
557 __AROS_LCA(a4); \
558 __AROS_LCA(a5); \
559 __AROS_LC_BASE(bt,bn); \
560 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
563 #define AROS_LC6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
564 ({ \
565 __AROS_LPA(a1); \
566 __AROS_LPA(a2); \
567 __AROS_LPA(a3); \
568 __AROS_LPA(a4); \
569 __AROS_LPA(a5); \
570 __AROS_LPA(a6); \
571 __AROS_LP_BASE(bt,bn); \
572 __AROS_LCA(a1); \
573 __AROS_LCA(a2); \
574 __AROS_LCA(a3); \
575 __AROS_LCA(a4); \
576 __AROS_LCA(a5); \
577 __AROS_LCA(a6); \
578 __AROS_LC_BASE(bt,bn); \
579 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
582 #define AROS_LC7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
583 ({ \
584 __AROS_LPA(a1); \
585 __AROS_LPA(a2); \
586 __AROS_LPA(a3); \
587 __AROS_LPA(a4); \
588 __AROS_LPA(a5); \
589 __AROS_LPA(a6); \
590 __AROS_LPA(a7); \
591 __AROS_LP_BASE(bt,bn); \
592 __AROS_LCA(a1); \
593 __AROS_LCA(a2); \
594 __AROS_LCA(a3); \
595 __AROS_LCA(a4); \
596 __AROS_LCA(a5); \
597 __AROS_LCA(a6); \
598 __AROS_LCA(a7); \
599 __AROS_LC_BASE(bt,bn); \
600 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
603 #define AROS_LC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
604 ({ \
605 __AROS_LPA(a1); \
606 __AROS_LPA(a2); \
607 __AROS_LPA(a3); \
608 __AROS_LPA(a4); \
609 __AROS_LPA(a5); \
610 __AROS_LPA(a6); \
611 __AROS_LPA(a7); \
612 __AROS_LPA(a8); \
613 __AROS_LP_BASE(bt,bn); \
614 __AROS_LCA(a1); \
615 __AROS_LCA(a2); \
616 __AROS_LCA(a3); \
617 __AROS_LCA(a4); \
618 __AROS_LCA(a5); \
619 __AROS_LCA(a6); \
620 __AROS_LCA(a7); \
621 __AROS_LCA(a8); \
622 __AROS_LC_BASE(bt,bn); \
623 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
626 #define AROS_LC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
627 ({ \
628 __AROS_LPA(a1); \
629 __AROS_LPA(a2); \
630 __AROS_LPA(a3); \
631 __AROS_LPA(a4); \
632 __AROS_LPA(a5); \
633 __AROS_LPA(a6); \
634 __AROS_LPA(a7); \
635 __AROS_LPA(a8); \
636 __AROS_LPA(a9); \
637 __AROS_LP_BASE(bt,bn); \
638 __AROS_LCA(a1); \
639 __AROS_LCA(a2); \
640 __AROS_LCA(a3); \
641 __AROS_LCA(a4); \
642 __AROS_LCA(a5); \
643 __AROS_LCA(a6); \
644 __AROS_LCA(a7); \
645 __AROS_LCA(a8); \
646 __AROS_LCA(a9); \
647 __AROS_LC_BASE(bt,bn); \
648 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
651 #define AROS_LC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
652 ({ \
653 __AROS_LPA(a1); \
654 __AROS_LPA(a2); \
655 __AROS_LPA(a3); \
656 __AROS_LPA(a4); \
657 __AROS_LPA(a5); \
658 __AROS_LPA(a6); \
659 __AROS_LPA(a7); \
660 __AROS_LPA(a8); \
661 __AROS_LPA(a9); \
662 __AROS_LPA(a10); \
663 __AROS_LP_BASE(bt,bn); \
664 __AROS_LCA(a1); \
665 __AROS_LCA(a2); \
666 __AROS_LCA(a3); \
667 __AROS_LCA(a4); \
668 __AROS_LCA(a5); \
669 __AROS_LCA(a6); \
670 __AROS_LCA(a7); \
671 __AROS_LCA(a8); \
672 __AROS_LCA(a9); \
673 __AROS_LCA(a10); \
674 __AROS_LC_BASE(bt,bn); \
675 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
678 #define AROS_LC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
679 ({ \
680 __AROS_LPA(a1); \
681 __AROS_LPA(a2); \
682 __AROS_LPA(a3); \
683 __AROS_LPA(a4); \
684 __AROS_LPA(a5); \
685 __AROS_LPA(a6); \
686 __AROS_LPA(a7); \
687 __AROS_LPA(a8); \
688 __AROS_LPA(a9); \
689 __AROS_LPA(a10); \
690 __AROS_LPA(a11); \
691 __AROS_LP_BASE(bt,bn); \
692 __AROS_LCA(a1); \
693 __AROS_LCA(a2); \
694 __AROS_LCA(a3); \
695 __AROS_LCA(a4); \
696 __AROS_LCA(a5); \
697 __AROS_LCA(a6); \
698 __AROS_LCA(a7); \
699 __AROS_LCA(a8); \
700 __AROS_LCA(a9); \
701 __AROS_LCA(a10); \
702 __AROS_LCA(a11); \
703 __AROS_LC_BASE(bt,bn); \
704 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
707 #define AROS_LC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
708 ({ \
709 __AROS_LPA(a1); \
710 __AROS_LPA(a2); \
711 __AROS_LPA(a3); \
712 __AROS_LPA(a4); \
713 __AROS_LPA(a5); \
714 __AROS_LPA(a6); \
715 __AROS_LPA(a7); \
716 __AROS_LPA(a8); \
717 __AROS_LPA(a9); \
718 __AROS_LPA(a10); \
719 __AROS_LPA(a11); \
720 __AROS_LPA(a12); \
721 __AROS_LP_BASE(bt,bn); \
722 __AROS_LCA(a1); \
723 __AROS_LCA(a2); \
724 __AROS_LCA(a3); \
725 __AROS_LCA(a4); \
726 __AROS_LCA(a5); \
727 __AROS_LCA(a6); \
728 __AROS_LCA(a7); \
729 __AROS_LCA(a8); \
730 __AROS_LCA(a9); \
731 __AROS_LCA(a10); \
732 __AROS_LCA(a11); \
733 __AROS_LCA(a12); \
734 __AROS_LC_BASE(bt,bn); \
735 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
738 #define AROS_LC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
739 ({ \
740 __AROS_LPA(a1); \
741 __AROS_LPA(a2); \
742 __AROS_LPA(a3); \
743 __AROS_LPA(a4); \
744 __AROS_LPA(a5); \
745 __AROS_LPA(a6); \
746 __AROS_LPA(a7); \
747 __AROS_LPA(a8); \
748 __AROS_LPA(a9); \
749 __AROS_LPA(a10); \
750 __AROS_LPA(a11); \
751 __AROS_LPA(a12); \
752 __AROS_LPA(a13); \
753 __AROS_LP_BASE(bt,bn); \
754 __AROS_LCA(a1); \
755 __AROS_LCA(a2); \
756 __AROS_LCA(a3); \
757 __AROS_LCA(a4); \
758 __AROS_LCA(a5); \
759 __AROS_LCA(a6); \
760 __AROS_LCA(a7); \
761 __AROS_LCA(a8); \
762 __AROS_LCA(a9); \
763 __AROS_LCA(a10); \
764 __AROS_LCA(a11); \
765 __AROS_LCA(a12); \
766 __AROS_LCA(a13); \
767 __AROS_LC_BASE(bt,bn); \
768 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
771 #define AROS_LC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
772 ({ \
773 __AROS_LPA(a1); \
774 __AROS_LPA(a2); \
775 __AROS_LPA(a3); \
776 __AROS_LPA(a4); \
777 __AROS_LPA(a5); \
778 __AROS_LPA(a6); \
779 __AROS_LPA(a7); \
780 __AROS_LPA(a8); \
781 __AROS_LPA(a9); \
782 __AROS_LPA(a10); \
783 __AROS_LPA(a11); \
784 __AROS_LPA(a12); \
785 __AROS_LPA(a13); \
786 __AROS_LPA(a14); \
787 __AROS_LP_BASE(bt,bn); \
788 __AROS_LCA(a1); \
789 __AROS_LCA(a2); \
790 __AROS_LCA(a3); \
791 __AROS_LCA(a4); \
792 __AROS_LCA(a5); \
793 __AROS_LCA(a6); \
794 __AROS_LCA(a7); \
795 __AROS_LCA(a8); \
796 __AROS_LCA(a9); \
797 __AROS_LCA(a10); \
798 __AROS_LCA(a11); \
799 __AROS_LCA(a12); \
800 __AROS_LCA(a13); \
801 __AROS_LCA(a14); \
802 __AROS_LC_BASE(bt,bn); \
803 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
806 #define AROS_LC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
807 ({ \
808 __AROS_LPA(a1); \
809 __AROS_LPA(a2); \
810 __AROS_LPA(a3); \
811 __AROS_LPA(a4); \
812 __AROS_LPA(a5); \
813 __AROS_LPA(a6); \
814 __AROS_LPA(a7); \
815 __AROS_LPA(a8); \
816 __AROS_LPA(a9); \
817 __AROS_LPA(a10); \
818 __AROS_LPA(a11); \
819 __AROS_LPA(a12); \
820 __AROS_LPA(a13); \
821 __AROS_LPA(a14); \
822 __AROS_LPA(a15); \
823 __AROS_LP_BASE(bt,bn); \
824 __AROS_LCA(a1); \
825 __AROS_LCA(a2); \
826 __AROS_LCA(a3); \
827 __AROS_LCA(a4); \
828 __AROS_LCA(a5); \
829 __AROS_LCA(a6); \
830 __AROS_LCA(a7); \
831 __AROS_LCA(a8); \
832 __AROS_LCA(a9); \
833 __AROS_LCA(a10); \
834 __AROS_LCA(a11); \
835 __AROS_LCA(a12); \
836 __AROS_LCA(a13); \
837 __AROS_LCA(a14); \
838 __AROS_LCA(a15); \
839 __AROS_LC_BASE(bt,bn); \
840 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
843 /* Call a library function which doesn't require the libbase */
844 #define AROS_LC0I AROS_LC0
845 #define AROS_LC1I AROS_LC1
846 #define AROS_LC2I AROS_LC2
847 #define AROS_LC3I AROS_LC3
848 #define AROS_LC4I AROS_LC4
849 #define AROS_LC5I AROS_LC5
850 #define AROS_LC6I AROS_LC6
851 #define AROS_LC7I AROS_LC7
852 #define AROS_LC8I AROS_LC8
853 #define AROS_LC9I AROS_LC9
854 #define AROS_LC10I AROS_LC10
855 #define AROS_LC11I AROS_LC11
856 #define AROS_LC12I AROS_LC12
857 #define AROS_LC13I AROS_LC13
858 #define AROS_LC14I AROS_LC14
859 #define AROS_LC15I AROS_LC15
861 /* Special calls: Call a library function without the name just by the offset */
863 #ifndef AROS_LVO_CALL0
864 #define AROS_LVO_CALL0(returntype,basetype,basename,offset,system) \
865 AROS_LC0(returntype, f, basetype, basename, offset, system)
866 #endif
868 #ifndef AROS_LVO_CALL0NR
869 #define AROS_LVO_CALL0NR(basetype,basename,offset,system) \
870 AROS_LC0(void, f, basetype, basename, offset, system)
871 #endif
873 #ifndef AROS_LVO_CALL1
874 #define AROS_LVO_CALL1(t,a1,bt,bn,o,s) \
875 ({ \
876 __AROS_LPA(a1); \
877 __AROS_LP_BASE(bt,bn); \
878 __AROS_LCA(a1); \
879 __AROS_LC_BASE(bt,bn); \
880 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
882 #endif
884 #ifndef AROS_LVO_CALL1NR
885 #define AROS_LVO_CALL1NR(a1,bt,bn,o,s) \
886 ({ \
887 __AROS_LPA(a1); \
888 __AROS_LP_BASE(bt,bn); \
889 __AROS_LCA(a1); \
890 __AROS_LC_BASE(bt,bn); \
891 (((void (*)())__AROS_GETVECADDR((bn),(o)))()); \
893 #endif
895 #ifndef AROS_LVO_CALL2
896 #define AROS_LVO_CALL2(t,a1,a2,bt,bn,o,s) \
897 ({ \
898 __AROS_LPA(a1); \
899 __AROS_LPA(a2); \
900 __AROS_LP_BASE(bt,bn); \
901 __AROS_LCA(a1); \
902 __AROS_LCA(a2); \
903 __AROS_LC_BASE(bt,bn); \
904 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
906 #endif
908 #ifndef AROS_LVO_CALL2NR
909 #define AROS_LVO_CALL2NR(a1,a2,bt,bn,o,s) \
910 ({ \
911 __AROS_LPA(a1); \
912 __AROS_LPA(a2); \
913 __AROS_LP_BASE(bt,bn); \
914 __AROS_LCA(a1); \
915 __AROS_LCA(a2); \
916 __AROS_LC_BASE(bt,bn); \
917 (((void (*)())__AROS_GETVECADDR((bn),(o)))()); \
919 #endif
921 #ifndef AROS_LVO_CALL3
922 #define AROS_LVO_CALL3(t,a1,a2,a3,bt,bn,o,s) \
923 ({ \
924 __AROS_LPA(a1); \
925 __AROS_LPA(a2); \
926 __AROS_LPA(a3); \
927 __AROS_LP_BASE(bt,bn); \
928 __AROS_LCA(a1); \
929 __AROS_LCA(a2); \
930 __AROS_LCA(a3); \
931 __AROS_LC_BASE(bt,bn); \
932 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
934 #endif
936 #ifndef AROS_LVO_CALL3NR
937 #define AROS_LVO_CALL3NR(a1,a2,a3,bt,bn,o,s) \
938 ({ \
939 __AROS_LPA(a1); \
940 __AROS_LPA(a2); \
941 __AROS_LPA(a3); \
942 __AROS_LP_BASE(bt,bn); \
943 __AROS_LCA(a1); \
944 __AROS_LCA(a2); \
945 __AROS_LCA(a3); \
946 __AROS_LC_BASE(bt,bn); \
947 (((void (*)())__AROS_GETVECADDR((bn),(o)))()); \
949 #endif
951 #ifndef AROS_LVO_CALL4
952 #define AROS_LVO_CALL4(t,a1,a2,a3,a4,bt,bn,o,s) \
953 ({ \
954 __AROS_LPA(a1); \
955 __AROS_LPA(a2); \
956 __AROS_LPA(a3); \
957 __AROS_LPA(a4); \
958 __AROS_LP_BASE(bt,bn); \
959 __AROS_LCA(a1); \
960 __AROS_LCA(a2); \
961 __AROS_LCA(a3); \
962 __AROS_LCA(a4); \
963 __AROS_LC_BASE(bt,bn); \
964 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
966 #endif
968 #ifndef AROS_LVO_CALL4NR
969 #define AROS_LVO_CALL4NR(a1,a2,a3,a4,bt,bn,o,s) \
970 ({ \
971 __AROS_LPA(a1); \
972 __AROS_LPA(a2); \
973 __AROS_LPA(a3); \
974 __AROS_LPA(a4); \
975 __AROS_LP_BASE(bt,bn); \
976 __AROS_LCA(a1); \
977 __AROS_LCA(a2); \
978 __AROS_LCA(a3); \
979 __AROS_LCA(a4); \
980 __AROS_LC_BASE(bt,bn); \
981 (((void (*)())__AROS_GETVECADDR((bn),(o)))()); \
983 #endif
985 #ifndef AROS_LVO_CALL5
986 #define AROS_LVO_CALL5(t,a1,a2,a3,a4,a5,bt,bn,o,s) \
987 ({ \
988 __AROS_LPA(a1); \
989 __AROS_LPA(a2); \
990 __AROS_LPA(a3); \
991 __AROS_LPA(a4); \
992 __AROS_LPA(a5); \
993 __AROS_LP_BASE(bt,bn); \
994 __AROS_LCA(a1); \
995 __AROS_LCA(a2); \
996 __AROS_LCA(a3); \
997 __AROS_LCA(a4); \
998 __AROS_LCA(a5); \
999 __AROS_LC_BASE(bt,bn); \
1000 (t)(((t (*)())__AROS_GETVECADDR((bn),(o)))()); \
1002 #endif
1004 #ifndef AROS_LVO_CALL5NR
1005 #define AROS_LVO_CALL5NR(a1,a2,a3,a4,a5,bt,bn,o,s) \
1006 ({ \
1007 __AROS_LPA(a1); \
1008 __AROS_LPA(a2); \
1009 __AROS_LPA(a3); \
1010 __AROS_LPA(a4); \
1011 __AROS_LPA(a5); \
1012 __AROS_LP_BASE(bt,bn); \
1013 __AROS_LCA(a1); \
1014 __AROS_LCA(a2); \
1015 __AROS_LCA(a3); \
1016 __AROS_LCA(a4); \
1017 __AROS_LCA(a5); \
1018 __AROS_LC_BASE(bt,bn); \
1019 (((void (*)())__AROS_GETVECADDR((bn),(o)))()); \
1021 #endif
1022 #endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
1024 #ifdef __AROS_USE_MACROS_FOR_LIBCALL
1025 # define AROS_LPQUAD1(t,n,a1,bt,bn,o,s)
1026 # define AROS_LPQUAD2(t,n,a1,a2,bt,bn,o,s)
1028 # define AROS_LP0(t,n,bt,bn,o,s)
1029 # define AROS_LP1(t,n,a1,bt,bn,o,s)
1030 # define AROS_LP2(t,n,a1,a2,bt,bn,o,s)
1031 # define AROS_LP3(t,n,a1,a2,a3,bt,bn,o,s)
1032 # define AROS_LP4(t,n,a1,a2,a3,a4,bt,bn,o,s)
1033 # define AROS_LP5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s)
1034 # define AROS_LP6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s)
1035 # define AROS_LP7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s)
1036 # define AROS_LP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s)
1037 # define AROS_LP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s)
1038 # define AROS_LP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s)
1039 # define AROS_LP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s)
1040 # define AROS_LP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s)
1041 # define AROS_LP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s)
1042 # define AROS_LP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s)
1043 # define AROS_LP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s)
1045 # define AROS_LP0I(t,n,bt,bn,o,s)
1046 # define AROS_LP1I(t,n,a1,bt,bn,o,s)
1047 # define AROS_LP2I(t,n,a1,a2,bt,bn,o,s)
1048 # define AROS_LP3I(t,n,a1,a2,a3,bt,bn,o,s)
1049 # define AROS_LP4I(t,n,a1,a2,a3,a4,bt,bn,o,s)
1050 # define AROS_LP5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s)
1051 # define AROS_LP6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s)
1052 # define AROS_LP7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s)
1053 # define AROS_LP8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s)
1054 # define AROS_LP9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s)
1055 # define AROS_LP10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s)
1056 # define AROS_LP11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s)
1057 # define AROS_LP12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s)
1058 # define AROS_LP13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s)
1059 # define AROS_LP14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s)
1060 # define AROS_LP15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s)
1061 #else
1062 /* Prototypes for library functions which need the libbase */
1063 # define AROS_LPQUAD1(t,n,a1,bt,bn,o,s) \
1064 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (a1,__AROS_LP_BASE(bt,bn))
1065 # define AROS_LPQUAD2(t,n,a1,a2,bt,bn,o,s) \
1066 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (a1,a2,__AROS_LP_BASE(bt,bn))
1068 # define AROS_LP0(t,n,bt,bn,o,s) \
1069 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1070 # define AROS_LP1(t,n,a1,bt,bn,o,s) \
1071 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1072 # define AROS_LP2(t,n,a1,a2,bt,bn,o,s) \
1073 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1074 # define AROS_LP3(t,n,a1,a2,a3,bt,bn,o,s) \
1075 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1076 # define AROS_LP4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1077 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1078 # define AROS_LP5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1079 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1080 # define AROS_LP6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1081 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1082 # define AROS_LP7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1083 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1084 # define AROS_LP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1085 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1086 # define AROS_LP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1087 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1088 # define AROS_LP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1089 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1090 # define AROS_LP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1091 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1092 # define AROS_LP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1093 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1094 # define AROS_LP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1095 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1096 # define AROS_LP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1097 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1098 # define AROS_LP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1099 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1101 /* Prototypes for library functions which don't need the libbase */
1102 # define AROS_LP0I(t,n,bt,bn,o,s) \
1103 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1104 # define AROS_LP1I(t,n,a1,bt,bn,o,s) \
1105 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1106 # define AROS_LP2I(t,n,a1,a2,bt,bn,o,s) \
1107 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1108 # define AROS_LP3I(t,n,a1,a2,a3,bt,bn,o,s) \
1109 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1110 # define AROS_LP4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1111 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1112 # define AROS_LP5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1113 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1114 # define AROS_LP6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1115 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1116 # define AROS_LP7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1117 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1118 # define AROS_LP8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1119 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1120 # define AROS_LP9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1121 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1122 # define AROS_LP10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1123 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1124 # define AROS_LP11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1125 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1126 # define AROS_LP12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1127 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1128 # define AROS_LP13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1129 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1130 # define AROS_LP14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1131 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1132 # define AROS_LP15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1133 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void);
1134 #endif
1136 /* Declarations for library functions which need the libbase */
1137 # define AROS_LDQUAD1(t,n,a1,bt,bn,o,s) \
1138 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1139 # define AROS_LDQUAD2(t,n,a1,a2,bt,bn,o,s) \
1140 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1142 # define AROS_LD0(t,n,bt,bn,o,s) \
1143 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1144 # define AROS_LD1(t,n,a1,bt,bn,o,s) \
1145 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1146 # define AROS_LD2(t,n,a1,a2,bt,bn,o,s) \
1147 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1148 # define AROS_LD3(t,n,a1,a2,a3,bt,bn,o,s) \
1149 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1150 # define AROS_LD4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1151 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1152 # define AROS_LD5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1153 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1154 # define AROS_LD6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1155 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1156 # define AROS_LD7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1157 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1158 # define AROS_LD8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1159 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1160 # define AROS_LD9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1161 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1162 # define AROS_LD10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1163 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1164 # define AROS_LD11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1165 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1166 # define AROS_LD12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1167 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1168 # define AROS_LD13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1169 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1170 # define AROS_LD14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1171 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1172 # define AROS_LD15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1173 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1175 /* Declarations for library functions which don't need the libbase */
1176 # define AROS_LD0I(t,n,bt,bn,o,s) \
1177 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1178 # define AROS_LD1I(t,n,a1,bt,bn,o,s) \
1179 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1180 # define AROS_LD2I(t,n,a1,a2,bt,bn,o,s) \
1181 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1182 # define AROS_LD3I(t,n,a1,a2,a3,bt,bn,o,s) \
1183 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1184 # define AROS_LD4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1185 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1186 # define AROS_LD5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1187 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1188 # define AROS_LD6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1189 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1190 # define AROS_LD7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1191 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1192 # define AROS_LD8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1193 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1194 # define AROS_LD9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1195 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1196 # define AROS_LD10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1197 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1198 # define AROS_LD11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1199 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1200 # define AROS_LD12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1201 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1202 # define AROS_LD13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1203 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1204 # define AROS_LD14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1205 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1206 # define AROS_LD15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1207 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1209 #define AROS_LHA(type,name,reg) type,name,reg
1210 #define AROS_LPA(type,name,reg) type,name,reg
1211 #define AROS_LCA(type,name,reg) type,name,reg
1212 #define AROS_LDA(type,name,reg) type,name,reg
1214 #define AROS_LHAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1215 #define AROS_LPAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1216 #define AROS_LCAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1217 #define AROS_LDAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1219 #ifndef AROS_LIBFUNC_INIT
1220 # define AROS_LIBFUNC_INIT {
1221 #endif
1222 #ifndef AROS_LIBFUNC_EXIT
1223 # define AROS_LIBFUNC_EXIT }}
1224 #endif
1225 #ifndef AROS_LIBBASE_EXT_DECL
1226 # define AROS_LIBBASE_EXT_DECL(a,b)
1227 #endif
1229 /******************************************************************************
1230 ***** ENDE aros/libcall.h
1231 ******************************************************************************/
1233 #endif /* AROS_LIBCALL_H */
1234 #pragma pack()