2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
10 /******************************************************************************
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
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* ";" !!
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)
55 if(node->ln_Succ==NULL)
64 ******************************************************************************/
66 #include <aros/config.h>
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)
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)
79 #define AROS_SLIB_ENTRY_GATED AROS_SLIB_ENTRY
82 /* System-Specific things */
84 # include <aros/system.h>
87 #ifndef __typedef_VOID_FUNC
88 #define __typedef_VOID_FUNC
89 typedef void (*VOID_FUNC
)(void);
91 #ifndef __typedef_LONG_FUNC
92 #define __typedef_LONG_FUNC
93 typedef long (*LONG_FUNC
)(void);
95 #ifndef __typedef_ULONG_FUNC
96 #define __typedef_ULONG_FUNC
97 typedef unsigned long (*ULONG_FUNC
)(void);
100 /* Declare all macros which the systems' libcall didn't */
101 #ifndef __AROS_SLIB_ENTRY
102 # define __AROS_SLIB_ENTRY(n,s) s ## _ ## n
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
111 # define AROS_SLIB_ENTRY(n,s) __AROS_SLIB_ENTRY(n,s)
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)(\
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)(\
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
302 #define AROS_LH2I(t,n,a1,a2,bt,bn,o,s) \
303 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
307 #define AROS_LH3I(t,n,a1,a2,a3,bt,bn,o,s) \
308 __AROS_LH_PREFIX t AROS_SLIB_ENTRY(n,s)(void) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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) { \
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(*)(\
468 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
470 __AROS_LC_BASE(bt,bn)))
471 #define AROS_LCQUAD2(t,n,a1,a2,bt,bn,o,s) \
472 (((__AROS_LC_PREFIX t(*)(\
475 __AROS_LP_BASE(bt,bn)))__AROS_GETVECADDR(bn,o))(\
478 __AROS_LC_BASE(bt,bn)))
480 #define AROS_LC0(t,n,bt,bn,o,s) \
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) \
490 __AROS_LP_BASE(bt,bn); \
492 __AROS_LC_BASE(bt,bn); \
493 (t)MyEmulHandle->EmulCallDirectOS(-6 * o); \
495 #define AROS_LC2(t,n,a1,a2,bt,bn,o,s) \
499 __AROS_LP_BASE(bt,bn); \
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) \
510 __AROS_LP_BASE(bt,bn); \
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) \
523 __AROS_LP_BASE(bt,bn); \
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) \
538 __AROS_LP_BASE(bt,bn); \
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) \
555 __AROS_LP_BASE(bt,bn); \
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) \
574 __AROS_LP_BASE(bt,bn); \
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) \
595 __AROS_LP_BASE(bt,bn); \
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) \
618 __AROS_LP_BASE(bt,bn); \
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) \
643 __AROS_LP_BASE(bt,bn); \
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) \
670 __AROS_LP_BASE(bt,bn); \
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) \
699 __AROS_LP_BASE(bt,bn); \
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) \
730 __AROS_LP_BASE(bt,bn); \
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) \
763 __AROS_LP_BASE(bt,bn); \
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) \
798 __AROS_LP_BASE(bt,bn); \
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))
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))
866 #ifndef AROS_LVO_CALL1
867 #define AROS_LVO_CALL1(t,a1,bt,bn,o,s) \
868 (((__AROS_LC_PREFIX t(*)(\
870 __AROS_LP_BASE(bt,bn)))\
871 __AROS_GETVECADDR(bn,o))(\
876 #ifndef AROS_LVO_CALL1NR
877 #define AROS_LVO_CALL1NR(a1,bt,bn,o,s) \
878 (((__AROS_LC_PREFIX void(*)(\
880 __AROS_LP_BASE(bt,bn)))\
881 __AROS_GETVECADDR(bn,o))(\
886 #ifndef AROS_LVO_CALL2
887 #define AROS_LVO_CALL2(t,a1,a2,bt,bn,o,s) \
888 (((__AROS_LC_PREFIX t(*)(\
891 __AROS_LP_BASE(bt,bn)))\
892 __AROS_GETVECADDR(bn,o))(\
898 #ifndef AROS_LVO_CALL2NR
899 #define AROS_LVO_CALL2NR(a1,a2,bt,bn,o,s) \
900 (((__AROS_LC_PREFIX void(*)(\
903 __AROS_LP_BASE(bt,bn)))\
904 __AROS_GETVECADDR(bn,o))(\
910 #ifndef AROS_LVO_CALL3
911 #define AROS_LVO_CALL3(t,a1,a2,a3,bt,bn,o,s) \
912 (((__AROS_LC_PREFIX t(*)(\
916 __AROS_LP_BASE(bt,bn)))\
917 __AROS_GETVECADDR(bn,o))(\
924 #ifndef AROS_LVO_CALL3NR
925 #define AROS_LVO_CALL3NR(a1,a2,a3,bt,bn,o,s) \
926 (((__AROS_LC_PREFIX void(*)(\
930 __AROS_LP_BASE(bt,bn)))\
931 __AROS_GETVECADDR(bn,o))(\
938 #ifndef AROS_LVO_CALL4
939 #define AROS_LVO_CALL4(t,a1,a2,a3,a4,bt,bn,o,s) \
940 (((__AROS_LC_PREFIX t(*)(\
945 __AROS_LP_BASE(bt,bn)))\
946 __AROS_GETVECADDR(bn,o))(\
954 #ifndef AROS_LVO_CALL4NR
955 #define AROS_LVO_CALL4NR(a1,a2,a3,a4,bt,bn,o,s) \
956 (((__AROS_LC_PREFIX void(*)(\
961 __AROS_LP_BASE(bt,bn)))\
962 __AROS_GETVECADDR(bn,o))(\
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(*)(\
978 __AROS_LP_BASE(bt,bn)))\
979 __AROS_GETVECADDR(bn,o))(\
988 #ifndef AROS_LVO_CALL5NR
989 #define AROS_LVO_CALL5NR(a1,a2,a3,a4,a5,bt,bn,o,s) \
990 (((__AROS_LC_PREFIX void(*)(\
996 __AROS_LP_BASE(bt,bn)))\
997 __AROS_GETVECADDR(bn,o))(\
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)
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)
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) ( \
1159 # define AROS_LD2I(t,n,a1,a2,bt,bn,o,s) \
1160 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1163 # define AROS_LD3I(t,n,a1,a2,a3,bt,bn,o,s) \
1164 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
1168 # define AROS_LD4I(t,n,a1,a2,a3,a4,bt,bn,o,s) \
1169 __AROS_LD_PREFIX t AROS_SLIB_ENTRY(n,s) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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) ( \
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 {
1319 #ifndef AROS_LIBFUNC_EXIT
1320 # define AROS_LIBFUNC_EXIT }
1322 #ifndef AROS_LIBBASE_EXT_DECL
1323 # define AROS_LIBBASE_EXT_DECL(a,b)
1326 /******************************************************************************
1327 ***** ENDE aros/libcall.h
1328 ******************************************************************************/
1330 #endif /* AROS_LIBCALL_H */