2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
9 /******************************************************************************
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
24 \* Function starts here. *\
28 <n> - Number of arguments of the function (not including the
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 a Exec compatible RemHead function.
46 AROS_LH1I(struct Node *, RemHead,
47 struct List *, list, A0,
48 struct ExecBase, SysBase, 43, Exec)
56 if(node->ln_Succ==NULL)
65 ******************************************************************************/
67 /* System-Specific things */
69 # include <aros/system.h>
72 #ifndef __typedef_VOID_FUNC
73 #define __typedef_VOID_FUNC
74 typedef void (*VOID_FUNC
)();
76 #ifndef __typedef_LONG_FUNC
77 #define __typedef_LONG_FUNC
78 typedef int (*LONG_FUNC
)();
80 #ifndef __typedef_ULONG_FUNC
81 #define __typedef_ULONG_FUNC
82 typedef unsigned int (*ULONG_FUNC
)();
85 /* Declare all macros which the systems' libcall didn't */
86 #ifndef __AROS_SLIB_ENTRY
87 # define __AROS_SLIB_ENTRY(n,s) s ## _ ## n
89 #ifndef AROS_SLIB_ENTRY
91 This is to allow the C preprocessor to expand n and s before they are
92 maybe concatenated (the CPP first evaluates a ## b and the tries
93 to expand ab instead of expanding a and b and then concatenating the
96 # define AROS_SLIB_ENTRY(n,s) __AROS_SLIB_ENTRY(n,s)
99 #ifndef __AROS_CPU_SPECIFIC_LH
100 /* Library functions which need the libbase */
101 #define AROS_LHQUAD1(t,n,a1,bt,bn,o,s) \
102 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
104 __AROS_LH_BASE(bt,bn)) {
105 #define AROS_LHQUAD2(t,n,a1,a2,bt,bn,o,s) \
106 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
109 __AROS_LH_BASE(bt,bn)) {
111 #define AROS_LH0(t,n,bt,bn,o,s) \
112 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
113 __AROS_LH_BASE(bt,bn)) {
114 #define AROS_LH1(t,n,a1,bt,bn,o,s) \
115 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
117 __AROS_LH_BASE(bt,bn)) {
118 #define AROS_LH2(t,n,a1,a2,bt,bn,o,s) \
119 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
122 __AROS_LH_BASE(bt,bn)) {
123 #define AROS_LH3(t,n,a1,a2,a3,bt,bn,o,s) \
124 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
128 __AROS_LH_BASE(bt,bn)) {
129 #define AROS_LH4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
130 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
135 __AROS_LH_BASE(bt,bn)) {
136 #define AROS_LH5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
137 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
143 __AROS_LH_BASE(bt,bn)) {
144 #define AROS_LH6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
145 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
152 __AROS_LH_BASE(bt,bn)) {
153 #define AROS_LH7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
154 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
162 __AROS_LH_BASE(bt,bn)) {
163 #define AROS_LH8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
164 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
173 __AROS_LH_BASE(bt,bn)) {
174 #define AROS_LH9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
175 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
185 __AROS_LH_BASE(bt,bn)) {
186 #define AROS_LH10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
187 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
198 __AROS_LH_BASE(bt,bn)) {
199 #define AROS_LH11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
200 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
212 __AROS_LH_BASE(bt,bn)) {
213 #define AROS_LH12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
214 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
227 __AROS_LH_BASE(bt,bn)) {
228 #define AROS_LH13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
229 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
243 __AROS_LH_BASE(bt,bn)) {
244 #define AROS_LH14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
245 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
260 __AROS_LH_BASE(bt,bn)) {
261 #define AROS_LH15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
262 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
278 __AROS_LH_BASE(bt,bn)) {
280 /* Library functions which don't need the libbase */
281 #define AROS_LH0I(t,n,bt,bn,o,s) \
282 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) {
283 #define AROS_LH1I(t,n,a1,bt,bn,o,s) \
284 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
287 #define AROS_LH2I(t,n,a1,a2,bt,bn,o,s) \
288 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
292 #define AROS_LH3I(t,n,a1,a2,a3,bt,bn,o,s) \
293 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
298 #define AROS_LH4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
299 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
305 #define AROS_LH5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
306 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
313 #define AROS_LH6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
314 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
322 #define AROS_LH7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
323 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
332 #define AROS_LH8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
333 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
343 #define AROS_LH9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
344 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
355 #define AROS_LH10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
356 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
368 #define AROS_LH11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
369 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
382 #define AROS_LH12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
383 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
397 #define AROS_LH13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
398 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
413 #define AROS_LH14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
414 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
430 #define AROS_LH15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
431 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(\
448 #endif /* !__AROS_CPU_SPECIFIC_LH */
451 /* Call a library function which requires the libbase */
452 #ifndef __AROS_CPU_SPECIFIC_LC
453 # define AROS_LCQUAD1(t,n,a1,bt,bn,o,s) \
454 (((__AROS_LC_PREFIX t(*)(\
456 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
458 __AROS_LC_BASE(bt,bn)))
459 #define AROS_LCQUAD2(t,n,a1,a2,bt,bn,o,s) \
460 (((__AROS_LC_PREFIX t(*)(\
463 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
466 __AROS_LC_BASE(bt,bn)))
468 #define AROS_LC0(t,n,bt,bn,o,s) \
469 (((__AROS_LC_PREFIX t(*)(\
470 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
471 __AROS_LC_BASE(bt,bn)))
472 #define AROS_LC1(t,n,a1,bt,bn,o,s) \
473 (((__AROS_LC_PREFIX t(*)(\
475 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
477 __AROS_LC_BASE(bt,bn)))
478 #define AROS_LC2(t,n,a1,a2,bt,bn,o,s) \
479 (((__AROS_LC_PREFIX t(*)(\
482 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
485 __AROS_LC_BASE(bt,bn)))
486 #define AROS_LC3(t,n,a1,a2,a3,bt,bn,o,s) \
487 (((__AROS_LC_PREFIX t(*)(\
491 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
495 __AROS_LC_BASE(bt,bn)))
496 #define AROS_LC4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
497 (((__AROS_LC_PREFIX t(*)(\
502 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
507 __AROS_LC_BASE(bt,bn)))
508 #define AROS_LC5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
509 (((__AROS_LC_PREFIX t(*)(\
515 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
521 __AROS_LC_BASE(bt,bn)))
522 #define AROS_LC6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
523 (((__AROS_LC_PREFIX t(*)(\
530 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
537 __AROS_LC_BASE(bt,bn)))
538 #define AROS_LC7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
539 (((__AROS_LC_PREFIX t(*)(\
547 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
555 __AROS_LC_BASE(bt,bn)))
556 #define AROS_LC8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
557 (((__AROS_LC_PREFIX t(*)(\
566 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
575 __AROS_LC_BASE(bt,bn)))
576 #define AROS_LC9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
577 (((__AROS_LC_PREFIX t(*)(\
587 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
597 __AROS_LC_BASE(bt,bn)))
598 #define AROS_LC10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
599 (((__AROS_LC_PREFIX t(*)(\
610 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
621 __AROS_LC_BASE(bt,bn)))
622 #define AROS_LC11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
623 (((__AROS_LC_PREFIX t(*)(\
635 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
647 __AROS_LC_BASE(bt,bn)))
648 #define AROS_LC12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
649 (((__AROS_LC_PREFIX t(*)(\
662 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
675 __AROS_LC_BASE(bt,bn)))
676 #define AROS_LC13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
677 (((__AROS_LC_PREFIX t(*)(\
691 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
705 __AROS_LC_BASE(bt,bn)))
706 #define AROS_LC14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
707 (((__AROS_LC_PREFIX t(*)(\
722 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
737 __AROS_LC_BASE(bt,bn)))
738 #define AROS_LC15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
739 (((__AROS_LC_PREFIX t(*)(\
755 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
771 __AROS_LC_BASE(bt,bn)))
773 /* Macros for calling library functions without a return value. These macros should
774 * always be used when a library function has no return value but can also be used
775 * when the return value is not used
777 #define AROS_LC0NR AROS_LC0
778 #define AROS_LC1NR AROS_LC1
779 #define AROS_LC2NR AROS_LC2
780 #define AROS_LC3NR AROS_LC3
781 #define AROS_LC4NR AROS_LC4
782 #define AROS_LC5NR AROS_LC5
783 #define AROS_LC6NR AROS_LC6
784 #define AROS_LC7NR AROS_LC7
785 #define AROS_LC8NR AROS_LC8
786 #define AROS_LC9NR AROS_LC9
787 #define AROS_LC10NR AROS_LC10
788 #define AROS_LC11NR AROS_LC11
789 #define AROS_LC12NR AROS_LC12
790 #define AROS_LC13NR AROS_LC13
791 #define AROS_LC14NR AROS_LC14
792 #define AROS_LC15NR AROS_LC15
795 /* Special calls: Call a library function without the name just by the ADDRESS */
797 #define AROS_CALL0(returntype,address,basetype,basename) \
798 (((__AROS_LC_PREFIX returntype(*)(__AROS_LP_BASE(basetype,basename)))\
799 (void *)(address))(basename))
800 #define AROS_CALL0NR AROS_CALL0
804 #define AROS_CALL1(t,a,a1,bt,bn) \
805 (((__AROS_LC_PREFIX t(*)(\
807 __AROS_LP_BASE(bt,bn)))\
811 #define AROS_CALL1NR AROS_CALL1
815 #define AROS_CALL2(t,a,a1,a2,bt,bn) \
816 (((__AROS_LC_PREFIX t(*)(\
819 __AROS_LP_BASE(bt,bn)))\
824 #define AROS_CALL2NR AROS_CALL2
828 #define AROS_CALL3(t,a,a1,a2,a3,bt,bn) \
829 (((__AROS_LC_PREFIX t(*)(\
833 __AROS_LP_BASE(bt,bn)))\
839 #define AROS_CALL3NR AROS_CALL3
843 #define AROS_CALL4(t,a,a1,a2,a3,a4,bt,bn) \
844 (((__AROS_LC_PREFIX t(*)(\
849 __AROS_LP_BASE(bt,bn)))\
856 #define AROS_CALL4NR AROS_CALL4
860 #define AROS_CALL5(t,a,a1,a2,a3,a4,a5,bt,bn) \
861 (((__AROS_LC_PREFIX t(*)(\
867 __AROS_LP_BASE(bt,bn)))\
875 #define AROS_CALL5NR AROS_CALL5
879 #define AROS_CALL6(t,a,a1,a2,a3,a4,a5,a6,bt,bn) \
880 (((__AROS_LC_PREFIX t(*)(\
887 __AROS_LP_BASE(bt,bn)))\
896 #define AROS_CALL6NR AROS_CALL6
900 #define AROS_CALL7(t,a,a1,a2,a3,a4,a5,a6,a7,bt,bn) \
901 (((__AROS_LC_PREFIX t(*)(\
909 __AROS_LP_BASE(bt,bn)))\
919 #define AROS_CALL7NR AROS_CALL7
923 #define AROS_CALL8(t,a,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn) \
924 (((__AROS_LC_PREFIX t(*)(\
933 __AROS_LP_BASE(bt,bn)))\
944 #define AROS_CALL8NR AROS_CALL8
948 #define AROS_CALL9(t,a,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn) \
949 (((__AROS_LC_PREFIX t(*)(\
959 __AROS_LP_BASE(bt,bn)))\
971 #define AROS_CALL9NR AROS_CALL9
975 #define AROS_CALL10(t,a,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn) \
976 (((__AROS_LC_PREFIX t(*)(\
987 __AROS_LP_BASE(bt,bn)))\
1000 #define AROS_CALL10NR AROS_CALL10
1003 /* Special calls: Call a library function without the name just by the OFFSET */
1005 #ifndef AROS_LVO_CALL0
1006 #define AROS_LVO_CALL0(returntype,basetype,basename,offset,system) \
1007 AROS_CALL0(returntype,__AROS_GETVECADDR(basename,offset),basetype,basename)
1010 #ifndef AROS_LVO_CALL0NR
1011 #define AROS_LVO_CALL0NR(returntype,basetype,basename,offset,system) \
1012 AROS_CALL0NR(returntype,__AROS_GETVECADDR(basename,offset),basetype,basename)
1015 #ifndef AROS_LVO_CALL1
1016 #define AROS_LVO_CALL1(t,a1,bt,bn,o,s) \
1017 AROS_CALL1(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),bt,bn)
1020 #ifndef AROS_LVO_CALL1NR
1021 #define AROS_LVO_CALL1NR(t,a1,bt,bn,o,s) \
1022 AROS_CALL1NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),bt,bn)
1025 #ifndef AROS_LVO_CALL2
1026 #define AROS_LVO_CALL2(t,a1,a2,bt,bn,o,s) \
1027 AROS_CALL2(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),bt,bn)
1030 #ifndef AROS_LVO_CALL2NR
1031 #define AROS_LVO_CALL2NR(t,a1,a2,bt,bn,o,s) \
1032 AROS_CALL2NR(t,AROS_LCA(a1),AROS_LCA(a2),bt,bn)
1035 #ifndef AROS_LVO_CALL3
1036 #define AROS_LVO_CALL3(t,a1,a2,a3,bt,bn,o,s) \
1037 AROS_CALL3(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),bt,bn)
1040 #ifndef AROS_LVO_CALL3NR
1041 #define AROS_LVO_CALL3NR(t,a1,a2,a3,bt,bn,o,s) \
1042 AROS_CALL3NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),bt,bn)
1045 #ifndef AROS_LVO_CALL4
1046 #define AROS_LVO_CALL4(t,a1,a2,a3,a4,bt,bn,o,s) \
1047 AROS_CALL4(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),bt,bn)
1050 #ifndef AROS_LVO_CALL4NR
1051 #define AROS_LVO_CALL4NR(t,a1,a2,a3,a4,bt,bn,o,s) \
1052 AROS_CALL4NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),bt,bn)
1055 #ifndef AROS_LVO_CALL5
1056 #define AROS_LVO_CALL5(t,a1,a2,a3,a4,a5,bt,bn,o,s) \
1057 AROS_CALL5(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCA(a5),bt,bn)
1060 #ifndef AROS_LVO_CALL5NR
1061 #define AROS_LVO_CALL5NR(t,a1,a2,a3,a4,a5,bt,bn,o,s) \
1062 AROS_CALL5NR(t,__AROS_GETVECADDR(bn,o),AROS_LCA(a1),AROS_LCA(a2),AROS_LCA(a3),AROS_LCA(a4),AROS_LCS(a5),bt,bn)
1065 #ifndef AROS_LVO_CALL6
1066 #define AROS_LVO_CALL6(t,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1067 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)
1070 #ifndef AROS_LVO_CALL6NR
1071 #define AROS_LVO_CALL6NR(t,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1072 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)
1075 #ifndef AROS_LVO_CALL7
1076 #define AROS_LVO_CALL7(t,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1077 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)
1080 #ifndef AROS_LVO_CALL7NR
1081 #define AROS_LVO_CALL7NR(t,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1082 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)
1085 #ifndef AROS_LVO_CALL8
1086 #define AROS_LVO_CALL8(t,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1087 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)
1090 #ifndef AROS_LVO_CALL8NR
1091 #define AROS_LVO_CALL8NR(t,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1092 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)
1095 #ifndef AROS_LVO_CALL9
1096 #define AROS_LVO_CALL9(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1097 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)
1100 #ifndef AROS_LVO_CALL9NR
1101 #define AROS_LVO_CALL9NR(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1102 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)
1105 #ifndef AROS_LVO_CALL10
1106 #define AROS_LVO_CALL10(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1107 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)
1110 #ifndef AROS_LVO_CALL10NR
1111 #define AROS_LVO_CALL10NR(t,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1112 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)
1114 #endif /* !__AROS_CPU_SPECIFIC_LC */
1116 #ifndef __AROS_CPU_SPECIFIC_LP
1117 # define AROS_LPQUAD1(t,n,a1,bt,bn,o,s) \
1118 t n(__AROS_LPAQUAD(a1))
1119 # define AROS_LPQUAD2(t,n,a1,a2,bt,bn,o,s) \
1120 t n(__AROS_LPAQUAD(a1),__AROS_LPAQUAD(a2))
1122 # define AROS_LP0(t,n,bt,bn,o,s) \
1124 # define AROS_LP1(t,n,a1,bt,bn,o,s) \
1126 # define AROS_LP2(t,n,a1,a2,bt,bn,o,s) \
1127 t n(__AROS_LPA(a1),__AROS_LPA(a2))
1128 # define AROS_LP3(t,n,a1,a2,a3,bt,bn,o,s) \
1129 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3))
1130 # define AROS_LP4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1131 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4))
1132 # define AROS_LP5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1133 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5))
1134 # define AROS_LP6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1135 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6))
1136 # define AROS_LP7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1137 t n(__AROS_LPA(a1),__AROS_LPA(a2),__AROS_LPA(a3),__AROS_LPA(a4),__AROS_LPA(a5),__AROS_LPA(a6),__AROS_LPA(a7))
1138 # define AROS_LP8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1139 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))
1140 # define AROS_LP9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1141 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))
1142 # define AROS_LP10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1143 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))
1144 # define AROS_LP11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1145 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))
1146 # define AROS_LP12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1147 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))
1148 # define AROS_LP13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1149 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))
1150 # define AROS_LP14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1151 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))
1152 # define AROS_LP15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1153 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))
1154 # endif /* !__AROS_CPU_SPECIFIC_LP */
1157 #ifndef __AROS_CPU_SPECIFIC_LD
1158 /* Declarations for library functions which need the libbase */
1159 # define AROS_LDQUAD1(t,n,a1,bt,bn,o,s) \
1160 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1161 __AROS_LDAQUAD(a1), __AROS_LD_BASE(bt,bn))
1162 # define AROS_LDQUAD2(t,n,a1,a2,bt,bn,o,s) \
1163 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1164 __AROS_LDAQUAD(a1), \
1165 __AROS_LDAQUAD(a2),__AROS_LD_BASE(bt,bn))
1167 # define AROS_LD0(t,n,bt,bn,o,s) \
1168 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (__AROS_LD_BASE(bt,bn))
1169 # define AROS_LD1(t,n,a1,bt,bn,o,s) \
1170 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1171 __AROS_LDA(a1),__AROS_LD_BASE(bt,bn))
1172 # define AROS_LD2(t,n,a1,a2,bt,bn,o,s) \
1173 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1175 __AROS_LDA(a2),__AROS_LD_BASE(bt,bn))
1176 # define AROS_LD3(t,n,a1,a2,a3,bt,bn,o,s) \
1177 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1180 __AROS_LDA(a3), __AROS_LD_BASE(bt,bn))
1181 # define AROS_LD4(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1182 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1186 __AROS_LDA(a4), __AROS_LD_BASE(bt,bn))
1187 # define AROS_LD5(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1188 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1193 __AROS_LDA(a5), __AROS_LD_BASE(bt,bn))
1194 # define AROS_LD6(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1195 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1201 __AROS_LDA(a6), __AROS_LD_BASE(bt,bn))
1202 # define AROS_LD7(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1203 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1210 __AROS_LDA(a7), __AROS_LD_BASE(bt,bn))
1211 # define AROS_LD8(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1212 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1220 __AROS_LDA(a8), __AROS_LD_BASE(bt,bn))
1221 # define AROS_LD9(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1222 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1231 __AROS_LDA(a9), __AROS_LD_BASE(bt,bn))
1232 # define AROS_LD10(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1233 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1243 __AROS_LDA(a10), __AROS_LD_BASE(bt,bn))
1244 # define AROS_LD11(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1245 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1256 __AROS_LDA(a11), __AROS_LD_BASE(bt,bn))
1257 # define AROS_LD12(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1258 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1270 __AROS_LDA(a12), __AROS_LD_BASE(bt,bn))
1271 # define AROS_LD13(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1272 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1285 __AROS_LDA(a13), __AROS_LD_BASE(bt,bn))
1286 # define AROS_LD14(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1287 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1301 __AROS_LDA(a14), __AROS_LD_BASE(bt,bn))
1302 # define AROS_LD15(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1303 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1318 __AROS_LDA(a15), __AROS_LD_BASE(bt,bn))
1320 /* Declarations for library functions which don't need the libbase */
1321 # define AROS_LD0I(t,n,bt,bn,o,s) \
1322 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) (void)
1323 # define AROS_LD1I(t,n,a1,bt,bn,o,s) \
1324 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1326 # define AROS_LD2I(t,n,a1,a2,bt,bn,o,s) \
1327 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1330 # define AROS_LD3I(t,n,a1,a2,a3,bt,bn,o,s) \
1331 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1335 # define AROS_LD4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1336 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1341 # define AROS_LD5I(t,n,a1,a2,a3,a4,a5,bt,bn,o,s) \
1342 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1348 # define AROS_LD6I(t,n,a1,a2,a3,a4,a5,a6,bt,bn,o,s) \
1349 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1356 # define AROS_LD7I(t,n,a1,a2,a3,a4,a5,a6,a7,bt,bn,o,s) \
1357 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1365 # define AROS_LD8I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,bt,bn,o,s) \
1366 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1375 # define AROS_LD9I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,bt,bn,o,s) \
1376 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1386 # define AROS_LD10I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,bt,bn,o,s) \
1387 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1398 # define AROS_LD11I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,bt,bn,o,s) \
1399 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1411 # define AROS_LD12I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,bt,bn,o,s) \
1412 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1425 # define AROS_LD13I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,bt,bn,o,s) \
1426 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1440 # define AROS_LD14I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,bt,bn,o,s) \
1441 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1456 # define AROS_LD15I(t,n,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,bt,bn,o,s) \
1457 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1473 #endif /* !__AROS_CPU_SPECIFIC_LD */
1475 #define AROS_LHA(type,name,reg) type,name,reg
1476 #define AROS_LPA(type,name,reg) type,name,reg
1477 #define AROS_LCA(type,name,reg) type,name,reg
1478 #define AROS_LDA(type,name,reg) type,name,reg
1480 #define AROS_LHAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1481 #define AROS_LPAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1482 #define AROS_LCAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1483 #define AROS_LDAQUAD(type,name,reg1,reg2) type,name,reg1,reg2
1485 #ifndef AROS_LIBFUNC_INIT
1486 # define AROS_LIBFUNC_INIT {
1488 #ifndef AROS_LIBFUNC_EXIT
1489 # define AROS_LIBFUNC_EXIT }}
1492 /* Tagging of private functions, so that they can be distinguished from
1493 official ones. But they have to compile the same way, so: */
1494 #define AROS_PLH0 AROS_LH0
1495 #define AROS_PLH1 AROS_LH1
1496 #define AROS_PLH2 AROS_LH2
1497 #define AROS_PLH3 AROS_LH3
1498 #define AROS_PLH4 AROS_LH4
1499 #define AROS_PLH5 AROS_LH5
1500 #define AROS_PLH6 AROS_LH6
1501 #define AROS_PLH7 AROS_LH7
1502 #define AROS_PLH8 AROS_LH8
1503 #define AROS_PLH9 AROS_LH9
1504 #define AROS_PLH10 AROS_LH10
1505 #define AROS_PLH11 AROS_LH11
1506 #define AROS_PLH12 AROS_LH12
1507 #define AROS_PLH13 AROS_LH13
1508 #define AROS_PLH14 AROS_LH14
1509 #define AROS_PLH15 AROS_LH15
1511 /* NT stands for No Tags, which means that the functions which are defined with these headers
1512 are not subject to tagcall generation by the script used to generate include files */
1513 #define AROS_NTLH0 AROS_LH0
1514 #define AROS_NTLH1 AROS_LH1
1515 #define AROS_NTLH2 AROS_LH2
1516 #define AROS_NTLH3 AROS_LH3
1517 #define AROS_NTLH4 AROS_LH4
1518 #define AROS_NTLH5 AROS_LH5
1519 #define AROS_NTLH6 AROS_LH6
1520 #define AROS_NTLH7 AROS_LH7
1521 #define AROS_NTLH8 AROS_LH8
1522 #define AROS_NTLH9 AROS_LH9
1523 #define AROS_NTLH10 AROS_LH10
1524 #define AROS_NTLH11 AROS_LH11
1525 #define AROS_NTLH12 AROS_LH12
1526 #define AROS_NTLH13 AROS_LH13
1527 #define AROS_NTLH14 AROS_LH14
1528 #define AROS_NTLH15 AROS_LH15
1530 /******************************************************************************
1531 ***** ENDE aros/libcall.h
1532 ******************************************************************************/
1534 #endif /* AROS_LIBCALL_H */