Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / .unmaintained / morphos / Include / aros / libcall.h
blob82133e4a77b31d04d84cc26ab43f524dba492921
1 /*
2 Copyright © 1995-2001, 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 #ifdef __MORPHOS__
69 #define Xj(a,b) a##b
70 #define AROS_LIBFUNC_INIT
71 //int NBDEBUG = dprintf("icon.library.elf: %s\n", __FUNCTION__);
72 #define AROS_LIBFUNC_EXIT }
73 #define AROS_LIBBASE_EXT_DECL(type, base)
74 #define AROS_SLIB_ENTRY(n,s) Xj(LIB_,n)
75 #define TRAPIT(n,s) \
76 struct EmulLibEntry Xj(LIB_##n,_Gate) = { TRAP_LIB, 0, (void (*)(void)) LIB_##n }
77 #define AROS_SLIB_ENTRY_GATED(n,s) Xj(LIB_##n,_Gate)
78 #else
79 #define AROS_SLIB_ENTRY_GATED AROS_SLIB_ENTRY
80 #endif
82 /* System-Specific things */
83 #ifndef AROS_SYSTEM_H
84 # include <aros/system.h>
85 #endif
87 #ifndef __typedef_VOID_FUNC
88 #define __typedef_VOID_FUNC
89 typedef void (*VOID_FUNC)(void);
90 #endif
91 #ifndef __typedef_LONG_FUNC
92 #define __typedef_LONG_FUNC
93 typedef long (*LONG_FUNC)(void);
94 #endif
95 #ifndef __typedef_ULONG_FUNC
96 #define __typedef_ULONG_FUNC
97 typedef unsigned long (*ULONG_FUNC)(void);
98 #endif
100 /* Declare all macros which the systems' libcall didn't */
101 #ifndef __AROS_SLIB_ENTRY
102 # define __AROS_SLIB_ENTRY(n,s) s ## _ ## n
103 #endif
104 #ifndef AROS_SLIB_ENTRY
106 This is to allow the C preprocessor to expand n and s before they are
107 maybe concatenated (the CPP first evaluates a ## b and the tries
108 to expand ab instead of expanding a and b and then concatenating the
109 results
111 # define AROS_SLIB_ENTRY(n,s) __AROS_SLIB_ENTRY(n,s)
112 #endif
114 #if !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS))
115 /* Library functions which need the libbase */
116 #define AROS_LHQUAD1(t,n,a1,bt,bn,o,s) \
117 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
118 __AROS_LHAQUAD(a1),\
119 __AROS_LH_BASE(bt,bn))
120 #define AROS_LHQUAD2(t,n,a1,a2,bt,bn,o,s) \
121 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
122 __AROS_LHAQUAD(a1),\
123 __AROS_LHAQUAD(a2),\
124 __AROS_LH_BASE(bt,bn))
126 #define AROS_LH0(t,n,bt,bn,o,s) \
127 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
128 __AROS_LH_BASE(bt,bn);
129 #define AROS_LH1(t,n,a1,bt,bn,o,s) \
130 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
131 __AROS_LHA(a1); \
132 __AROS_LH_BASE(bt,bn);
133 #define AROS_LH2(t,n,a1,a2,bt,bn,o,s) \
134 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
135 __AROS_LHA(a1); \
136 __AROS_LHA(a2); \
137 __AROS_LH_BASE(bt,bn);
138 #define AROS_LH3(t,n,a1,a2,a3,bt,bn,o,s) \
139 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
140 __AROS_LHA(a1); \
141 __AROS_LHA(a2); \
142 __AROS_LHA(a3); \
143 __AROS_LH_BASE(bt,bn);
144 #define AROS_LH4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
145 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
146 __AROS_LHA(a1); \
147 __AROS_LHA(a2); \
148 __AROS_LHA(a3); \
149 __AROS_LHA(a4); \
150 __AROS_LH_BASE(bt,bn);
151 #define AROS_LH5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
152 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
153 __AROS_LHA(a1); \
154 __AROS_LHA(a2); \
155 __AROS_LHA(a3); \
156 __AROS_LHA(a4); \
157 __AROS_LHA(a5); \
158 __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);
168 #define AROS_LH7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
169 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
170 __AROS_LHA(a1); \
171 __AROS_LHA(a2); \
172 __AROS_LHA(a3); \
173 __AROS_LHA(a4); \
174 __AROS_LHA(a5); \
175 __AROS_LHA(a6); \
176 __AROS_LHA(a7); \
177 __AROS_LH_BASE(bt,bn);
178 #define AROS_LH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
179 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
180 __AROS_LHA(a1); \
181 __AROS_LHA(a2); \
182 __AROS_LHA(a3); \
183 __AROS_LHA(a4); \
184 __AROS_LHA(a5); \
185 __AROS_LHA(a6); \
186 __AROS_LHA(a7); \
187 __AROS_LHA(a8); \
188 __AROS_LH_BASE(bt,bn);
189 #define AROS_LH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
190 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
191 __AROS_LHA(a1); \
192 __AROS_LHA(a2); \
193 __AROS_LHA(a3); \
194 __AROS_LHA(a4); \
195 __AROS_LHA(a5); \
196 __AROS_LHA(a6); \
197 __AROS_LHA(a7); \
198 __AROS_LHA(a8); \
199 __AROS_LHA(a9); \
200 __AROS_LH_BASE(bt,bn);
201 #define AROS_LH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
202 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
203 __AROS_LHA(a1); \
204 __AROS_LHA(a2); \
205 __AROS_LHA(a3); \
206 __AROS_LHA(a4); \
207 __AROS_LHA(a5); \
208 __AROS_LHA(a6); \
209 __AROS_LHA(a7); \
210 __AROS_LHA(a8); \
211 __AROS_LHA(a9); \
212 __AROS_LHA(a10); \
213 __AROS_LH_BASE(bt,bn);
214 #define AROS_LH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
215 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
216 __AROS_LHA(a1); \
217 __AROS_LHA(a2); \
218 __AROS_LHA(a3); \
219 __AROS_LHA(a4); \
220 __AROS_LHA(a5); \
221 __AROS_LHA(a6); \
222 __AROS_LHA(a7); \
223 __AROS_LHA(a8); \
224 __AROS_LHA(a9); \
225 __AROS_LHA(a10); \
226 __AROS_LHA(a11); \
227 __AROS_LH_BASE(bt,bn);
228 #define AROS_LH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
229 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
230 __AROS_LHA(a1); \
231 __AROS_LHA(a2); \
232 __AROS_LHA(a3); \
233 __AROS_LHA(a4); \
234 __AROS_LHA(a5); \
235 __AROS_LHA(a6); \
236 __AROS_LHA(a7); \
237 __AROS_LHA(a8); \
238 __AROS_LHA(a9); \
239 __AROS_LHA(a10); \
240 __AROS_LHA(a11); \
241 __AROS_LHA(a12); \
242 __AROS_LH_BASE(bt,bn);
243 #define AROS_LH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
244 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
245 __AROS_LHA(a1); \
246 __AROS_LHA(a2); \
247 __AROS_LHA(a3); \
248 __AROS_LHA(a4); \
249 __AROS_LHA(a5); \
250 __AROS_LHA(a6); \
251 __AROS_LHA(a7); \
252 __AROS_LHA(a8); \
253 __AROS_LHA(a9); \
254 __AROS_LHA(a10); \
255 __AROS_LHA(a11); \
256 __AROS_LHA(a12); \
257 __AROS_LHA(a13); \
258 __AROS_LH_BASE(bt,bn);
259 #define AROS_LH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
260 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
261 __AROS_LHA(a1); \
262 __AROS_LHA(a2); \
263 __AROS_LHA(a3); \
264 __AROS_LHA(a4); \
265 __AROS_LHA(a5); \
266 __AROS_LHA(a6); \
267 __AROS_LHA(a7); \
268 __AROS_LHA(a8); \
269 __AROS_LHA(a9); \
270 __AROS_LHA(a10); \
271 __AROS_LHA(a11); \
272 __AROS_LHA(a12); \
273 __AROS_LHA(a13); \
274 __AROS_LHA(a14); \
275 __AROS_LH_BASE(bt,bn);
276 #define AROS_LH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
277 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
278 __AROS_LHA(a1); \
279 __AROS_LHA(a2); \
280 __AROS_LHA(a3); \
281 __AROS_LHA(a4); \
282 __AROS_LHA(a5); \
283 __AROS_LHA(a6); \
284 __AROS_LHA(a7); \
285 __AROS_LHA(a8); \
286 __AROS_LHA(a9); \
287 __AROS_LHA(a10); \
288 __AROS_LHA(a11); \
289 __AROS_LHA(a12); \
290 __AROS_LHA(a13); \
291 __AROS_LHA(a14); \
292 __AROS_LHA(a15); \
293 __AROS_LH_BASE(bt,bn);
295 /* Library functions which don't need the libbase */
296 #define AROS_LH0I(t,n,bt,bn,o,s) \
297 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) {
298 #define AROS_LH1I(t,n,a1,bt,bn,o,s) \
299 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
300 __AROS_LHA(a1);
302 #define AROS_LH2I(t,n,a1,a2,bt,bn,o,s) \
303 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
304 __AROS_LHA(a1); \
305 __AROS_LHA(a2);
307 #define AROS_LH3I(t,n,a1,a2,a3,bt,bn,o,s) \
308 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
309 __AROS_LHA(a1); \
310 __AROS_LHA(a2); \
311 __AROS_LHA(a3);
313 #define AROS_LH4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
314 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
315 __AROS_LHA(a1); \
316 __AROS_LHA(a2); \
317 __AROS_LHA(a3); \
318 __AROS_LHA(a4);
320 #define AROS_LH5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
321 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
322 __AROS_LHA(a1); \
323 __AROS_LHA(a2); \
324 __AROS_LHA(a3); \
325 __AROS_LHA(a4); \
326 __AROS_LHA(a5);
328 #define AROS_LH6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
329 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
330 __AROS_LHA(a1); \
331 __AROS_LHA(a2); \
332 __AROS_LHA(a3); \
333 __AROS_LHA(a4); \
334 __AROS_LHA(a5); \
335 __AROS_LHA(a6);
337 #define AROS_LH7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
338 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
339 __AROS_LHA(a1); \
340 __AROS_LHA(a2); \
341 __AROS_LHA(a3); \
342 __AROS_LHA(a4); \
343 __AROS_LHA(a5); \
344 __AROS_LHA(a6); \
345 __AROS_LHA(a7);
347 #define AROS_LH8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,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); \
356 __AROS_LHA(a8);
358 #define AROS_LH9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
359 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
360 __AROS_LHA(a1); \
361 __AROS_LHA(a2); \
362 __AROS_LHA(a3); \
363 __AROS_LHA(a4); \
364 __AROS_LHA(a5); \
365 __AROS_LHA(a6); \
366 __AROS_LHA(a7); \
367 __AROS_LHA(a8); \
368 __AROS_LHA(a9);
370 #define AROS_LH10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
371 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
372 __AROS_LHA(a1); \
373 __AROS_LHA(a2); \
374 __AROS_LHA(a3); \
375 __AROS_LHA(a4); \
376 __AROS_LHA(a5); \
377 __AROS_LHA(a6); \
378 __AROS_LHA(a7); \
379 __AROS_LHA(a8); \
380 __AROS_LHA(a9); \
381 __AROS_LHA(a10);
383 #define AROS_LH11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
384 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
385 __AROS_LHA(a1); \
386 __AROS_LHA(a2); \
387 __AROS_LHA(a3); \
388 __AROS_LHA(a4); \
389 __AROS_LHA(a5); \
390 __AROS_LHA(a6); \
391 __AROS_LHA(a7); \
392 __AROS_LHA(a8); \
393 __AROS_LHA(a9); \
394 __AROS_LHA(a10); \
395 __AROS_LHA(a11);
397 #define AROS_LH12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
398 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
399 __AROS_LHA(a1); \
400 __AROS_LHA(a2); \
401 __AROS_LHA(a3); \
402 __AROS_LHA(a4); \
403 __AROS_LHA(a5); \
404 __AROS_LHA(a6); \
405 __AROS_LHA(a7); \
406 __AROS_LHA(a8); \
407 __AROS_LHA(a9); \
408 __AROS_LHA(a10); \
409 __AROS_LHA(a11); \
410 __AROS_LHA(a12);
412 #define AROS_LH13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
413 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
414 __AROS_LHA(a1); \
415 __AROS_LHA(a2); \
416 __AROS_LHA(a3); \
417 __AROS_LHA(a4); \
418 __AROS_LHA(a5); \
419 __AROS_LHA(a6); \
420 __AROS_LHA(a7); \
421 __AROS_LHA(a8); \
422 __AROS_LHA(a9); \
423 __AROS_LHA(a10); \
424 __AROS_LHA(a11); \
425 __AROS_LHA(a12); \
426 __AROS_LHA(a13);
428 #define AROS_LH14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
429 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
430 __AROS_LHA(a1); \
431 __AROS_LHA(a2); \
432 __AROS_LHA(a3); \
433 __AROS_LHA(a4); \
434 __AROS_LHA(a5); \
435 __AROS_LHA(a6); \
436 __AROS_LHA(a7); \
437 __AROS_LHA(a8); \
438 __AROS_LHA(a9); \
439 __AROS_LHA(a10); \
440 __AROS_LHA(a11); \
441 __AROS_LHA(a12); \
442 __AROS_LHA(a13); \
443 __AROS_LHA(a14);
445 #define AROS_LH15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
446 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
447 __AROS_LHA(a1); \
448 __AROS_LHA(a2); \
449 __AROS_LHA(a3); \
450 __AROS_LHA(a4); \
451 __AROS_LHA(a5); \
452 __AROS_LHA(a6); \
453 __AROS_LHA(a7); \
454 __AROS_LHA(a8); \
455 __AROS_LHA(a9); \
456 __AROS_LHA(a10); \
457 __AROS_LHA(a11); \
458 __AROS_LHA(a12); \
459 __AROS_LHA(a13); \
460 __AROS_LHA(a14); \
461 __AROS_LHA(a15);
464 /* Call a library function which requires the libbase */
465 #define AROS_LCQUAD1(t,n,a1,bt,bn,o,s) \
466 (((__AROS_LC_PREFIX t(*)(\
467 __AROS_LPAQUAD(a1),\
468 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
469 __AROS_LCAQUAD(a1),\
470 __AROS_LC_BASE(bt,bn)))
471 #define AROS_LCQUAD2(t,n,a1,a2,bt,bn,o,s) \
472 (((__AROS_LC_PREFIX t(*)(\
473 __AROS_LPAQUAD(a1),\
474 __AROS_LPAQUAD(a2),\
475 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
476 __AROS_LCAQUAD(a1),\
477 __AROS_LCAQUAD(a2),\
478 __AROS_LC_BASE(bt,bn)))
480 #define AROS_LC0(t,n,bt,bn,o,s) \
481 ({ \
482 __AROS_LP_BASE(bt,bn); \
483 __AROS_LC_BASE(bt,bn); \
484 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
487 #define AROS_LC1(t,n,a1,bt,bn,o,s) \
488 ({ \
489 __AROS_LPA(a1); \
490 __AROS_LP_BASE(bt,bn); \
491 __AROS_LCA(a1); \
492 __AROS_LC_BASE(bt,bn); \
493 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
495 #define AROS_LC2(t,n,a1,a2,bt,bn,o,s) \
496 ({ \
497 __AROS_LPA(a1); \
498 __AROS_LPA(a2); \
499 __AROS_LP_BASE(bt,bn); \
500 __AROS_LCA(a1); \
501 __AROS_LCA(a2); \
502 __AROS_LC_BASE(bt,bn); \
503 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
505 #define AROS_LC3(t,n,a1,a2,a3,bt,bn,o,s) \
506 ({ \
507 __AROS_LPA(a1); \
508 __AROS_LPA(a2); \
509 __AROS_LPA(a3); \
510 __AROS_LP_BASE(bt,bn); \
511 __AROS_LCA(a1); \
512 __AROS_LCA(a2); \
513 __AROS_LCA(a3); \
514 __AROS_LC_BASE(bt,bn); \
515 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
517 #define AROS_LC4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
518 ({ \
519 __AROS_LPA(a1); \
520 __AROS_LPA(a2); \
521 __AROS_LPA(a3); \
522 __AROS_LPA(a4); \
523 __AROS_LP_BASE(bt,bn); \
524 __AROS_LCA(a1); \
525 __AROS_LCA(a2); \
526 __AROS_LCA(a3); \
527 __AROS_LCA(a4); \
528 __AROS_LC_BASE(bt,bn); \
529 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
531 #define AROS_LC5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
532 ({ \
533 __AROS_LPA(a1); \
534 __AROS_LPA(a2); \
535 __AROS_LPA(a3); \
536 __AROS_LPA(a4); \
537 __AROS_LPA(a5); \
538 __AROS_LP_BASE(bt,bn); \
539 __AROS_LCA(a1); \
540 __AROS_LCA(a2); \
541 __AROS_LCA(a3); \
542 __AROS_LCA(a4); \
543 __AROS_LCA(a5); \
544 __AROS_LC_BASE(bt,bn); \
545 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
547 #define AROS_LC6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
548 ({ \
549 __AROS_LPA(a1); \
550 __AROS_LPA(a2); \
551 __AROS_LPA(a3); \
552 __AROS_LPA(a4); \
553 __AROS_LPA(a5); \
554 __AROS_LPA(a6); \
555 __AROS_LP_BASE(bt,bn); \
556 __AROS_LCA(a1); \
557 __AROS_LCA(a2); \
558 __AROS_LCA(a3); \
559 __AROS_LCA(a4); \
560 __AROS_LCA(a5); \
561 __AROS_LCA(a6); \
562 __AROS_LC_BASE(bt,bn); \
563 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
565 #define AROS_LC7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
566 ({ \
567 __AROS_LPA(a1); \
568 __AROS_LPA(a2); \
569 __AROS_LPA(a3); \
570 __AROS_LPA(a4); \
571 __AROS_LPA(a5); \
572 __AROS_LPA(a6); \
573 __AROS_LPA(a7); \
574 __AROS_LP_BASE(bt,bn); \
575 __AROS_LCA(a1); \
576 __AROS_LCA(a2); \
577 __AROS_LCA(a3); \
578 __AROS_LCA(a4); \
579 __AROS_LCA(a5); \
580 __AROS_LCA(a6); \
581 __AROS_LCA(a7); \
582 __AROS_LC_BASE(bt,bn); \
583 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
585 #define AROS_LC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
586 ({ \
587 __AROS_LPA(a1); \
588 __AROS_LPA(a2); \
589 __AROS_LPA(a3); \
590 __AROS_LPA(a4); \
591 __AROS_LPA(a5); \
592 __AROS_LPA(a6); \
593 __AROS_LPA(a7); \
594 __AROS_LPA(a8); \
595 __AROS_LP_BASE(bt,bn); \
596 __AROS_LCA(a1); \
597 __AROS_LCA(a2); \
598 __AROS_LCA(a3); \
599 __AROS_LCA(a4); \
600 __AROS_LCA(a5); \
601 __AROS_LCA(a6); \
602 __AROS_LCA(a7); \
603 __AROS_LCA(a8); \
604 __AROS_LC_BASE(bt,bn); \
605 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
607 #define AROS_LC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
608 ({ \
609 __AROS_LPA(a1); \
610 __AROS_LPA(a2); \
611 __AROS_LPA(a3); \
612 __AROS_LPA(a4); \
613 __AROS_LPA(a5); \
614 __AROS_LPA(a6); \
615 __AROS_LPA(a7); \
616 __AROS_LPA(a8); \
617 __AROS_LPA(a9); \
618 __AROS_LP_BASE(bt,bn); \
619 __AROS_LCA(a1); \
620 __AROS_LCA(a2); \
621 __AROS_LCA(a3); \
622 __AROS_LCA(a4); \
623 __AROS_LCA(a5); \
624 __AROS_LCA(a6); \
625 __AROS_LCA(a7); \
626 __AROS_LCA(a8); \
627 __AROS_LCA(a9); \
628 __AROS_LC_BASE(bt,bn); \
629 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
631 #define AROS_LC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
632 ({ \
633 __AROS_LPA(a1); \
634 __AROS_LPA(a2); \
635 __AROS_LPA(a3); \
636 __AROS_LPA(a4); \
637 __AROS_LPA(a5); \
638 __AROS_LPA(a6); \
639 __AROS_LPA(a7); \
640 __AROS_LPA(a8); \
641 __AROS_LPA(a9); \
642 __AROS_LPA(a10); \
643 __AROS_LP_BASE(bt,bn); \
644 __AROS_LCA(a1); \
645 __AROS_LCA(a2); \
646 __AROS_LCA(a3); \
647 __AROS_LCA(a4); \
648 __AROS_LCA(a5); \
649 __AROS_LCA(a6); \
650 __AROS_LCA(a7); \
651 __AROS_LCA(a8); \
652 __AROS_LCA(a9); \
653 __AROS_LCA(a10); \
654 __AROS_LC_BASE(bt,bn); \
655 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
657 #define AROS_LC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
658 ({ \
659 __AROS_LPA(a1); \
660 __AROS_LPA(a2); \
661 __AROS_LPA(a3); \
662 __AROS_LPA(a4); \
663 __AROS_LPA(a5); \
664 __AROS_LPA(a6); \
665 __AROS_LPA(a7); \
666 __AROS_LPA(a8); \
667 __AROS_LPA(a9); \
668 __AROS_LPA(a10); \
669 __AROS_LPA(a11); \
670 __AROS_LP_BASE(bt,bn); \
671 __AROS_LCA(a1); \
672 __AROS_LCA(a2); \
673 __AROS_LCA(a3); \
674 __AROS_LCA(a4); \
675 __AROS_LCA(a5); \
676 __AROS_LCA(a6); \
677 __AROS_LCA(a7); \
678 __AROS_LCA(a8); \
679 __AROS_LCA(a9); \
680 __AROS_LCA(a10); \
681 __AROS_LCA(a11); \
682 __AROS_LC_BASE(bt,bn); \
683 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
685 #define AROS_LC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
686 ({ \
687 __AROS_LPA(a1); \
688 __AROS_LPA(a2); \
689 __AROS_LPA(a3); \
690 __AROS_LPA(a4); \
691 __AROS_LPA(a5); \
692 __AROS_LPA(a6); \
693 __AROS_LPA(a7); \
694 __AROS_LPA(a8); \
695 __AROS_LPA(a9); \
696 __AROS_LPA(a10); \
697 __AROS_LPA(a11); \
698 __AROS_LPA(a12); \
699 __AROS_LP_BASE(bt,bn); \
700 __AROS_LCA(a1); \
701 __AROS_LCA(a2); \
702 __AROS_LCA(a3); \
703 __AROS_LCA(a4); \
704 __AROS_LCA(a5); \
705 __AROS_LCA(a6); \
706 __AROS_LCA(a7); \
707 __AROS_LCA(a8); \
708 __AROS_LCA(a9); \
709 __AROS_LCA(a10); \
710 __AROS_LCA(a11); \
711 __AROS_LCA(a12); \
712 __AROS_LC_BASE(bt,bn); \
713 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
715 #define AROS_LC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
716 ({ \
717 __AROS_LPA(a1); \
718 __AROS_LPA(a2); \
719 __AROS_LPA(a3); \
720 __AROS_LPA(a4); \
721 __AROS_LPA(a5); \
722 __AROS_LPA(a6); \
723 __AROS_LPA(a7); \
724 __AROS_LPA(a8); \
725 __AROS_LPA(a9); \
726 __AROS_LPA(a10); \
727 __AROS_LPA(a11); \
728 __AROS_LPA(a12); \
729 __AROS_LPA(a13); \
730 __AROS_LP_BASE(bt,bn); \
731 __AROS_LCA(a1); \
732 __AROS_LCA(a2); \
733 __AROS_LCA(a3); \
734 __AROS_LCA(a4); \
735 __AROS_LCA(a5); \
736 __AROS_LCA(a6); \
737 __AROS_LCA(a7); \
738 __AROS_LCA(a8); \
739 __AROS_LCA(a9); \
740 __AROS_LCA(a10); \
741 __AROS_LCA(a11); \
742 __AROS_LCA(a12); \
743 __AROS_LCA(a13); \
744 __AROS_LC_BASE(bt,bn); \
745 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
747 #define AROS_LC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
748 ({ \
749 __AROS_LPA(a1); \
750 __AROS_LPA(a2); \
751 __AROS_LPA(a3); \
752 __AROS_LPA(a4); \
753 __AROS_LPA(a5); \
754 __AROS_LPA(a6); \
755 __AROS_LPA(a7); \
756 __AROS_LPA(a8); \
757 __AROS_LPA(a9); \
758 __AROS_LPA(a10); \
759 __AROS_LPA(a11); \
760 __AROS_LPA(a12); \
761 __AROS_LPA(a13); \
762 __AROS_LPA(a14); \
763 __AROS_LP_BASE(bt,bn); \
764 __AROS_LCA(a1); \
765 __AROS_LCA(a2); \
766 __AROS_LCA(a3); \
767 __AROS_LCA(a4); \
768 __AROS_LCA(a5); \
769 __AROS_LCA(a6); \
770 __AROS_LCA(a7); \
771 __AROS_LCA(a8); \
772 __AROS_LCA(a9); \
773 __AROS_LCA(a10); \
774 __AROS_LCA(a11); \
775 __AROS_LCA(a12); \
776 __AROS_LCA(a13); \
777 __AROS_LCA(a14); \
778 __AROS_LC_BASE(bt,bn); \
779 (t)MyEmulHandle->EmulCallDirectOS(- 6 *o); \
781 #define AROS_LC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
782 ({ \
783 __AROS_LPA(a1); \
784 __AROS_LPA(a2); \
785 __AROS_LPA(a3); \
786 __AROS_LPA(a4); \
787 __AROS_LPA(a5); \
788 __AROS_LPA(a6); \
789 __AROS_LPA(a7); \
790 __AROS_LPA(a8); \
791 __AROS_LPA(a9); \
792 __AROS_LPA(a10); \
793 __AROS_LPA(a11); \
794 __AROS_LPA(a12); \
795 __AROS_LPA(a13); \
796 __AROS_LPA(a14); \
797 __AROS_LPA(a15); \
798 __AROS_LP_BASE(bt,bn); \
799 __AROS_LCA(a1); \
800 __AROS_LCA(a2); \
801 __AROS_LCA(a3); \
802 __AROS_LCA(a4); \
803 __AROS_LCA(a5); \
804 __AROS_LCA(a6); \
805 __AROS_LCA(a7); \
806 __AROS_LCA(a8); \
807 __AROS_LCA(a9); \
808 __AROS_LCA(a10); \
809 __AROS_LCA(a11); \
810 __AROS_LCA(a12); \
811 __AROS_LCA(a13); \
812 __AROS_LCA(a14); \
813 __AROS_LCA(a15); \
814 __AROS_LC_BASE(bt,bn); \
815 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
818 /* Call a library function which doesn't require the libbase */
819 #define AROS_LC0I(t,n,bt,bn,o,s) \
820 AROS_LC0(t,n,bt,bn,o,s)
821 #define AROS_LC1I(t,n,a1,bt,bn,o,s) \
822 AROS_LC1(t,n,a1,bt,bn,o,s)
823 #define AROS_LC2I(t,n,a1,a2,bt,bn,o,s) \
824 AROS_LC2(t,n,a1,a2,bt,bn,o,s)
825 #define AROS_LC3I(t,n,a1,a2,a3,bt,bn,o,s) \
826 AROS_LC3(t,n,a1,a2,a3,bt,bn,o,s)
827 #define AROS_LC4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
828 AROS_LC4(t,n,a1,a2,a3,a4,bt,bn,o,s)
829 #define AROS_LC5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
830 AROS_LC5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s)
831 #define AROS_LC6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
832 AROS_LC6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s)
833 #define AROS_LC7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
834 AROS_LC7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s)
835 #define AROS_LC8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
836 AROS_LC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s)
837 #define AROS_LC9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
838 AROS_LC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s)
839 #define AROS_LC10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
840 AROS_LC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s)
841 #define AROS_LC11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
842 AROS_LC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s)
843 #define AROS_LC12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
844 AROS_LC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s)
845 #define AROS_LC13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
846 AROS_LC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s)
847 #define AROS_LC14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
848 AROS_LC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s)
849 #define AROS_LC15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
850 AROS_LC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s)
852 /* Special calls: Call a library function without the name just by the offset */
854 #ifndef AROS_LVO_CALL0
855 #define AROS_LVO_CALL0(returntype,basetype,basename,offset,system) \
856 (((__AROS_LC_PREFIX returntype(*)(__AROS_LP_BASE(basetype,basename)))\
857 __AROS_GETVECADDR(basename,offset))(basename))
858 #endif
860 #ifndef AROS_LVO_CALL0NR
861 #define AROS_LVO_CALL0NR(basetype,basename,offset,system) \
862 (((__AROS_LC_PREFIX void(*)(__AROS_LP_BASE(basetype,basename)))\
863 __AROS_GETVECADDR(basename,offset))(basename))
864 #endif
866 #ifndef AROS_LVO_CALL1
867 #define AROS_LVO_CALL1(t,a1,bt,bn,o,s) \
868 (((__AROS_LC_PREFIX t(*)(\
869 __AROS_LPA(a1),\
870 __AROS_LP_BASE(bt,bn)))\
871 __AROS_GETVECADDR(bn,o))(\
872 __AROS_LCA(a1),\
873 bn))
874 #endif
876 #ifndef AROS_LVO_CALL1NR
877 #define AROS_LVO_CALL1NR(a1,bt,bn,o,s) \
878 (((__AROS_LC_PREFIX void(*)(\
879 __AROS_LPA(a1),\
880 __AROS_LP_BASE(bt,bn)))\
881 __AROS_GETVECADDR(bn,o))(\
882 __AROS_LCA(a1),\
883 bn))
884 #endif
886 #ifndef AROS_LVO_CALL2
887 #define AROS_LVO_CALL2(t,a1,a2,bt,bn,o,s) \
888 (((__AROS_LC_PREFIX t(*)(\
889 __AROS_LPA(a1),\
890 __AROS_LPA(a2),\
891 __AROS_LP_BASE(bt,bn)))\
892 __AROS_GETVECADDR(bn,o))(\
893 __AROS_LCA(a1),\
894 __AROS_LCA(a2),\
895 bn))
896 #endif
898 #ifndef AROS_LVO_CALL2NR
899 #define AROS_LVO_CALL2NR(a1,a2,bt,bn,o,s) \
900 (((__AROS_LC_PREFIX void(*)(\
901 __AROS_LPA(a1),\
902 __AROS_LPA(a2),\
903 __AROS_LP_BASE(bt,bn)))\
904 __AROS_GETVECADDR(bn,o))(\
905 __AROS_LCA(a1),\
906 __AROS_LCA(a2),\
907 bn))
908 #endif
910 #ifndef AROS_LVO_CALL3
911 #define AROS_LVO_CALL3(t,a1,a2,a3,bt,bn,o,s) \
912 (((__AROS_LC_PREFIX t(*)(\
913 __AROS_LPA(a1),\
914 __AROS_LPA(a2),\
915 __AROS_LPA(a3),\
916 __AROS_LP_BASE(bt,bn)))\
917 __AROS_GETVECADDR(bn,o))(\
918 __AROS_LCA(a1),\
919 __AROS_LCA(a2),\
920 __AROS_LCA(a3),\
921 bn))
922 #endif
924 #ifndef AROS_LVO_CALL3NR
925 #define AROS_LVO_CALL3NR(a1,a2,a3,bt,bn,o,s) \
926 (((__AROS_LC_PREFIX void(*)(\
927 __AROS_LPA(a1),\
928 __AROS_LPA(a2),\
929 __AROS_LPA(a3),\
930 __AROS_LP_BASE(bt,bn)))\
931 __AROS_GETVECADDR(bn,o))(\
932 __AROS_LCA(a1),\
933 __AROS_LCA(a2),\
934 __AROS_LCA(a3),\
935 bn))
936 #endif
938 #ifndef AROS_LVO_CALL4
939 #define AROS_LVO_CALL4(t,a1,a2,a3,a4,bt,bn,o,s) \
940 (((__AROS_LC_PREFIX t(*)(\
941 __AROS_LPA(a1),\
942 __AROS_LPA(a2),\
943 __AROS_LPA(a3),\
944 __AROS_LPA(a4),\
945 __AROS_LP_BASE(bt,bn)))\
946 __AROS_GETVECADDR(bn,o))(\
947 __AROS_LCA(a1),\
948 __AROS_LCA(a2),\
949 __AROS_LCA(a3),\
950 __AROS_LCA(a4),\
951 bn))
952 #endif
954 #ifndef AROS_LVO_CALL4NR
955 #define AROS_LVO_CALL4NR(a1,a2,a3,a4,bt,bn,o,s) \
956 (((__AROS_LC_PREFIX void(*)(\
957 __AROS_LPA(a1),\
958 __AROS_LPA(a2),\
959 __AROS_LPA(a3),\
960 __AROS_LPA(a4),\
961 __AROS_LP_BASE(bt,bn)))\
962 __AROS_GETVECADDR(bn,o))(\
963 __AROS_LCA(a1),\
964 __AROS_LCA(a2),\
965 __AROS_LCA(a3),\
966 __AROS_LCA(a4),\
967 bn))
968 #endif
970 #ifndef AROS_LVO_CALL5
971 #define AROS_LVO_CALL5(t,a1,a2,a3,a4,a5,bt,bn,o,s) \
972 (((__AROS_LC_PREFIX t(*)(\
973 __AROS_LPA(a1),\
974 __AROS_LPA(a2),\
975 __AROS_LPA(a3),\
976 __AROS_LPA(a4),\
977 __AROS_LPA(a5),\
978 __AROS_LP_BASE(bt,bn)))\
979 __AROS_GETVECADDR(bn,o))(\
980 __AROS_LCA(a1),\
981 __AROS_LCA(a2),\
982 __AROS_LCA(a3),\
983 __AROS_LCA(a4),\
984 __AROS_LCA(a5),\
985 bn))
986 #endif
988 #ifndef AROS_LVO_CALL5NR
989 #define AROS_LVO_CALL5NR(a1,a2,a3,a4,a5,bt,bn,o,s) \
990 (((__AROS_LC_PREFIX void(*)(\
991 __AROS_LPA(a1),\
992 __AROS_LPA(a2),\
993 __AROS_LPA(a3),\
994 __AROS_LPA(a4),\
995 __AROS_LPA(a5),\
996 __AROS_LP_BASE(bt,bn)))\
997 __AROS_GETVECADDR(bn,o))(\
998 __AROS_LCA(a1),\
999 __AROS_LCA(a2),\
1000 __AROS_LCA(a3),\
1001 __AROS_LCA(a4),\
1002 __AROS_LCA(a5),\
1003 bn))
1004 #endif
1005 #endif /* !(UseRegisterArgs && defined(AROS_COMPILER_NO_REGARGS)) */
1007 #ifdef __AROS_USE_MACROS_FOR_LIBCALL
1008 # define AROS_LPQUAD1(t,n,a1,bt,bn,o,s)
1009 # define AROS_LPQUAD2(t,n,a1,a2,bt,bn,o,s)
1011 # define AROS_LP0(t,n,bt,bn,o,s)
1012 # define AROS_LP1(t,n,a1,bt,bn,o,s)
1013 # define AROS_LP2(t,n,a1,a2,bt,bn,o,s)
1014 # define AROS_LP3(t,n,a1,a2,a3,bt,bn,o,s)
1015 # define AROS_LP4(t,n,a1,a2,a3,a4,bt,bn,o,s)
1016 # define AROS_LP5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s)
1017 # define AROS_LP6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s)
1018 # define AROS_LP7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s)
1019 # define AROS_LP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s)
1020 # define AROS_LP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s)
1021 # define AROS_LP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s)
1022 # define AROS_LP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s)
1023 # define AROS_LP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s)
1024 # define AROS_LP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s)
1025 # define AROS_LP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s)
1026 # define AROS_LP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s)
1028 # define AROS_LP0I(t,n,bt,bn,o,s)
1029 # define AROS_LP1I(t,n,a1,bt,bn,o,s)
1030 # define AROS_LP2I(t,n,a1,a2,bt,bn,o,s)
1031 # define AROS_LP3I(t,n,a1,a2,a3,bt,bn,o,s)
1032 # define AROS_LP4I(t,n,a1,a2,a3,a4,bt,bn,o,s)
1033 # define AROS_LP5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s)
1034 # define AROS_LP6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s)
1035 # define AROS_LP7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s)
1036 # define AROS_LP8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s)
1037 # define AROS_LP9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s)
1038 # define AROS_LP10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s)
1039 # define AROS_LP11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s)
1040 # define AROS_LP12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s)
1041 # define AROS_LP13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s)
1042 # define AROS_LP14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s)
1043 # define AROS_LP15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s)
1044 #else
1045 /* Prototypes for library functions which need the libbase */
1046 # define AROS_LPQUAD1(t,n,a1,bt,bn,o,s) \
1047 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (a1,__AROS_LP_BASE(bt,bn))
1048 # define AROS_LPQUAD2(t,n,a1,a2,bt,bn,o,s) \
1049 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (a1,a2,__AROS_LP_BASE(bt,bn))
1051 # define AROS_LP0(t,n,bt,bn,o,s) \
1052 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1053 # define AROS_LP1(t,n,a1,bt,bn,o,s) \
1054 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1055 # define AROS_LP2(t,n,a1,a2,bt,bn,o,s) \
1056 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1057 # define AROS_LP3(t,n,a1,a2,a3,bt,bn,o,s) \
1058 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1059 # define AROS_LP4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1060 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1061 # define AROS_LP5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1062 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1063 # define AROS_LP6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1064 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1065 # define AROS_LP7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1066 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1067 # define AROS_LP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1068 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1069 # define AROS_LP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1070 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1071 # define AROS_LP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1072 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1073 # define AROS_LP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1074 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1075 # define AROS_LP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1076 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1077 # define AROS_LP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1078 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1079 # define AROS_LP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1080 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1081 # define AROS_LP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1082 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1084 /* Prototypes for library functions which don't need the libbase */
1085 # define AROS_LP0I(t,n,bt,bn,o,s) \
1086 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1087 # define AROS_LP1I(t,n,a1,bt,bn,o,s) \
1088 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1089 # define AROS_LP2I(t,n,a1,a2,bt,bn,o,s) \
1090 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1091 # define AROS_LP3I(t,n,a1,a2,a3,bt,bn,o,s) \
1092 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1093 # define AROS_LP4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1094 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1095 # define AROS_LP5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1096 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1097 # define AROS_LP6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1098 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1099 # define AROS_LP7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1100 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1101 # define AROS_LP8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1102 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1103 # define AROS_LP9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1104 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1105 # define AROS_LP10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1106 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1107 # define AROS_LP11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1108 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1109 # define AROS_LP12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1110 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1111 # define AROS_LP13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1112 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1113 # define AROS_LP14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1114 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1115 # define AROS_LP15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1116 __AROS_LP_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1117 #endif
1119 /* Declarations for library functions which need the libbase */
1120 # define AROS_LD0(t,n,bt,bn,o,s) \
1121 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1122 # define AROS_LD1(t,n,a1,bt,bn,o,s) \
1123 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1124 # define AROS_LD2(t,n,a1,a2,bt,bn,o,s) \
1125 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1126 # define AROS_LD3(t,n,a1,a2,a3,bt,bn,o,s) \
1127 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1128 # define AROS_LD4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1129 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1130 # define AROS_LD5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1131 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1132 # define AROS_LD6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1133 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1134 # define AROS_LD7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1135 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1136 # define AROS_LD8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1137 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1138 # define AROS_LD9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1139 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1140 # define AROS_LD10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1141 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1142 # define AROS_LD11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1143 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1144 # define AROS_LD12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1145 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1146 # define AROS_LD13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1147 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1148 # define AROS_LD14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1149 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1150 # define AROS_LD15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1151 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1153 /* Declarations for library functions which don't need the libbase */
1154 # define AROS_LD0I(t,n,bt,bn,o,s) \
1155 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1156 # define AROS_LD1I(t,n,a1,bt,bn,o,s) \
1157 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1158 __AROS_LDA(a1))
1159 # define AROS_LD2I(t,n,a1,a2,bt,bn,o,s) \
1160 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1161 __AROS_LDA(a1), \
1162 __AROS_LDA(a2))
1163 # define AROS_LD3I(t,n,a1,a2,a3,bt,bn,o,s) \
1164 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1165 __AROS_LDA(a1), \
1166 __AROS_LDA(a2), \
1167 __AROS_LDA(a3))
1168 # define AROS_LD4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1169 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1170 __AROS_LDA(a1), \
1171 __AROS_LDA(a2), \
1172 __AROS_LDA(a3), \
1173 __AROS_LDA(a4))
1174 # define AROS_LD5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1175 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1176 __AROS_LDA(a1), \
1177 __AROS_LDA(a2), \
1178 __AROS_LDA(a3), \
1179 __AROS_LDA(a4), \
1180 __AROS_LDA(a5))
1181 # define AROS_LD6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1182 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1183 __AROS_LDA(a1), \
1184 __AROS_LDA(a2), \
1185 __AROS_LDA(a3), \
1186 __AROS_LDA(a4), \
1187 __AROS_LDA(a5), \
1188 __AROS_LDA(a6))
1189 # define AROS_LD7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1190 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1191 __AROS_LDA(a1), \
1192 __AROS_LDA(a2), \
1193 __AROS_LDA(a3), \
1194 __AROS_LDA(a4), \
1195 __AROS_LDA(a5), \
1196 __AROS_LDA(a6), \
1197 __AROS_LDA(a7))
1198 # define AROS_LD8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1199 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1200 __AROS_LDA(a1), \
1201 __AROS_LDA(a2), \
1202 __AROS_LDA(a3), \
1203 __AROS_LDA(a4), \
1204 __AROS_LDA(a5), \
1205 __AROS_LDA(a6), \
1206 __AROS_LDA(a7), \
1207 __AROS_LDA(a8))
1208 # define AROS_LD9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1209 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1210 __AROS_LDA(a1), \
1211 __AROS_LDA(a2), \
1212 __AROS_LDA(a3), \
1213 __AROS_LDA(a4), \
1214 __AROS_LDA(a5), \
1215 __AROS_LDA(a6), \
1216 __AROS_LDA(a7), \
1217 __AROS_LDA(a8), \
1218 __AROS_LDA(a9))
1219 # define AROS_LD10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1220 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1221 __AROS_LDA(a1), \
1222 __AROS_LDA(a2), \
1223 __AROS_LDA(a3), \
1224 __AROS_LDA(a4), \
1225 __AROS_LDA(a5), \
1226 __AROS_LDA(a6), \
1227 __AROS_LDA(a7), \
1228 __AROS_LDA(a8), \
1229 __AROS_LDA(a9), \
1230 __AROS_LDA(a10))
1231 # define AROS_LD11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1232 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1233 __AROS_LDA(a1), \
1234 __AROS_LDA(a2), \
1235 __AROS_LDA(a3), \
1236 __AROS_LDA(a4), \
1237 __AROS_LDA(a5), \
1238 __AROS_LDA(a6), \
1239 __AROS_LDA(a7), \
1240 __AROS_LDA(a8), \
1241 __AROS_LDA(a9), \
1242 __AROS_LDA(a10), \
1243 __AROS_LDA(a11))
1244 # define AROS_LD12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1245 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1246 __AROS_LDA(a1), \
1247 __AROS_LDA(a2), \
1248 __AROS_LDA(a3), \
1249 __AROS_LDA(a4), \
1250 __AROS_LDA(a5), \
1251 __AROS_LDA(a6), \
1252 __AROS_LDA(a7), \
1253 __AROS_LDA(a8), \
1254 __AROS_LDA(a9), \
1255 __AROS_LDA(a10), \
1256 __AROS_LDA(a11), \
1257 __AROS_LDA(a12))
1258 # define AROS_LD13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1259 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1260 __AROS_LDA(a1), \
1261 __AROS_LDA(a2), \
1262 __AROS_LDA(a3), \
1263 __AROS_LDA(a4), \
1264 __AROS_LDA(a5), \
1265 __AROS_LDA(a6), \
1266 __AROS_LDA(a7), \
1267 __AROS_LDA(a8), \
1268 __AROS_LDA(a9), \
1269 __AROS_LDA(a10), \
1270 __AROS_LDA(a11), \
1271 __AROS_LDA(a12), \
1272 __AROS_LDA(a13))
1273 # define AROS_LD14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1274 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1275 __AROS_LDA(a1), \
1276 __AROS_LDA(a2), \
1277 __AROS_LDA(a3), \
1278 __AROS_LDA(a4), \
1279 __AROS_LDA(a5), \
1280 __AROS_LDA(a6), \
1281 __AROS_LDA(a7), \
1282 __AROS_LDA(a8), \
1283 __AROS_LDA(a9), \
1284 __AROS_LDA(a10), \
1285 __AROS_LDA(a11), \
1286 __AROS_LDA(a12), \
1287 __AROS_LDA(a13), \
1288 __AROS_LDA(a14))
1289 # define AROS_LD15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1290 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1291 __AROS_LDA(a1), \
1292 __AROS_LDA(a2), \
1293 __AROS_LDA(a3), \
1294 __AROS_LDA(a4), \
1295 __AROS_LDA(a5), \
1296 __AROS_LDA(a6), \
1297 __AROS_LDA(a7), \
1298 __AROS_LDA(a8), \
1299 __AROS_LDA(a9), \
1300 __AROS_LDA(a10), \
1301 __AROS_LDA(a11), \
1302 __AROS_LDA(a12), \
1303 __AROS_LDA(a13), \
1304 __AROS_LDA(a14), \
1305 __AROS_LDA(a15))
1307 #define AROS_LHA(type,name,reg) type,name,reg
1308 #define AROS_LPA(type,name,reg) type,name,reg
1309 #define AROS_LCA(type,name,reg) type,name,reg
1310 #define AROS_LDA(type,name,reg) type,name,reg
1312 #define AROS_LHAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1313 #define AROS_LPAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1314 #define AROS_LCAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1316 #ifndef AROS_LIBFUNC_INIT
1317 # define AROS_LIBFUNC_INIT {
1318 #endif
1319 #ifndef AROS_LIBFUNC_EXIT
1320 # define AROS_LIBFUNC_EXIT }
1321 #endif
1322 #ifndef AROS_LIBBASE_EXT_DECL
1323 # define AROS_LIBBASE_EXT_DECL(a,b)
1324 #endif
1326 /******************************************************************************
1327 ***** ENDE aros/libcall.h
1328 ******************************************************************************/
1330 #endif /* AROS_LIBCALL_H */
1331 #pragma pack()