Added option to build for amiga-m68k
[AROS.git] / compiler / arossupport / include / libcall.h
bloba7c62aadadfb5c7d20de8012f2db68450ef52a36
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef AROS_LIBCALL_H
7 #define AROS_LIBCALL_H
9 /******************************************************************************
11 MODUL
12 $Id$
14 DESCRIPTION
15 Some macros to build functions with registerized parameters on the
16 different compilers around. Usage:
18 AROS_LH<n><f>(type, name,
19 [AROS_LHA(type1, name1, reg1),] ...
20 libtype, libvariable, lvo, basename
23 AROS_LIBFUNC_INIT
24 \* Function starts here. *\
25 AROS_LIBFUNC_EXIT
28 <n> - Number of arguments of the function (not including the
29 library base).
31 <f> - 'I' means: Function ignores library base.
32 This is useful to get rid of warnings about unused arguments.
34 type - Returntype of the function.
36 name - Name of the function. A underscore '_' is prepended so that
37 following functions jump over the base vector and don't call
38 the function directly.
40 type<i>, name<i>, reg<i> - Type, name and register for the
41 arguments. Register names are written uppercase because they
42 are preprocessor symbols.
44 Example: Define an Exec-compatible RemHead function.
46 AROS_LH1I(struct Node *, RemHead,
47 struct List *, list, A0,
48 struct ExecBase, SysBase, 43, Exec)
50 // No ";" !!
51 AROS_LIBFUNC_INIT
53 struct Node *node;
55 node=list->lh_Head;
56 if(node->ln_Succ==NULL)
57 return NULL;
58 Remove(node);
59 return node;
61 // after return !!
62 AROS_LIBFUNC_EXIT
65 ******************************************************************************/
67 /* System-Specific things */
68 #ifndef AROS_SYSTEM_H
69 # include <aros/system.h>
70 #endif
72 #ifdef __AROS_LIBCALL_H_FILE
73 #include __AROS_LIBCALL_H_FILE
74 #endif
76 #ifndef __typedef_VOID_FUNC
77 #define __typedef_VOID_FUNC
78 typedef void (*VOID_FUNC)();
79 #endif
80 #ifndef __typedef_LONG_FUNC
81 #define __typedef_LONG_FUNC
82 typedef int (*LONG_FUNC)();
83 #endif
84 #ifndef __typedef_ULONG_FUNC
85 #define __typedef_ULONG_FUNC
86 typedef unsigned int (*ULONG_FUNC)();
87 #endif
89 /* Prefix for library function in header, prototype and call */
90 #ifndef __AROS_LH_PREFIX
91 #define __AROS_LH_PREFIX /* eps */
92 #endif
93 #ifndef __AROS_LP_PREFIX
94 #define __AROS_LP_PREFIX /* eps */
95 #endif
96 #ifndef __AROS_LC_PREFIX
97 #define __AROS_LC_PREFIX /* eps */
98 #endif
99 #ifndef __AROS_LD_PREFIX
100 #define __AROS_LD_PREFIX /* eps */
101 #endif
103 /* What to do with the library base in header, prototype and call */
104 #ifndef __AROS_LH_BASE
105 #define __AROS_LH_BASE(basetype,basename) basetype basename
106 #endif
107 #ifndef __AROS_LP_BASE
108 #define __AROS_LP_BASE(basetype,basename) basetype
109 #endif
110 #ifndef __AROS_LC_BASE
111 #define __AROS_LC_BASE(basetype,basename) basename
112 #endif
113 #ifndef __AROS_LD_BASE
114 #define __AROS_LD_BASE(basetype,basename) basetype
115 #endif
117 /* How to transform an argument in header, opt prototype, call and forced
118 prototype. */
119 #ifndef __AROS_LHA
120 #define __AROS_LHA(type,name,reg) type name
121 #endif
122 #ifndef __AROS_LPA
123 #define __AROS_LPA(type,name,reg) type
124 #endif
125 #ifndef __AROS_LCA
126 #define __AROS_LCA(type,name,reg) (name)
127 #endif
128 #ifndef __AROS_LDA
129 #define __AROS_LDA(type,name,reg) type
130 #endif
131 #ifndef __AROS_LHAQUAD
132 #define __AROS_LHAQUAD(type,name,reg1,reg2) type name
133 #endif
134 #ifndef __AROS_LPAQUAD
135 #define __AROS_LPAQUAD(type,name,reg1,reg2) type
136 #endif
137 #ifndef __AROS_LCAQUAD
138 #define __AROS_LCAQUAD(type,name,reg1,reg2) (name)
139 #endif
140 #ifndef __AROS_LDAQUAD
141 #define __AROS_LDAQUAD(type,name,reg1,reg2) type
142 #endif
144 /* Declare all macros which the systems' libcall didn't */
145 #ifndef __AROS_SLIB_ENTRY
146 # define __AROS_SLIB_ENTRY(n,s,o) s ## _ ## o ## _ ## n
147 #endif
148 #ifndef AROS_SLIB_ENTRY
150 This is to allow the C preprocessor to expand n and s before they are
151 maybe concatenated (the CPP first evaluates a ## b and the tries
152 to expand ab instead of expanding a and b and then concatenating the
153 results
155 # define AROS_SLIB_ENTRY(n,s,o) __AROS_SLIB_ENTRY(n,s,o)
156 #endif
158 #ifndef __AROS_CPU_SPECIFIC_LH
159 /* Library functions which need the libbase */
160 #define AROS_LHQUAD1(t,n,a1,bt,bn,o,s) \
161 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
162 __AROS_LHAQUAD(a1),\
163 __AROS_LH_BASE(bt,bn)) {
164 #define AROS_LHQUAD2(t,n,a1,a2,bt,bn,o,s) \
165 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
166 __AROS_LHAQUAD(a1),\
167 __AROS_LHAQUAD(a2),\
168 __AROS_LH_BASE(bt,bn)) {
169 #define AROS_LH1QUAD1(t,n,a1,a2,bt,bn,o,s) \
170 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
171 __AROS_LHA(a1),\
172 __AROS_LHAQUAD(a2),\
173 __AROS_LH_BASE(bt,bn)) {
174 #define AROS_LH3QUAD1(t,n,a1,a2,a3,a4,bt,bn,o,s) \
175 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
176 __AROS_LHA(a1),\
177 __AROS_LHA(a2),\
178 __AROS_LHA(a3),\
179 __AROS_LHAQUAD(a4),\
180 __AROS_LH_BASE(bt,bn)) {
182 #define AROS_LH0(t,n,bt,bn,o,s) \
183 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
184 __AROS_LH_BASE(bt,bn)) {
185 #define AROS_LH1(t,n,a1,bt,bn,o,s) \
186 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
187 __AROS_LHA(a1),\
188 __AROS_LH_BASE(bt,bn)) {
189 #define AROS_LH2(t,n,a1,a2,bt,bn,o,s) \
190 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
191 __AROS_LHA(a1),\
192 __AROS_LHA(a2),\
193 __AROS_LH_BASE(bt,bn)) {
194 #define AROS_LH3(t,n,a1,a2,a3,bt,bn,o,s) \
195 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
196 __AROS_LHA(a1),\
197 __AROS_LHA(a2),\
198 __AROS_LHA(a3),\
199 __AROS_LH_BASE(bt,bn)) {
200 #define AROS_LH4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
201 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
202 __AROS_LHA(a1),\
203 __AROS_LHA(a2),\
204 __AROS_LHA(a3),\
205 __AROS_LHA(a4),\
206 __AROS_LH_BASE(bt,bn)) {
207 #define AROS_LH5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
208 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
209 __AROS_LHA(a1),\
210 __AROS_LHA(a2),\
211 __AROS_LHA(a3),\
212 __AROS_LHA(a4),\
213 __AROS_LHA(a5),\
214 __AROS_LH_BASE(bt,bn)) {
215 #define AROS_LH6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
216 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
217 __AROS_LHA(a1),\
218 __AROS_LHA(a2),\
219 __AROS_LHA(a3),\
220 __AROS_LHA(a4),\
221 __AROS_LHA(a5),\
222 __AROS_LHA(a6),\
223 __AROS_LH_BASE(bt,bn)) {
224 #define AROS_LH7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
225 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
226 __AROS_LHA(a1),\
227 __AROS_LHA(a2),\
228 __AROS_LHA(a3),\
229 __AROS_LHA(a4),\
230 __AROS_LHA(a5),\
231 __AROS_LHA(a6),\
232 __AROS_LHA(a7),\
233 __AROS_LH_BASE(bt,bn)) {
234 #define AROS_LH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
235 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
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_LH_BASE(bt,bn)) {
245 #define AROS_LH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
246 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
247 __AROS_LHA(a1),\
248 __AROS_LHA(a2),\
249 __AROS_LHA(a3),\
250 __AROS_LHA(a4),\
251 __AROS_LHA(a5),\
252 __AROS_LHA(a6),\
253 __AROS_LHA(a7),\
254 __AROS_LHA(a8),\
255 __AROS_LHA(a9),\
256 __AROS_LH_BASE(bt,bn)) {
257 #define AROS_LH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
258 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
259 __AROS_LHA(a1),\
260 __AROS_LHA(a2),\
261 __AROS_LHA(a3),\
262 __AROS_LHA(a4),\
263 __AROS_LHA(a5),\
264 __AROS_LHA(a6),\
265 __AROS_LHA(a7),\
266 __AROS_LHA(a8),\
267 __AROS_LHA(a9),\
268 __AROS_LHA(a10),\
269 __AROS_LH_BASE(bt,bn)) {
270 #define AROS_LH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
271 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
272 __AROS_LHA(a1),\
273 __AROS_LHA(a2),\
274 __AROS_LHA(a3),\
275 __AROS_LHA(a4),\
276 __AROS_LHA(a5),\
277 __AROS_LHA(a6),\
278 __AROS_LHA(a7),\
279 __AROS_LHA(a8),\
280 __AROS_LHA(a9),\
281 __AROS_LHA(a10),\
282 __AROS_LHA(a11),\
283 __AROS_LH_BASE(bt,bn)) {
284 #define AROS_LH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
285 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
286 __AROS_LHA(a1),\
287 __AROS_LHA(a2),\
288 __AROS_LHA(a3),\
289 __AROS_LHA(a4),\
290 __AROS_LHA(a5),\
291 __AROS_LHA(a6),\
292 __AROS_LHA(a7),\
293 __AROS_LHA(a8),\
294 __AROS_LHA(a9),\
295 __AROS_LHA(a10),\
296 __AROS_LHA(a11),\
297 __AROS_LHA(a12),\
298 __AROS_LH_BASE(bt,bn)) {
299 #define AROS_LH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
300 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
301 __AROS_LHA(a1),\
302 __AROS_LHA(a2),\
303 __AROS_LHA(a3),\
304 __AROS_LHA(a4),\
305 __AROS_LHA(a5),\
306 __AROS_LHA(a6),\
307 __AROS_LHA(a7),\
308 __AROS_LHA(a8),\
309 __AROS_LHA(a9),\
310 __AROS_LHA(a10),\
311 __AROS_LHA(a11),\
312 __AROS_LHA(a12),\
313 __AROS_LHA(a13),\
314 __AROS_LH_BASE(bt,bn)) {
315 #define AROS_LH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
316 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
317 __AROS_LHA(a1),\
318 __AROS_LHA(a2),\
319 __AROS_LHA(a3),\
320 __AROS_LHA(a4),\
321 __AROS_LHA(a5),\
322 __AROS_LHA(a6),\
323 __AROS_LHA(a7),\
324 __AROS_LHA(a8),\
325 __AROS_LHA(a9),\
326 __AROS_LHA(a10),\
327 __AROS_LHA(a11),\
328 __AROS_LHA(a12),\
329 __AROS_LHA(a13),\
330 __AROS_LHA(a14),\
331 __AROS_LH_BASE(bt,bn)) {
332 #define AROS_LH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
333 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
334 __AROS_LHA(a1),\
335 __AROS_LHA(a2),\
336 __AROS_LHA(a3),\
337 __AROS_LHA(a4),\
338 __AROS_LHA(a5),\
339 __AROS_LHA(a6),\
340 __AROS_LHA(a7),\
341 __AROS_LHA(a8),\
342 __AROS_LHA(a9),\
343 __AROS_LHA(a10),\
344 __AROS_LHA(a11),\
345 __AROS_LHA(a12),\
346 __AROS_LHA(a13),\
347 __AROS_LHA(a14),\
348 __AROS_LHA(a15),\
349 __AROS_LH_BASE(bt,bn)) {
351 /* Library functions which don't need the libbase */
352 #define AROS_LH0I(t,n,bt,bn,o,s) \
353 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(void) {
354 #define AROS_LH1I(t,n,a1,bt,bn,o,s) \
355 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
356 __AROS_LHA(a1)\
358 #define AROS_LH2I(t,n,a1,a2,bt,bn,o,s) \
359 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
360 __AROS_LHA(a1),\
361 __AROS_LHA(a2)\
363 #define AROS_LH3I(t,n,a1,a2,a3,bt,bn,o,s) \
364 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
365 __AROS_LHA(a1),\
366 __AROS_LHA(a2),\
367 __AROS_LHA(a3)\
369 #define AROS_LH4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
370 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
371 __AROS_LHA(a1),\
372 __AROS_LHA(a2),\
373 __AROS_LHA(a3),\
374 __AROS_LHA(a4)\
376 #define AROS_LH5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
377 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
378 __AROS_LHA(a1),\
379 __AROS_LHA(a2),\
380 __AROS_LHA(a3),\
381 __AROS_LHA(a4),\
382 __AROS_LHA(a5)\
384 #define AROS_LH6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
385 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
386 __AROS_LHA(a1),\
387 __AROS_LHA(a2),\
388 __AROS_LHA(a3),\
389 __AROS_LHA(a4),\
390 __AROS_LHA(a5),\
391 __AROS_LHA(a6)\
393 #define AROS_LH7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
394 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
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)\
403 #define AROS_LH8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
404 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
405 __AROS_LHA(a1),\
406 __AROS_LHA(a2),\
407 __AROS_LHA(a3),\
408 __AROS_LHA(a4),\
409 __AROS_LHA(a5),\
410 __AROS_LHA(a6),\
411 __AROS_LHA(a7),\
412 __AROS_LHA(a8)\
414 #define AROS_LH9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
415 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
416 __AROS_LHA(a1),\
417 __AROS_LHA(a2),\
418 __AROS_LHA(a3),\
419 __AROS_LHA(a4),\
420 __AROS_LHA(a5),\
421 __AROS_LHA(a6),\
422 __AROS_LHA(a7),\
423 __AROS_LHA(a8),\
424 __AROS_LHA(a9)\
426 #define AROS_LH10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
427 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
428 __AROS_LHA(a1),\
429 __AROS_LHA(a2),\
430 __AROS_LHA(a3),\
431 __AROS_LHA(a4),\
432 __AROS_LHA(a5),\
433 __AROS_LHA(a6),\
434 __AROS_LHA(a7),\
435 __AROS_LHA(a8),\
436 __AROS_LHA(a9),\
437 __AROS_LHA(a10)\
439 #define AROS_LH11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
440 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
441 __AROS_LHA(a1),\
442 __AROS_LHA(a2),\
443 __AROS_LHA(a3),\
444 __AROS_LHA(a4),\
445 __AROS_LHA(a5),\
446 __AROS_LHA(a6),\
447 __AROS_LHA(a7),\
448 __AROS_LHA(a8),\
449 __AROS_LHA(a9),\
450 __AROS_LHA(a10),\
451 __AROS_LHA(a11)\
453 #define AROS_LH12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
454 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
455 __AROS_LHA(a1),\
456 __AROS_LHA(a2),\
457 __AROS_LHA(a3),\
458 __AROS_LHA(a4),\
459 __AROS_LHA(a5),\
460 __AROS_LHA(a6),\
461 __AROS_LHA(a7),\
462 __AROS_LHA(a8),\
463 __AROS_LHA(a9),\
464 __AROS_LHA(a10),\
465 __AROS_LHA(a11),\
466 __AROS_LHA(a12)\
468 #define AROS_LH13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
469 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
470 __AROS_LHA(a1),\
471 __AROS_LHA(a2),\
472 __AROS_LHA(a3),\
473 __AROS_LHA(a4),\
474 __AROS_LHA(a5),\
475 __AROS_LHA(a6),\
476 __AROS_LHA(a7),\
477 __AROS_LHA(a8),\
478 __AROS_LHA(a9),\
479 __AROS_LHA(a10),\
480 __AROS_LHA(a11),\
481 __AROS_LHA(a12),\
482 __AROS_LHA(a13)\
484 #define AROS_LH14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
485 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
486 __AROS_LHA(a1),\
487 __AROS_LHA(a2),\
488 __AROS_LHA(a3),\
489 __AROS_LHA(a4),\
490 __AROS_LHA(a5),\
491 __AROS_LHA(a6),\
492 __AROS_LHA(a7),\
493 __AROS_LHA(a8),\
494 __AROS_LHA(a9),\
495 __AROS_LHA(a10),\
496 __AROS_LHA(a11),\
497 __AROS_LHA(a12),\
498 __AROS_LHA(a13),\
499 __AROS_LHA(a14)\
501 #define AROS_LH15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
502 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s,o)(\
503 __AROS_LHA(a1),\
504 __AROS_LHA(a2),\
505 __AROS_LHA(a3),\
506 __AROS_LHA(a4),\
507 __AROS_LHA(a5),\
508 __AROS_LHA(a6),\
509 __AROS_LHA(a7),\
510 __AROS_LHA(a8),\
511 __AROS_LHA(a9),\
512 __AROS_LHA(a10),\
513 __AROS_LHA(a11),\
514 __AROS_LHA(a12),\
515 __AROS_LHA(a13),\
516 __AROS_LHA(a14),\
517 __AROS_LHA(a15)\
519 #endif /* !__AROS_CPU_SPECIFIC_LH */
522 /* Call a library function which requires the libbase */
523 #ifndef __AROS_CPU_SPECIFIC_LC
524 # define AROS_LCQUAD1(t,n,a1,bt,bn,o,s) \
525 (((__AROS_LC_PREFIX t(*)(\
526 __AROS_LPAQUAD(a1),\
527 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
528 __AROS_LCAQUAD(a1),\
529 __AROS_LC_BASE(bt,bn)))
530 #define AROS_LCQUAD2(t,n,a1,a2,bt,bn,o,s) \
531 (((__AROS_LC_PREFIX t(*)(\
532 __AROS_LPAQUAD(a1),\
533 __AROS_LPAQUAD(a2),\
534 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
535 __AROS_LCAQUAD(a1),\
536 __AROS_LCAQUAD(a2),\
537 __AROS_LC_BASE(bt,bn)))
538 #define AROS_LC1QUAD1(t,n,a1,a2,bt,bn,o,s) \
539 (((__AROS_LC_PREFIX t(*)(\
540 __AROS_LPA(a1),\
541 __AROS_LPAQUAD(a2),\
542 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
543 __AROS_LCA(a1),\
544 __AROS_LCAQUAD(a2),\
545 __AROS_LC_BASE(bt,bn)))
546 #define AROS_LC2QUAD1(t,n,a1,a2,a3,bt,bn,o,s) \
547 (((__AROS_LC_PREFIX t(*)(\
548 __AROS_LPA(a1),\
549 __AROS_LPA(a2),\
550 __AROS_LPAQUAD(a3),\
551 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
552 __AROS_LCA(a1),\
553 __AROS_LCA(a2),\
554 __AROS_LCAQUAD(a3),\
555 __AROS_LC_BASE(bt,bn)))
556 #define AROS_LC3QUAD1(t,n,a1,a2,a3,a4,bt,bn,o,s) \
557 (((__AROS_LC_PREFIX t(*)(\
558 __AROS_LPA(a1),\
559 __AROS_LPA(a2),\
560 __AROS_LPA(a3),\
561 __AROS_LPAQUAD(a4),\
562 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
563 __AROS_LCA(a1),\
564 __AROS_LCA(a2),\
565 __AROS_LCA(a3),\
566 __AROS_LCAQUAD(a4),\
567 __AROS_LC_BASE(bt,bn)))
569 #define AROS_LC0(t,n,bt,bn,o,s) \
570 (((__AROS_LC_PREFIX t(*)(\
571 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
572 __AROS_LC_BASE(bt,bn)))
573 #define AROS_LC1(t,n,a1,bt,bn,o,s) \
574 (((__AROS_LC_PREFIX t(*)(\
575 __AROS_LPA(a1),\
576 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
577 __AROS_LCA(a1),\
578 __AROS_LC_BASE(bt,bn)))
579 #define AROS_LC2(t,n,a1,a2,bt,bn,o,s) \
580 (((__AROS_LC_PREFIX t(*)(\
581 __AROS_LPA(a1),\
582 __AROS_LPA(a2),\
583 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
584 __AROS_LCA(a1),\
585 __AROS_LCA(a2),\
586 __AROS_LC_BASE(bt,bn)))
587 #define AROS_LC3(t,n,a1,a2,a3,bt,bn,o,s) \
588 (((__AROS_LC_PREFIX t(*)(\
589 __AROS_LPA(a1),\
590 __AROS_LPA(a2),\
591 __AROS_LPA(a3),\
592 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
593 __AROS_LCA(a1),\
594 __AROS_LCA(a2),\
595 __AROS_LCA(a3),\
596 __AROS_LC_BASE(bt,bn)))
597 #define AROS_LC4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
598 (((__AROS_LC_PREFIX t(*)(\
599 __AROS_LPA(a1),\
600 __AROS_LPA(a2),\
601 __AROS_LPA(a3),\
602 __AROS_LPA(a4),\
603 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
604 __AROS_LCA(a1),\
605 __AROS_LCA(a2),\
606 __AROS_LCA(a3),\
607 __AROS_LCA(a4),\
608 __AROS_LC_BASE(bt,bn)))
609 #define AROS_LC5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
610 (((__AROS_LC_PREFIX t(*)(\
611 __AROS_LPA(a1),\
612 __AROS_LPA(a2),\
613 __AROS_LPA(a3),\
614 __AROS_LPA(a4),\
615 __AROS_LPA(a5),\
616 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
617 __AROS_LCA(a1),\
618 __AROS_LCA(a2),\
619 __AROS_LCA(a3),\
620 __AROS_LCA(a4),\
621 __AROS_LCA(a5),\
622 __AROS_LC_BASE(bt,bn)))
623 #define AROS_LC6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
624 (((__AROS_LC_PREFIX t(*)(\
625 __AROS_LPA(a1),\
626 __AROS_LPA(a2),\
627 __AROS_LPA(a3),\
628 __AROS_LPA(a4),\
629 __AROS_LPA(a5),\
630 __AROS_LPA(a6),\
631 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
632 __AROS_LCA(a1),\
633 __AROS_LCA(a2),\
634 __AROS_LCA(a3),\
635 __AROS_LCA(a4),\
636 __AROS_LCA(a5),\
637 __AROS_LCA(a6),\
638 __AROS_LC_BASE(bt,bn)))
639 #define AROS_LC7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
640 (((__AROS_LC_PREFIX t(*)(\
641 __AROS_LPA(a1),\
642 __AROS_LPA(a2),\
643 __AROS_LPA(a3),\
644 __AROS_LPA(a4),\
645 __AROS_LPA(a5),\
646 __AROS_LPA(a6),\
647 __AROS_LPA(a7),\
648 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
649 __AROS_LCA(a1),\
650 __AROS_LCA(a2),\
651 __AROS_LCA(a3),\
652 __AROS_LCA(a4),\
653 __AROS_LCA(a5),\
654 __AROS_LCA(a6),\
655 __AROS_LCA(a7),\
656 __AROS_LC_BASE(bt,bn)))
657 #define AROS_LC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
658 (((__AROS_LC_PREFIX t(*)(\
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_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
668 __AROS_LCA(a1),\
669 __AROS_LCA(a2),\
670 __AROS_LCA(a3),\
671 __AROS_LCA(a4),\
672 __AROS_LCA(a5),\
673 __AROS_LCA(a6),\
674 __AROS_LCA(a7),\
675 __AROS_LCA(a8),\
676 __AROS_LC_BASE(bt,bn)))
677 #define AROS_LC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
678 (((__AROS_LC_PREFIX t(*)(\
679 __AROS_LPA(a1),\
680 __AROS_LPA(a2),\
681 __AROS_LPA(a3),\
682 __AROS_LPA(a4),\
683 __AROS_LPA(a5),\
684 __AROS_LPA(a6),\
685 __AROS_LPA(a7),\
686 __AROS_LPA(a8),\
687 __AROS_LPA(a9),\
688 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
689 __AROS_LCA(a1),\
690 __AROS_LCA(a2),\
691 __AROS_LCA(a3),\
692 __AROS_LCA(a4),\
693 __AROS_LCA(a5),\
694 __AROS_LCA(a6),\
695 __AROS_LCA(a7),\
696 __AROS_LCA(a8),\
697 __AROS_LCA(a9),\
698 __AROS_LC_BASE(bt,bn)))
699 #define AROS_LC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
700 (((__AROS_LC_PREFIX t(*)(\
701 __AROS_LPA(a1),\
702 __AROS_LPA(a2),\
703 __AROS_LPA(a3),\
704 __AROS_LPA(a4),\
705 __AROS_LPA(a5),\
706 __AROS_LPA(a6),\
707 __AROS_LPA(a7),\
708 __AROS_LPA(a8),\
709 __AROS_LPA(a9),\
710 __AROS_LPA(a10),\
711 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
712 __AROS_LCA(a1),\
713 __AROS_LCA(a2),\
714 __AROS_LCA(a3),\
715 __AROS_LCA(a4),\
716 __AROS_LCA(a5),\
717 __AROS_LCA(a6),\
718 __AROS_LCA(a7),\
719 __AROS_LCA(a8),\
720 __AROS_LCA(a9),\
721 __AROS_LCA(a10),\
722 __AROS_LC_BASE(bt,bn)))
723 #define AROS_LC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
724 (((__AROS_LC_PREFIX t(*)(\
725 __AROS_LPA(a1),\
726 __AROS_LPA(a2),\
727 __AROS_LPA(a3),\
728 __AROS_LPA(a4),\
729 __AROS_LPA(a5),\
730 __AROS_LPA(a6),\
731 __AROS_LPA(a7),\
732 __AROS_LPA(a8),\
733 __AROS_LPA(a9),\
734 __AROS_LPA(a10),\
735 __AROS_LPA(a11),\
736 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
737 __AROS_LCA(a1),\
738 __AROS_LCA(a2),\
739 __AROS_LCA(a3),\
740 __AROS_LCA(a4),\
741 __AROS_LCA(a5),\
742 __AROS_LCA(a6),\
743 __AROS_LCA(a7),\
744 __AROS_LCA(a8),\
745 __AROS_LCA(a9),\
746 __AROS_LCA(a10),\
747 __AROS_LCA(a11),\
748 __AROS_LC_BASE(bt,bn)))
749 #define AROS_LC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
750 (((__AROS_LC_PREFIX t(*)(\
751 __AROS_LPA(a1),\
752 __AROS_LPA(a2),\
753 __AROS_LPA(a3),\
754 __AROS_LPA(a4),\
755 __AROS_LPA(a5),\
756 __AROS_LPA(a6),\
757 __AROS_LPA(a7),\
758 __AROS_LPA(a8),\
759 __AROS_LPA(a9),\
760 __AROS_LPA(a10),\
761 __AROS_LPA(a11),\
762 __AROS_LPA(a12),\
763 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
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_LC_BASE(bt,bn)))
777 #define AROS_LC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
778 (((__AROS_LC_PREFIX t(*)(\
779 __AROS_LPA(a1),\
780 __AROS_LPA(a2),\
781 __AROS_LPA(a3),\
782 __AROS_LPA(a4),\
783 __AROS_LPA(a5),\
784 __AROS_LPA(a6),\
785 __AROS_LPA(a7),\
786 __AROS_LPA(a8),\
787 __AROS_LPA(a9),\
788 __AROS_LPA(a10),\
789 __AROS_LPA(a11),\
790 __AROS_LPA(a12),\
791 __AROS_LPA(a13),\
792 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
793 __AROS_LCA(a1),\
794 __AROS_LCA(a2),\
795 __AROS_LCA(a3),\
796 __AROS_LCA(a4),\
797 __AROS_LCA(a5),\
798 __AROS_LCA(a6),\
799 __AROS_LCA(a7),\
800 __AROS_LCA(a8),\
801 __AROS_LCA(a9),\
802 __AROS_LCA(a10),\
803 __AROS_LCA(a11),\
804 __AROS_LCA(a12),\
805 __AROS_LCA(a13),\
806 __AROS_LC_BASE(bt,bn)))
807 #define AROS_LC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
808 (((__AROS_LC_PREFIX t(*)(\
809 __AROS_LPA(a1),\
810 __AROS_LPA(a2),\
811 __AROS_LPA(a3),\
812 __AROS_LPA(a4),\
813 __AROS_LPA(a5),\
814 __AROS_LPA(a6),\
815 __AROS_LPA(a7),\
816 __AROS_LPA(a8),\
817 __AROS_LPA(a9),\
818 __AROS_LPA(a10),\
819 __AROS_LPA(a11),\
820 __AROS_LPA(a12),\
821 __AROS_LPA(a13),\
822 __AROS_LPA(a14),\
823 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
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_LC_BASE(bt,bn)))
839 #define AROS_LC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
840 (((__AROS_LC_PREFIX t(*)(\
841 __AROS_LPA(a1),\
842 __AROS_LPA(a2),\
843 __AROS_LPA(a3),\
844 __AROS_LPA(a4),\
845 __AROS_LPA(a5),\
846 __AROS_LPA(a6),\
847 __AROS_LPA(a7),\
848 __AROS_LPA(a8),\
849 __AROS_LPA(a9),\
850 __AROS_LPA(a10),\
851 __AROS_LPA(a11),\
852 __AROS_LPA(a12),\
853 __AROS_LPA(a13),\
854 __AROS_LPA(a14),\
855 __AROS_LPA(a15),\
856 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
857 __AROS_LCA(a1),\
858 __AROS_LCA(a2),\
859 __AROS_LCA(a3),\
860 __AROS_LCA(a4),\
861 __AROS_LCA(a5),\
862 __AROS_LCA(a6),\
863 __AROS_LCA(a7),\
864 __AROS_LCA(a8),\
865 __AROS_LCA(a9),\
866 __AROS_LCA(a10),\
867 __AROS_LCA(a11),\
868 __AROS_LCA(a12),\
869 __AROS_LCA(a13),\
870 __AROS_LCA(a14),\
871 __AROS_LCA(a15),\
872 __AROS_LC_BASE(bt,bn)))
874 /* Macros for calling library functions without a return value. These macros should
875 * always be used when a library function has no return value but can also be used
876 * when the return value is not used
878 #define AROS_LC0NR AROS_LC0
879 #define AROS_LC1NR AROS_LC1
880 #define AROS_LC2NR AROS_LC2
881 #define AROS_LC3NR AROS_LC3
882 #define AROS_LC4NR AROS_LC4
883 #define AROS_LC5NR AROS_LC5
884 #define AROS_LC6NR AROS_LC6
885 #define AROS_LC7NR AROS_LC7
886 #define AROS_LC8NR AROS_LC8
887 #define AROS_LC9NR AROS_LC9
888 #define AROS_LC10NR AROS_LC10
889 #define AROS_LC11NR AROS_LC11
890 #define AROS_LC12NR AROS_LC12
891 #define AROS_LC13NR AROS_LC13
892 #define AROS_LC14NR AROS_LC14
893 #define AROS_LC15NR AROS_LC15
895 #endif /* !__AROS_CPU_SPECIFIC_LC */
898 /* Special calls: Call a library function without the name just by the ADDRESS */
899 #ifndef AROS_CALL0
900 #define AROS_CALL0(returntype,address,basetype,basename) \
901 (((__AROS_LC_PREFIX returntype(*)(__AROS_LD_BASE(basetype,basename)))\
902 (void *)(address))(basename))
903 #define AROS_CALL0NR AROS_CALL0
904 #endif
906 #ifndef AROS_CALL1
907 #define AROS_CALL1(t,a,a1,bt,bn) \
908 (((__AROS_LC_PREFIX t(*)(\
909 __AROS_LDA(a1),\
910 __AROS_LD_BASE(bt,bn)))\
911 (void *)(a))(\
912 __AROS_LCA(a1),\
913 bn))
914 #define AROS_CALL1NR AROS_CALL1
915 #endif
917 #ifndef AROS_CALL2
918 #define AROS_CALL2(t,a,a1,a2,bt,bn) \
919 (((__AROS_LC_PREFIX t(*)(\
920 __AROS_LDA(a1),\
921 __AROS_LDA(a2),\
922 __AROS_LD_BASE(bt,bn)))\
923 (void *)(a))(\
924 __AROS_LCA(a1),\
925 __AROS_LCA(a2),\
926 bn))
927 #define AROS_CALL2NR AROS_CALL2
928 #endif
930 #ifndef AROS_CALL3
931 #define AROS_CALL3(t,a,a1,a2,a3,bt,bn) \
932 (((__AROS_LC_PREFIX t(*)(\
933 __AROS_LDA(a1),\
934 __AROS_LDA(a2),\
935 __AROS_LDA(a3),\
936 __AROS_LD_BASE(bt,bn)))\
937 (void *)(a))(\
938 __AROS_LCA(a1),\
939 __AROS_LCA(a2),\
940 __AROS_LCA(a3),\
941 bn))
942 #define AROS_CALL3NR AROS_CALL3
943 #endif
945 #ifndef AROS_CALL4
946 #define AROS_CALL4(t,a,a1,a2,a3,a4,bt,bn) \
947 (((__AROS_LC_PREFIX t(*)(\
948 __AROS_LDA(a1),\
949 __AROS_LDA(a2),\
950 __AROS_LDA(a3),\
951 __AROS_LDA(a4),\
952 __AROS_LD_BASE(bt,bn)))\
953 (void *)(a))(\
954 __AROS_LCA(a1),\
955 __AROS_LCA(a2),\
956 __AROS_LCA(a3),\
957 __AROS_LCA(a4),\
958 bn))
959 #define AROS_CALL4NR AROS_CALL4
960 #endif
962 #ifndef AROS_CALL5
963 #define AROS_CALL5(t,a,a1,a2,a3,a4,a5,bt,bn) \
964 (((__AROS_LC_PREFIX t(*)(\
965 __AROS_LDA(a1),\
966 __AROS_LDA(a2),\
967 __AROS_LDA(a3),\
968 __AROS_LDA(a4),\
969 __AROS_LDA(a5),\
970 __AROS_LD_BASE(bt,bn)))\
971 (void *)(a))(\
972 __AROS_LCA(a1),\
973 __AROS_LCA(a2),\
974 __AROS_LCA(a3),\
975 __AROS_LCA(a4),\
976 __AROS_LCA(a5),\
977 bn))
978 #define AROS_CALL5NR AROS_CALL5
979 #endif
981 #ifndef AROS_CALL6
982 #define AROS_CALL6(t,a,a1,a2,a3,a4,a5,a6,bt,bn) \
983 (((__AROS_LC_PREFIX t(*)(\
984 __AROS_LDA(a1),\
985 __AROS_LDA(a2),\
986 __AROS_LDA(a3),\
987 __AROS_LDA(a4),\
988 __AROS_LDA(a5),\
989 __AROS_LDA(a6),\
990 __AROS_LD_BASE(bt,bn)))\
991 (void *)(a))(\
992 __AROS_LCA(a1),\
993 __AROS_LCA(a2),\
994 __AROS_LCA(a3),\
995 __AROS_LCA(a4),\
996 __AROS_LCA(a5),\
997 __AROS_LCA(a6),\
998 bn))
999 #define AROS_CALL6NR AROS_CALL6
1000 #endif
1002 #ifndef AROS_CALL7
1003 #define AROS_CALL7(t,a,a1,a2,a3,a4,a5,a6,a7,bt,bn) \
1004 (((__AROS_LC_PREFIX t(*)(\
1005 __AROS_LDA(a1),\
1006 __AROS_LDA(a2),\
1007 __AROS_LDA(a3),\
1008 __AROS_LDA(a4),\
1009 __AROS_LDA(a5),\
1010 __AROS_LDA(a6),\
1011 __AROS_LDA(a7),\
1012 __AROS_LD_BASE(bt,bn)))\
1013 (void *)(a))(\
1014 __AROS_LCA(a1),\
1015 __AROS_LCA(a2),\
1016 __AROS_LCA(a3),\
1017 __AROS_LCA(a4),\
1018 __AROS_LCA(a5),\
1019 __AROS_LCA(a6),\
1020 __AROS_LCA(a7),\
1021 bn))
1022 #define AROS_CALL7NR AROS_CALL7
1023 #endif
1025 #ifndef AROS_CALL8
1026 #define AROS_CALL8(t,a,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn) \
1027 (((__AROS_LC_PREFIX t(*)(\
1028 __AROS_LDA(a1),\
1029 __AROS_LDA(a2),\
1030 __AROS_LDA(a3),\
1031 __AROS_LDA(a4),\
1032 __AROS_LDA(a5),\
1033 __AROS_LDA(a6),\
1034 __AROS_LDA(a7),\
1035 __AROS_LDA(a8),\
1036 __AROS_LD_BASE(bt,bn)))\
1037 (void *)(a))(\
1038 __AROS_LCA(a1),\
1039 __AROS_LCA(a2),\
1040 __AROS_LCA(a3),\
1041 __AROS_LCA(a4),\
1042 __AROS_LCA(a5),\
1043 __AROS_LCA(a6),\
1044 __AROS_LCA(a7),\
1045 __AROS_LCA(a8),\
1046 bn))
1047 #define AROS_CALL8NR AROS_CALL8
1048 #endif
1050 #ifndef AROS_CALL9
1051 #define AROS_CALL9(t,a,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn) \
1052 (((__AROS_LC_PREFIX t(*)(\
1053 __AROS_LDA(a1),\
1054 __AROS_LDA(a2),\
1055 __AROS_LDA(a3),\
1056 __AROS_LDA(a4),\
1057 __AROS_LDA(a5),\
1058 __AROS_LDA(a6),\
1059 __AROS_LDA(a7),\
1060 __AROS_LDA(a8),\
1061 __AROS_LDA(a9),\
1062 __AROS_LD_BASE(bt,bn)))\
1063 (void *)(a))(\
1064 __AROS_LCA(a1),\
1065 __AROS_LCA(a2),\
1066 __AROS_LCA(a3),\
1067 __AROS_LCA(a4),\
1068 __AROS_LCA(a5),\
1069 __AROS_LCA(a6),\
1070 __AROS_LCA(a7),\
1071 __AROS_LCA(a8),\
1072 __AROS_LCA(a9),\
1073 bn))
1074 #define AROS_CALL9NR AROS_CALL9
1075 #endif
1077 #ifndef AROS_CALL10
1078 #define AROS_CALL10(t,a,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn) \
1079 (((__AROS_LC_PREFIX t(*)(\
1080 __AROS_LDA(a1),\
1081 __AROS_LDA(a2),\
1082 __AROS_LDA(a3),\
1083 __AROS_LDA(a4),\
1084 __AROS_LDA(a5),\
1085 __AROS_LDA(a6),\
1086 __AROS_LDA(a7),\
1087 __AROS_LDA(a8),\
1088 __AROS_LDA(a9),\
1089 __AROS_LDA(a10),\
1090 __AROS_LD_BASE(bt,bn)))\
1091 (void *)(a))(\
1092 __AROS_LCA(a1),\
1093 __AROS_LCA(a2),\
1094 __AROS_LCA(a3),\
1095 __AROS_LCA(a4),\
1096 __AROS_LCA(a5),\
1097 __AROS_LCA(a6),\
1098 __AROS_LCA(a7),\
1099 __AROS_LCA(a8),\
1100 __AROS_LCA(a9),\
1101 __AROS_LCA(a10),\
1102 bn))
1103 #define AROS_CALL10NR AROS_CALL10
1104 #endif
1106 /* Special calls: Call a library function without the name just by the OFFSET */
1108 #ifndef AROS_LVO_CALL0
1109 #define AROS_LVO_CALL0(returntype,basetype,basename,offset,system) \
1110 AROS_CALL0(returntype,__AROS_GETVECADDR(basename,offset),basetype,basename)
1111 #endif
1113 #ifndef AROS_LVO_CALL0NR
1114 #define AROS_LVO_CALL0NR(returntype,basetype,basename,offset,system) \
1115 AROS_CALL0NR(returntype,__AROS_GETVECADDR(basename,offset),basetype,basename)
1116 #endif
1118 #ifndef AROS_LVO_CALL1
1119 #define AROS_LVO_CALL1(t,a1,bt,bn,o,s) \
1120 AROS_CALL1(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),bt,bn)
1121 #endif
1123 #ifndef AROS_LVO_CALL1NR
1124 #define AROS_LVO_CALL1NR(t,a1,bt,bn,o,s) \
1125 AROS_CALL1NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),bt,bn)
1126 #endif
1128 #ifndef AROS_LVO_CALL2
1129 #define AROS_LVO_CALL2(t,a1,a2,bt,bn,o,s) \
1130 AROS_CALL2(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),bt,bn)
1131 #endif
1133 #ifndef AROS_LVO_CALL2NR
1134 #define AROS_LVO_CALL2NR(t,a1,a2,bt,bn,o,s) \
1135 AROS_CALL2NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),bt,bn)
1136 #endif
1138 #ifndef AROS_LVO_CALL3
1139 #define AROS_LVO_CALL3(t,a1,a2,a3,bt,bn,o,s) \
1140 AROS_CALL3(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),bt,bn)
1141 #endif
1143 #ifndef AROS_LVO_CALL3NR
1144 #define AROS_LVO_CALL3NR(t,a1,a2,a3,bt,bn,o,s) \
1145 AROS_CALL3NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),bt,bn)
1146 #endif
1148 #ifndef AROS_LVO_CALL4
1149 #define AROS_LVO_CALL4(t,a1,a2,a3,a4,bt,bn,o,s) \
1150 AROS_CALL4(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),bt,bn)
1151 #endif
1153 #ifndef AROS_LVO_CALL4NR
1154 #define AROS_LVO_CALL4NR(t,a1,a2,a3,a4,bt,bn,o,s) \
1155 AROS_CALL4NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),bt,bn)
1156 #endif
1158 #ifndef AROS_LVO_CALL5
1159 #define AROS_LVO_CALL5(t,a1,a2,a3,a4,a5,bt,bn,o,s) \
1160 AROS_CALL5(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCA(a5),bt,bn)
1161 #endif
1163 #ifndef AROS_LVO_CALL5NR
1164 #define AROS_LVO_CALL5NR(t,a1,a2,a3,a4,a5,bt,bn,o,s) \
1165 AROS_CALL5NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCS(a5),bt,bn)
1166 #endif
1168 #ifndef AROS_LVO_CALL6
1169 #define AROS_LVO_CALL6(t,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1170 AROS_CALL6(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCA(a5),AROS_LCA(a6),bt,bn)
1171 #endif
1173 #ifndef AROS_LVO_CALL6NR
1174 #define AROS_LVO_CALL6NR(t,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1175 AROS_CALL6NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCS(a5),AROS_LCA(a6),bt,bn)
1176 #endif
1178 #ifndef AROS_LVO_CALL7
1179 #define AROS_LVO_CALL7(t,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1180 AROS_CALL7(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCA(a5),AROS_LCA(a6),AROS_LCA(a7),bt,bn)
1181 #endif
1183 #ifndef AROS_LVO_CALL7NR
1184 #define AROS_LVO_CALL7NR(t,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1185 AROS_CALL7NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCS(a5),AROS_LCA(a6),AROS_LCA(a7),bt,bn)
1186 #endif
1188 #ifndef AROS_LVO_CALL8
1189 #define AROS_LVO_CALL8(t,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1190 AROS_CALL8(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCA(a5),AROS_LCA(a6),AROS_LCA(a7),AROS_LCA(a8),bt,bn)
1191 #endif
1193 #ifndef AROS_LVO_CALL8NR
1194 #define AROS_LVO_CALL8NR(t,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1195 AROS_CALL8NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCS(a5),AROS_LCA(a6),AROS_LCA(a7),AROS_LCA(a8),bt,bn)
1196 #endif
1198 #ifndef AROS_LVO_CALL9
1199 #define AROS_LVO_CALL9(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1200 AROS_CALL9(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCA(a5),AROS_LCA(a6),AROS_LCA(a7),AROS_LCA(a8),AROS_LCA(a9),bt,bn)
1201 #endif
1203 #ifndef AROS_LVO_CALL9NR
1204 #define AROS_LVO_CALL9NR(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1205 AROS_CALL9NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCS(a5),AROS_LCA(a6),AROS_LCA(a7),AROS_LCA(a8),AROS_LCA(a9),bt,bn)
1206 #endif
1208 #ifndef AROS_LVO_CALL10
1209 #define AROS_LVO_CALL10(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1210 AROS_CALL10(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCA(a5),AROS_LCA(a6),AROS_LCA(a7),AROS_LCA(a8),AROS_LCA(a9),AROS_LCA(a10),bt,bn)
1211 #endif
1213 #ifndef AROS_LVO_CALL10NR
1214 #define AROS_LVO_CALL10NR(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1215 AROS_CALL10NR(void,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCS(a5),AROS_LCA(a6),AROS_LCA(a7),AROS_LCA(a8),AROS_LCA(a9),AROS_LCA(a10),bt,bn)
1216 #endif
1218 #ifndef __AROS_CPU_SPECIFIC_LP
1219 # define AROS_LPQUAD1(t,n,a1,bt,bn,o,s) \
1220 t n(__AROS_LPAQUAD(a1))
1221 # define AROS_LPQUAD2(t,n,a1,a2,bt,bn,o,s) \
1222 t n(__AROS_LPAQUAD(a1),__AROS_LPAQUAD(a2))
1224 # define AROS_LP0(t,n,bt,bn,o,s) \
1225 t n(void)
1226 # define AROS_LP1(t,n,a1,bt,bn,o,s) \
1227 t n(__AROS_LPA(a1))
1228 # define AROS_LP2(t,n,a1,a2,bt,bn,o,s) \
1229 t n(__AROS_LPA(a1),__AROS_LPA(a2))
1230 # define AROS_LP3(t,n,a1,a2,a3,bt,bn,o,s) \
1231 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3))
1232 # define AROS_LP4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1233 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4))
1234 # define AROS_LP5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1235 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5))
1236 # define AROS_LP6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1237 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6))
1238 # define AROS_LP7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1239 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7))
1240 # define AROS_LP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1241 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8))
1242 # define AROS_LP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1243 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8),__AROS_LPA(a9))
1244 # define AROS_LP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1245 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8),__AROS_LPA(a9),__AROS_LPA(a10))
1246 # define AROS_LP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1247 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8),__AROS_LPA(a9),__AROS_LPA(a10),__AROS_LPA(a11))
1248 # define AROS_LP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1249 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8),__AROS_LPA(a9),__AROS_LPA(a10),__AROS_LPA(a11),__AROS_LPA(a12))
1250 # define AROS_LP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1251 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8),__AROS_LPA(a9),__AROS_LPA(a10),__AROS_LPA(a11),__AROS_LPA(a12),__AROS_LPA(a13))
1252 # define AROS_LP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1253 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8),__AROS_LPA(a9),__AROS_LPA(a10),__AROS_LPA(a11),__AROS_LPA(a12),__AROS_LPA(a13),__AROS_LPA(a14))
1254 # define AROS_LP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1255 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7),__AROS_LPA(a8),__AROS_LPA(a9),__AROS_LPA(a10),__AROS_LPA(a11),__AROS_LPA(a12),__AROS_LPA(a13),__AROS_LPA(a14),__AROS_LPA(a15))
1256 # endif /* !__AROS_CPU_SPECIFIC_LP */
1259 #ifndef __AROS_CPU_SPECIFIC_LD
1260 /* Declarations for library functions which need the libbase */
1261 # define AROS_LDQUAD1(t,n,a1,bt,bn,o,s) \
1262 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1263 __AROS_LDAQUAD(a1), __AROS_LD_BASE(bt,bn))
1264 # define AROS_LDQUAD2(t,n,a1,a2,bt,bn,o,s) \
1265 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1266 __AROS_LDAQUAD(a1), \
1267 __AROS_LDAQUAD(a2),__AROS_LD_BASE(bt,bn))
1269 # define AROS_LD0(t,n,bt,bn,o,s) \
1270 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) (__AROS_LD_BASE(bt,bn))
1271 # define AROS_LD1(t,n,a1,bt,bn,o,s) \
1272 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1273 __AROS_LDA(a1),__AROS_LD_BASE(bt,bn))
1274 # define AROS_LD2(t,n,a1,a2,bt,bn,o,s) \
1275 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1276 __AROS_LDA(a1), \
1277 __AROS_LDA(a2),__AROS_LD_BASE(bt,bn))
1278 # define AROS_LD3(t,n,a1,a2,a3,bt,bn,o,s) \
1279 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1280 __AROS_LDA(a1), \
1281 __AROS_LDA(a2), \
1282 __AROS_LDA(a3), __AROS_LD_BASE(bt,bn))
1283 # define AROS_LD4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1284 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1285 __AROS_LDA(a1), \
1286 __AROS_LDA(a2), \
1287 __AROS_LDA(a3), \
1288 __AROS_LDA(a4), __AROS_LD_BASE(bt,bn))
1289 # define AROS_LD5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1290 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1291 __AROS_LDA(a1), \
1292 __AROS_LDA(a2), \
1293 __AROS_LDA(a3), \
1294 __AROS_LDA(a4), \
1295 __AROS_LDA(a5), __AROS_LD_BASE(bt,bn))
1296 # define AROS_LD6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1297 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1298 __AROS_LDA(a1), \
1299 __AROS_LDA(a2), \
1300 __AROS_LDA(a3), \
1301 __AROS_LDA(a4), \
1302 __AROS_LDA(a5), \
1303 __AROS_LDA(a6), __AROS_LD_BASE(bt,bn))
1304 # define AROS_LD7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1305 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1306 __AROS_LDA(a1), \
1307 __AROS_LDA(a2), \
1308 __AROS_LDA(a3), \
1309 __AROS_LDA(a4), \
1310 __AROS_LDA(a5), \
1311 __AROS_LDA(a6), \
1312 __AROS_LDA(a7), __AROS_LD_BASE(bt,bn))
1313 # define AROS_LD8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1314 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1315 __AROS_LDA(a1), \
1316 __AROS_LDA(a2), \
1317 __AROS_LDA(a3), \
1318 __AROS_LDA(a4), \
1319 __AROS_LDA(a5), \
1320 __AROS_LDA(a6), \
1321 __AROS_LDA(a7), \
1322 __AROS_LDA(a8), __AROS_LD_BASE(bt,bn))
1323 # define AROS_LD9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1324 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1325 __AROS_LDA(a1), \
1326 __AROS_LDA(a2), \
1327 __AROS_LDA(a3), \
1328 __AROS_LDA(a4), \
1329 __AROS_LDA(a5), \
1330 __AROS_LDA(a6), \
1331 __AROS_LDA(a7), \
1332 __AROS_LDA(a8), \
1333 __AROS_LDA(a9), __AROS_LD_BASE(bt,bn))
1334 # define AROS_LD10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1335 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1336 __AROS_LDA(a1), \
1337 __AROS_LDA(a2), \
1338 __AROS_LDA(a3), \
1339 __AROS_LDA(a4), \
1340 __AROS_LDA(a5), \
1341 __AROS_LDA(a6), \
1342 __AROS_LDA(a7), \
1343 __AROS_LDA(a8), \
1344 __AROS_LDA(a9), \
1345 __AROS_LDA(a10), __AROS_LD_BASE(bt,bn))
1346 # define AROS_LD11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1347 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1348 __AROS_LDA(a1), \
1349 __AROS_LDA(a2), \
1350 __AROS_LDA(a3), \
1351 __AROS_LDA(a4), \
1352 __AROS_LDA(a5), \
1353 __AROS_LDA(a6), \
1354 __AROS_LDA(a7), \
1355 __AROS_LDA(a8), \
1356 __AROS_LDA(a9), \
1357 __AROS_LDA(a10), \
1358 __AROS_LDA(a11), __AROS_LD_BASE(bt,bn))
1359 # define AROS_LD12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1360 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1361 __AROS_LDA(a1), \
1362 __AROS_LDA(a2), \
1363 __AROS_LDA(a3), \
1364 __AROS_LDA(a4), \
1365 __AROS_LDA(a5), \
1366 __AROS_LDA(a6), \
1367 __AROS_LDA(a7), \
1368 __AROS_LDA(a8), \
1369 __AROS_LDA(a9), \
1370 __AROS_LDA(a10), \
1371 __AROS_LDA(a11), \
1372 __AROS_LDA(a12), __AROS_LD_BASE(bt,bn))
1373 # define AROS_LD13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1374 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1375 __AROS_LDA(a1), \
1376 __AROS_LDA(a2), \
1377 __AROS_LDA(a3), \
1378 __AROS_LDA(a4), \
1379 __AROS_LDA(a5), \
1380 __AROS_LDA(a6), \
1381 __AROS_LDA(a7), \
1382 __AROS_LDA(a8), \
1383 __AROS_LDA(a9), \
1384 __AROS_LDA(a10), \
1385 __AROS_LDA(a11), \
1386 __AROS_LDA(a12), \
1387 __AROS_LDA(a13), __AROS_LD_BASE(bt,bn))
1388 # define AROS_LD14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1389 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1390 __AROS_LDA(a1), \
1391 __AROS_LDA(a2), \
1392 __AROS_LDA(a3), \
1393 __AROS_LDA(a4), \
1394 __AROS_LDA(a5), \
1395 __AROS_LDA(a6), \
1396 __AROS_LDA(a7), \
1397 __AROS_LDA(a8), \
1398 __AROS_LDA(a9), \
1399 __AROS_LDA(a10), \
1400 __AROS_LDA(a11), \
1401 __AROS_LDA(a12), \
1402 __AROS_LDA(a13), \
1403 __AROS_LDA(a14), __AROS_LD_BASE(bt,bn))
1404 # define AROS_LD15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1405 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1406 __AROS_LDA(a1), \
1407 __AROS_LDA(a2), \
1408 __AROS_LDA(a3), \
1409 __AROS_LDA(a4), \
1410 __AROS_LDA(a5), \
1411 __AROS_LDA(a6), \
1412 __AROS_LDA(a7), \
1413 __AROS_LDA(a8), \
1414 __AROS_LDA(a9), \
1415 __AROS_LDA(a10), \
1416 __AROS_LDA(a11), \
1417 __AROS_LDA(a12), \
1418 __AROS_LDA(a13), \
1419 __AROS_LDA(a14), \
1420 __AROS_LDA(a15), __AROS_LD_BASE(bt,bn))
1422 /* Declarations for library functions which don't need the libbase */
1423 # define AROS_LD0I(t,n,bt,bn,o,s) \
1424 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) (void)
1425 # define AROS_LD1I(t,n,a1,bt,bn,o,s) \
1426 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1427 __AROS_LDA(a1))
1428 # define AROS_LD2I(t,n,a1,a2,bt,bn,o,s) \
1429 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1430 __AROS_LDA(a1), \
1431 __AROS_LDA(a2))
1432 # define AROS_LD3I(t,n,a1,a2,a3,bt,bn,o,s) \
1433 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1434 __AROS_LDA(a1), \
1435 __AROS_LDA(a2), \
1436 __AROS_LDA(a3))
1437 # define AROS_LD4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1438 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1439 __AROS_LDA(a1), \
1440 __AROS_LDA(a2), \
1441 __AROS_LDA(a3), \
1442 __AROS_LDA(a4))
1443 # define AROS_LD5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1444 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1445 __AROS_LDA(a1), \
1446 __AROS_LDA(a2), \
1447 __AROS_LDA(a3), \
1448 __AROS_LDA(a4), \
1449 __AROS_LDA(a5))
1450 # define AROS_LD6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1451 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1452 __AROS_LDA(a1), \
1453 __AROS_LDA(a2), \
1454 __AROS_LDA(a3), \
1455 __AROS_LDA(a4), \
1456 __AROS_LDA(a5), \
1457 __AROS_LDA(a6))
1458 # define AROS_LD7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1459 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1460 __AROS_LDA(a1), \
1461 __AROS_LDA(a2), \
1462 __AROS_LDA(a3), \
1463 __AROS_LDA(a4), \
1464 __AROS_LDA(a5), \
1465 __AROS_LDA(a6), \
1466 __AROS_LDA(a7))
1467 # define AROS_LD8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1468 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1469 __AROS_LDA(a1), \
1470 __AROS_LDA(a2), \
1471 __AROS_LDA(a3), \
1472 __AROS_LDA(a4), \
1473 __AROS_LDA(a5), \
1474 __AROS_LDA(a6), \
1475 __AROS_LDA(a7), \
1476 __AROS_LDA(a8))
1477 # define AROS_LD9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1478 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1479 __AROS_LDA(a1), \
1480 __AROS_LDA(a2), \
1481 __AROS_LDA(a3), \
1482 __AROS_LDA(a4), \
1483 __AROS_LDA(a5), \
1484 __AROS_LDA(a6), \
1485 __AROS_LDA(a7), \
1486 __AROS_LDA(a8), \
1487 __AROS_LDA(a9))
1488 # define AROS_LD10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1489 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1490 __AROS_LDA(a1), \
1491 __AROS_LDA(a2), \
1492 __AROS_LDA(a3), \
1493 __AROS_LDA(a4), \
1494 __AROS_LDA(a5), \
1495 __AROS_LDA(a6), \
1496 __AROS_LDA(a7), \
1497 __AROS_LDA(a8), \
1498 __AROS_LDA(a9), \
1499 __AROS_LDA(a10))
1500 # define AROS_LD11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1501 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1502 __AROS_LDA(a1), \
1503 __AROS_LDA(a2), \
1504 __AROS_LDA(a3), \
1505 __AROS_LDA(a4), \
1506 __AROS_LDA(a5), \
1507 __AROS_LDA(a6), \
1508 __AROS_LDA(a7), \
1509 __AROS_LDA(a8), \
1510 __AROS_LDA(a9), \
1511 __AROS_LDA(a10), \
1512 __AROS_LDA(a11))
1513 # define AROS_LD12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1514 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1515 __AROS_LDA(a1), \
1516 __AROS_LDA(a2), \
1517 __AROS_LDA(a3), \
1518 __AROS_LDA(a4), \
1519 __AROS_LDA(a5), \
1520 __AROS_LDA(a6), \
1521 __AROS_LDA(a7), \
1522 __AROS_LDA(a8), \
1523 __AROS_LDA(a9), \
1524 __AROS_LDA(a10), \
1525 __AROS_LDA(a11), \
1526 __AROS_LDA(a12))
1527 # define AROS_LD13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1528 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1529 __AROS_LDA(a1), \
1530 __AROS_LDA(a2), \
1531 __AROS_LDA(a3), \
1532 __AROS_LDA(a4), \
1533 __AROS_LDA(a5), \
1534 __AROS_LDA(a6), \
1535 __AROS_LDA(a7), \
1536 __AROS_LDA(a8), \
1537 __AROS_LDA(a9), \
1538 __AROS_LDA(a10), \
1539 __AROS_LDA(a11), \
1540 __AROS_LDA(a12), \
1541 __AROS_LDA(a13))
1542 # define AROS_LD14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1543 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1544 __AROS_LDA(a1), \
1545 __AROS_LDA(a2), \
1546 __AROS_LDA(a3), \
1547 __AROS_LDA(a4), \
1548 __AROS_LDA(a5), \
1549 __AROS_LDA(a6), \
1550 __AROS_LDA(a7), \
1551 __AROS_LDA(a8), \
1552 __AROS_LDA(a9), \
1553 __AROS_LDA(a10), \
1554 __AROS_LDA(a11), \
1555 __AROS_LDA(a12), \
1556 __AROS_LDA(a13), \
1557 __AROS_LDA(a14))
1558 # define AROS_LD15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1559 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s,o) ( \
1560 __AROS_LDA(a1), \
1561 __AROS_LDA(a2), \
1562 __AROS_LDA(a3), \
1563 __AROS_LDA(a4), \
1564 __AROS_LDA(a5), \
1565 __AROS_LDA(a6), \
1566 __AROS_LDA(a7), \
1567 __AROS_LDA(a8), \
1568 __AROS_LDA(a9), \
1569 __AROS_LDA(a10), \
1570 __AROS_LDA(a11), \
1571 __AROS_LDA(a12), \
1572 __AROS_LDA(a13), \
1573 __AROS_LDA(a14), \
1574 __AROS_LDA(a15))
1575 #endif /* !__AROS_CPU_SPECIFIC_LD */
1577 #define AROS_LHA(type,name,reg) type,name,reg
1578 #define AROS_LPA(type,name,reg) type,name,reg
1579 #define AROS_LCA(type,name,reg) type,name,reg
1580 #define AROS_LDA(type,name,reg) type,name,reg
1582 #define AROS_LHAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1583 #define AROS_LPAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1584 #define AROS_LCAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1585 #define AROS_LDAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1587 #ifndef AROS_LIBFUNC_INIT
1588 # define AROS_LIBFUNC_INIT {
1589 #endif
1590 #ifndef AROS_LIBFUNC_EXIT
1591 # define AROS_LIBFUNC_EXIT }}
1592 #endif
1594 /* Tagging of private functions, so that they can be distinguished from
1595 official ones. But they have to compile the same way, so: */
1596 #define AROS_PLH0 AROS_LH0
1597 #define AROS_PLH1 AROS_LH1
1598 #define AROS_PLH2 AROS_LH2
1599 #define AROS_PLH3 AROS_LH3
1600 #define AROS_PLH4 AROS_LH4
1601 #define AROS_PLH5 AROS_LH5
1602 #define AROS_PLH6 AROS_LH6
1603 #define AROS_PLH7 AROS_LH7
1604 #define AROS_PLH8 AROS_LH8
1605 #define AROS_PLH9 AROS_LH9
1606 #define AROS_PLH10 AROS_LH10
1607 #define AROS_PLH11 AROS_LH11
1608 #define AROS_PLH12 AROS_LH12
1609 #define AROS_PLH13 AROS_LH13
1610 #define AROS_PLH14 AROS_LH14
1611 #define AROS_PLH15 AROS_LH15
1613 /* NT stands for No Tags, which means that the functions which are defined with these headers
1614 are not subject to tagcall generation by the script used to generate include files */
1615 #define AROS_NTLH0 AROS_LH0
1616 #define AROS_NTLH1 AROS_LH1
1617 #define AROS_NTLH2 AROS_LH2
1618 #define AROS_NTLH3 AROS_LH3
1619 #define AROS_NTLH4 AROS_LH4
1620 #define AROS_NTLH5 AROS_LH5
1621 #define AROS_NTLH6 AROS_LH6
1622 #define AROS_NTLH7 AROS_LH7
1623 #define AROS_NTLH8 AROS_LH8
1624 #define AROS_NTLH9 AROS_LH9
1625 #define AROS_NTLH10 AROS_LH10
1626 #define AROS_NTLH11 AROS_LH11
1627 #define AROS_NTLH12 AROS_LH12
1628 #define AROS_NTLH13 AROS_LH13
1629 #define AROS_NTLH14 AROS_LH14
1630 #define AROS_NTLH15 AROS_LH15
1632 /******************************************************************************
1633 ***** ENDE aros/libcall.h
1634 ******************************************************************************/
1636 #endif /* AROS_LIBCALL_H */