0000: 23 69 66 6e 64 65 66 20 5f 56 41 43 41 4c 4c 5f #ifndef _VACALL_
0010: 52 5f 48 20 20 20 20 20 20 20 20 20 20 20 20 20 R_H
0020: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0030: 2f 2a 2d 2a 2d 20 43 20 2d 2a 2d 2a 2f 0a 23 64 /*-*- C -*-*/.#d
0040: 65 66 69 6e 65 20 5f 56 41 43 41 4c 4c 5f 52 5f efine _VACALL_R_
0050: 48 0a 0a 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 H../*. * Copyrig
0060: 68 74 20 31 39 39 35 2d 32 30 30 36 20 42 72 75 ht 1995-2006 Bru
0070: 6e 6f 20 48 61 69 62 6c 65 2c 20 3c 62 72 75 6e no Haible, <brun
0080: 6f 40 63 6c 69 73 70 2e 6f 72 67 3e 0a 20 2a 0a o@clisp.org>. *.
0090: 20 2a 20 54 68 69 73 20 69 73 20 66 72 65 65 20 * This is free
00a0: 73 6f 66 74 77 61 72 65 20 64 69 73 74 72 69 62 software distrib
00b0: 75 74 65 64 20 75 6e 64 65 72 20 74 68 65 20 47 uted under the G
00c0: 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 NU General Publi
00d0: 63 20 4c 69 63 65 6e 63 65 0a 20 2a 20 64 65 73 c Licence. * des
00e0: 63 72 69 62 65 64 20 69 6e 20 74 68 65 20 66 69 cribed in the fi
00f0: 6c 65 20 43 4f 50 59 49 4e 47 2e 20 43 6f 6e 74 le COPYING. Cont
0100: 61 63 74 20 74 68 65 20 61 75 74 68 6f 72 20 69 act the author i
0110: 66 20 79 6f 75 20 64 6f 6e 27 74 20 68 61 76 65 f you don't have
0120: 20 74 68 69 73 0a 20 2a 20 6f 72 20 63 61 6e 27 this. * or can'
0130: 74 20 6c 69 76 65 20 77 69 74 68 20 69 74 2e 20 t live with it.
0140: 54 68 65 72 65 20 69 73 20 41 42 53 4f 4c 55 54 There is ABSOLUT
0150: 45 4c 59 20 4e 4f 20 57 41 52 52 41 4e 54 59 2c ELY NO WARRANTY,
0160: 20 65 78 70 6c 69 63 69 74 20 6f 72 20 69 6d 70 explicit or imp
0170: 6c 69 65 64 2c 0a 20 2a 20 6f 6e 20 74 68 69 73 lied,. * on this
0180: 20 73 6f 66 74 77 61 72 65 2e 0a 20 2a 2f 0a 0a software.. */..
0190: 23 69 66 20 21 64 65 66 69 6e 65 64 28 4c 49 42 #if !defined(LIB
01a0: 46 46 43 41 4c 4c 5f 56 45 52 53 49 4f 4e 29 0a FFCALL_VERSION).
01b0: 23 20 64 65 66 69 6e 65 20 4c 49 42 46 46 43 41 # define LIBFFCA
01c0: 4c 4c 5f 56 45 52 53 49 4f 4e 20 30 78 30 31 30 LL_VERSION 0x010
01d0: 42 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 54 68 65 B.#endif../* The
01e0: 73 65 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 61 se definitions a
01f0: 72 65 20 61 64 6a 75 73 74 65 64 20 62 79 20 60 re adjusted by `
0200: 63 6f 6e 66 69 67 75 72 65 27 20 61 75 74 6f 6d configure' autom
0210: 61 74 69 63 61 6c 6c 79 2e 20 2a 2f 0a 0a 2f 2a atically. */../*
0220: 20 43 50 55 20 2a 2f 0a 23 69 66 6e 64 65 66 20 CPU */.#ifndef
0230: 5f 5f 69 33 38 36 5f 5f 0a 23 64 65 66 69 6e 65 __i386__.#define
0240: 20 5f 5f 69 33 38 36 5f 5f 20 31 0a 23 65 6e 64 __i386__ 1.#end
0250: 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 6d 36 38 if.#ifndef __m68
0260: 6b 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 36 38 k__.#undef __m68
0270: 6b 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 k__.#endif.#ifnd
0280: 65 66 20 5f 5f 6d 69 70 73 5f 5f 0a 23 75 6e 64 ef __mips__.#und
0290: 65 66 20 5f 5f 6d 69 70 73 5f 5f 0a 23 65 6e 64 ef __mips__.#end
02a0: 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 6d 69 70 if.#ifndef __mip
02b0: 73 6e 33 32 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f sn32__.#undef __
02c0: 6d 69 70 73 6e 33 32 5f 5f 0a 23 65 6e 64 69 66 mipsn32__.#endif
02d0: 0a 23 69 66 6e 64 65 66 20 5f 5f 6d 69 70 73 36 .#ifndef __mips6
02e0: 34 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 69 70 4__.#undef __mip
02f0: 73 36 34 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 s64__.#endif.#if
0300: 6e 64 65 66 20 5f 5f 73 70 61 72 63 5f 5f 0a 23 ndef __sparc__.#
0310: 75 6e 64 65 66 20 5f 5f 73 70 61 72 63 5f 5f 0a undef __sparc__.
0320: 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f #endif.#ifndef _
0330: 5f 73 70 61 72 63 36 34 5f 5f 0a 23 75 6e 64 65 _sparc64__.#unde
0340: 66 20 5f 5f 73 70 61 72 63 36 34 5f 5f 0a 23 65 f __sparc64__.#e
0350: 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 61 ndif.#ifndef __a
0360: 6c 70 68 61 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f lpha__.#undef __
0370: 61 6c 70 68 61 5f 5f 0a 23 65 6e 64 69 66 0a 23 alpha__.#endif.#
0380: 69 66 6e 64 65 66 20 5f 5f 68 70 70 61 5f 5f 0a ifndef __hppa__.
0390: 23 75 6e 64 65 66 20 5f 5f 68 70 70 61 5f 5f 0a #undef __hppa__.
03a0: 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f #endif.#ifndef _
03b0: 5f 61 72 6d 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f _arm__.#undef __
03c0: 61 72 6d 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 arm__.#endif.#if
03d0: 6e 64 65 66 20 5f 5f 70 6f 77 65 72 70 63 5f 5f ndef __powerpc__
03e0: 0a 23 75 6e 64 65 66 20 5f 5f 70 6f 77 65 72 70 .#undef __powerp
03f0: 63 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 c__.#endif.#ifnd
0400: 65 66 20 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f ef __powerpc64__
0410: 0a 23 75 6e 64 65 66 20 5f 5f 70 6f 77 65 72 70 .#undef __powerp
0420: 63 36 34 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 c64__.#endif.#if
0430: 6e 64 65 66 20 5f 5f 73 33 39 30 5f 5f 0a 23 75 ndef __s390__.#u
0440: 6e 64 65 66 20 5f 5f 73 33 39 30 5f 5f 0a 23 65 ndef __s390__.#e
0450: 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 6d ndif.#ifndef __m
0460: 38 38 6b 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 88k__.#undef __m
0470: 38 38 6b 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 88k__.#endif.#if
0480: 6e 64 65 66 20 5f 5f 63 6f 6e 76 65 78 5f 5f 0a ndef __convex__.
0490: 23 75 6e 64 65 66 20 5f 5f 63 6f 6e 76 65 78 5f #undef __convex_
04a0: 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 _.#endif.#ifndef
04b0: 20 5f 5f 69 61 36 34 5f 5f 0a 23 75 6e 64 65 66 __ia64__.#undef
04c0: 20 5f 5f 69 61 36 34 5f 5f 0a 23 65 6e 64 69 66 __ia64__.#endif
04d0: 0a 23 69 66 6e 64 65 66 20 5f 5f 78 38 36 5f 36 .#ifndef __x86_6
04e0: 34 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 78 38 36 4__.#undef __x86
04f0: 5f 36 34 5f 5f 0a 23 65 6e 64 69 66 0a 0a 2f 2a _64__.#endif../*
0500: 20 43 61 6c 6c 69 6e 67 20 63 6f 6e 76 65 6e 74 Calling convent
0510: 69 6f 6e 20 2a 2f 0a 2f 2a 20 44 65 66 69 6e 65 ion */./* Define
0520: 20 69 66 20 75 73 69 6e 67 20 70 63 63 20 6e 6f if using pcc no
0530: 6e 2d 72 65 65 6e 74 72 61 6e 74 20 73 74 72 75 n-reentrant stru
0540: 63 74 20 72 65 74 75 72 6e 20 63 6f 6e 76 65 6e ct return conven
0550: 74 69 6f 6e 20 2a 2f 0a 23 75 6e 64 65 66 20 5f tion */.#undef _
0560: 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 _PCC_STRUCT_RETU
0570: 52 4e 5f 5f 0a 2f 2a 20 44 65 66 69 6e 65 20 69 RN__./* Define i
0580: 66 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 73 20 f small structs
0590: 61 72 65 20 72 65 74 75 72 6e 65 64 20 69 6e 20 are returned in
05a0: 72 65 67 69 73 74 65 72 73 20 2a 2f 0a 23 64 65 registers */.#de
05b0: 66 69 6e 65 20 5f 5f 53 4d 41 4c 4c 5f 53 54 52 fine __SMALL_STR
05c0: 55 43 54 5f 52 45 54 55 52 4e 5f 5f 20 31 0a 2f UCT_RETURN__ 1./
05d0: 2a 20 44 65 66 69 6e 65 20 69 66 20 66 6c 6f 61 * Define if floa
05e0: 74 69 6e 67 2d 70 6f 69 6e 74 20 72 65 73 75 6c ting-point resul
05f0: 74 73 20 61 72 65 20 72 65 74 75 72 6e 65 64 20 ts are returned
0600: 69 6e 20 74 68 65 20 69 6e 74 65 67 65 72 20 72 in the integer r
0610: 65 67 69 73 74 65 72 73 20 2a 2f 0a 23 75 6e 64 egisters */.#und
0620: 65 66 20 5f 5f 49 52 45 47 5f 46 4c 4f 41 54 5f ef __IREG_FLOAT_
0630: 52 45 54 55 52 4e 5f 5f 0a 0a 2f 2a 20 41 43 5f RETURN__../* AC_
0640: 54 59 50 45 5f 4c 4f 4e 47 5f 4c 4f 4e 47 5f 49 TYPE_LONG_LONG_I
0650: 4e 54 20 2a 2f 0a 2f 2a 20 44 65 66 69 6e 65 20 NT */./* Define
0660: 69 66 20 79 6f 75 72 20 63 6f 6d 70 69 6c 65 72 if your compiler
0670: 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 27 6c supports the 'l
0680: 6f 6e 67 20 6c 6f 6e 67 27 20 74 79 70 65 2e 20 ong long' type.
0690: 2a 2f 0a 23 69 66 6e 64 65 66 20 48 41 56 45 5f */.#ifndef HAVE_
06a0: 4c 4f 4e 47 5f 4c 4f 4e 47 5f 49 4e 54 0a 23 75 LONG_LONG_INT.#u
06b0: 6e 64 65 66 20 48 41 56 45 5f 4c 4f 4e 47 5f 4c ndef HAVE_LONG_L
06c0: 4f 4e 47 5f 49 4e 54 0a 23 65 6e 64 69 66 0a 0a ONG_INT.#endif..
06d0: 2f 2a 20 41 43 5f 43 5f 43 48 41 52 5f 55 4e 53 /* AC_C_CHAR_UNS
06e0: 49 47 4e 45 44 20 2a 2f 0a 23 69 66 6e 64 65 66 IGNED */.#ifndef
06f0: 20 5f 5f 43 48 41 52 5f 55 4e 53 49 47 4e 45 44 __CHAR_UNSIGNED
0700: 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 43 48 41 52 __.#undef __CHAR
0710: 5f 55 4e 53 49 47 4e 45 44 5f 5f 0a 23 65 6e 64 _UNSIGNED__.#end
0720: 69 66 0a 0a 2f 2a 20 45 6e 64 20 6f 66 20 64 65 if../* End of de
0730: 66 69 6e 69 74 69 6f 6e 73 20 61 64 6a 75 73 74 finitions adjust
0740: 65 64 20 62 79 20 60 63 6f 6e 66 69 67 75 72 65 ed by `configure
0750: 27 2e 20 2a 2f 0a 0a 0a 2f 2a 20 4d 61 78 20 23 '. */.../* Max #
0760: 20 77 6f 72 64 73 20 69 6e 20 61 72 67 75 6d 65 words in argume
0770: 6e 74 2d 6c 69 73 74 20 61 6e 64 20 74 65 6d 70 nt-list and temp
0780: 6f 72 61 72 79 20 73 74 72 75 63 74 75 72 65 20 orary structure
0790: 73 74 6f 72 61 67 65 2e 0a 20 2a 2f 0a 23 69 66 storage.. */.#if
07a0: 6e 64 65 66 20 5f 5f 56 41 5f 41 4c 49 53 54 5f ndef __VA_ALIST_
07b0: 57 4f 52 44 53 0a 23 64 65 66 69 6e 65 20 5f 5f WORDS.#define __
07c0: 56 41 5f 41 4c 49 53 54 5f 57 4f 52 44 53 20 20 VA_ALIST_WORDS
07d0: 32 35 36 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 44 256.#endif../* D
07e0: 65 74 65 72 6d 69 6e 65 20 74 68 65 20 61 6c 69 etermine the ali
07f0: 67 6e 6d 65 6e 74 20 6f 66 20 61 20 74 79 70 65 gnment of a type
0800: 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 at compile time
0810: 2e 0a 20 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 .. */.#if define
0820: 64 28 5f 5f 47 4e 55 43 5f 5f 29 0a 23 64 65 66 d(__GNUC__).#def
0830: 69 6e 65 20 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 ine __VA_alignof
0840: 20 5f 5f 61 6c 69 67 6e 6f 66 5f 5f 0a 23 65 6c __alignof__.#el
0850: 73 65 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f se.#if defined(_
0860: 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 64 65 66 69 _mips__) || defi
0870: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
0880: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
0890: 70 73 36 34 5f 5f 29 20 2f 2a 20 53 47 49 20 63 ps64__) /* SGI c
08a0: 6f 6d 70 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 ompiler */.#defi
08b0: 6e 65 20 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 20 ne __VA_alignof
08c0: 5f 5f 62 75 69 6c 74 69 6e 5f 61 6c 69 67 6e 6f __builtin_aligno
08d0: 66 0a 23 65 6c 73 65 0a 23 64 65 66 69 6e 65 20 f.#else.#define
08e0: 5f 5f 56 41 5f 6f 66 66 73 65 74 6f 66 28 74 79 __VA_offsetof(ty
08f0: 70 65 2c 69 64 65 6e 74 29 20 20 28 28 75 6e 73 pe,ident) ((uns
0900: 69 67 6e 65 64 20 6c 6f 6e 67 29 26 28 28 28 74 igned long)&(((t
0910: 79 70 65 2a 29 30 29 2d 3e 69 64 65 6e 74 29 29 ype*)0)->ident))
0920: 0a 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f 61 6c .#define __VA_al
0930: 69 67 6e 6f 66 28 74 79 70 65 29 20 20 5f 5f 56 ignof(type) __V
0940: 41 5f 6f 66 66 73 65 74 6f 66 28 73 74 72 75 63 A_offsetof(struc
0950: 74 20 7b 20 63 68 61 72 20 5f 5f 73 6c 6f 74 31 t { char __slot1
0960: 3b 20 74 79 70 65 20 5f 5f 73 6c 6f 74 32 3b 20 ; type __slot2;
0970: 7d 2c 20 5f 5f 73 6c 6f 74 32 29 0a 23 65 6e 64 }, __slot2).#end
0980: 69 66 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 43 20 if.#endif../* C
0990: 62 75 69 6c 74 69 6e 20 74 79 70 65 73 2e 0a 20 builtin types..
09a0: 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f */.#if defined(_
09b0: 5f 6d 69 70 73 6e 33 32 5f 5f 29 0a 74 79 70 65 _mipsn32__).type
09c0: 64 65 66 20 6c 6f 6e 67 20 6c 6f 6e 67 20 5f 5f def long long __
09d0: 76 61 77 6f 72 64 3b 0a 23 65 6c 73 65 0a 74 79 vaword;.#else.ty
09e0: 70 65 64 65 66 20 6c 6f 6e 67 20 5f 5f 76 61 77 pedef long __vaw
09f0: 6f 72 64 3b 0a 23 65 6e 64 69 66 0a 0a 65 6e 75 ord;.#endif..enu
0a00: 6d 20 5f 5f 56 41 74 79 70 65 0a 7b 0a 20 20 5f m __VAtype.{. _
0a10: 5f 56 41 76 6f 69 64 2c 0a 20 20 5f 5f 56 41 63 _VAvoid,. __VAc
0a20: 68 61 72 2c 0a 20 20 5f 5f 56 41 73 63 68 61 72 har,. __VAschar
0a30: 2c 0a 20 20 5f 5f 56 41 75 63 68 61 72 2c 0a 20 ,. __VAuchar,.
0a40: 20 5f 5f 56 41 73 68 6f 72 74 2c 0a 20 20 5f 5f __VAshort,. __
0a50: 56 41 75 73 68 6f 72 74 2c 0a 20 20 5f 5f 56 41 VAushort,. __VA
0a60: 69 6e 74 2c 0a 20 20 5f 5f 56 41 75 69 6e 74 2c int,. __VAuint,
0a70: 0a 20 20 5f 5f 56 41 6c 6f 6e 67 2c 0a 20 20 5f . __VAlong,. _
0a80: 5f 56 41 75 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 41 _VAulong,. __VA
0a90: 6c 6f 6e 67 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 41 longlong,. __VA
0aa0: 75 6c 6f 6e 67 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 ulonglong,. __V
0ab0: 41 66 6c 6f 61 74 2c 0a 20 20 5f 5f 56 41 64 6f Afloat,. __VAdo
0ac0: 75 62 6c 65 2c 0a 20 20 5f 5f 56 41 76 6f 69 64 uble,. __VAvoid
0ad0: 70 2c 0a 20 20 5f 5f 56 41 73 74 72 75 63 74 0a p,. __VAstruct.
0ae0: 7d 3b 0a 0a 65 6e 75 6d 20 5f 5f 56 41 5f 61 6c };..enum __VA_al
0af0: 69 73 74 5f 66 6c 61 67 73 0a 7b 0a 0a 20 20 2f ist_flags.{.. /
0b00: 2a 20 68 6f 77 20 74 6f 20 72 65 74 75 72 6e 20 * how to return
0b10: 73 74 72 75 63 74 73 20 2a 2f 0a 20 20 2f 2a 20 structs */. /*
0b20: 54 68 65 72 65 20 61 72 65 20 62 61 73 69 63 61 There are basica
0b30: 6c 6c 79 20 33 20 77 61 79 73 20 74 6f 20 72 65 lly 3 ways to re
0b40: 74 75 72 6e 20 73 74 72 75 63 74 73 3a 0a 20 20 turn structs:.
0b50: 20 2a 20 61 2e 20 54 68 65 20 63 61 6c 6c 65 64 * a. The called
0b60: 20 66 75 6e 63 74 69 6f 6e 20 72 65 74 75 72 6e function return
0b70: 73 20 61 20 70 6f 69 6e 74 65 72 20 74 6f 20 73 s a pointer to s
0b80: 74 61 74 69 63 20 64 61 74 61 2e 20 4e 6f 74 20 tatic data. Not
0b90: 72 65 65 6e 74 72 61 6e 74 2e 0a 20 20 20 2a 20 reentrant.. *
0ba0: 62 2e 20 54 68 65 20 63 61 6c 6c 65 72 20 70 61 b. The caller pa
0bb0: 73 73 65 73 20 74 68 65 20 72 65 74 75 72 6e 20 sses the return
0bc0: 73 74 72 75 63 74 75 72 65 20 61 64 64 72 65 73 structure addres
0bd0: 73 20 69 6e 20 61 20 64 65 64 69 63 61 74 65 64 s in a dedicated
0be0: 20 72 65 67 69 73 74 65 72 0a 20 20 20 2a 20 20 register. *
0bf0: 20 20 6f 72 20 61 73 20 61 20 66 69 72 73 74 20 or as a first
0c00: 28 6f 72 20 6c 61 73 74 29 2c 20 69 6e 76 69 73 (or last), invis
0c10: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 2e 20 54 ible argument. T
0c20: 68 65 20 63 61 6c 6c 65 64 20 66 75 6e 63 74 69 he called functi
0c30: 6f 6e 20 73 74 6f 72 65 73 0a 20 20 20 2a 20 20 on stores. *
0c40: 20 20 69 74 73 20 72 65 73 75 6c 74 20 74 68 65 its result the
0c50: 72 65 2e 0a 20 20 20 2a 20 63 2e 20 4c 69 6b 65 re.. * c. Like
0c60: 20 62 2c 20 61 6e 64 20 74 68 65 20 63 61 6c 6c b, and the call
0c70: 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 6c 73 6f ed function also
0c80: 20 72 65 74 75 72 6e 73 20 74 68 65 20 72 65 74 returns the ret
0c90: 75 72 6e 20 73 74 72 75 63 74 75 72 65 0a 20 20 urn structure.
0ca0: 20 2a 20 20 20 20 61 64 64 72 65 73 73 20 69 6e * address in
0cb0: 20 74 68 65 20 72 65 74 75 72 6e 20 76 61 6c 75 the return valu
0cc0: 65 20 72 65 67 69 73 74 65 72 2e 20 28 54 68 69 e register. (Thi
0cd0: 73 20 69 73 20 6e 6f 74 20 76 65 72 79 20 64 69 s is not very di
0ce0: 73 74 69 6e 67 75 69 73 68 61 62 6c 65 0a 20 20 stinguishable.
0cf0: 20 2a 20 20 20 20 66 72 6f 6d 20 62 2e 29 0a 20 * from b.).
0d00: 20 20 2a 20 49 6e 64 65 70 65 6e 64 65 6e 74 6c * Independentl
0d10: 79 20 6f 66 20 74 68 69 73 2c 0a 20 20 20 2a 20 y of this,. *
0d20: 72 2e 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 r. small structu
0d30: 72 65 73 20 28 3c 3d 20 34 20 6f 72 20 3c 3d 20 res (<= 4 or <=
0d40: 38 20 62 79 74 65 73 29 20 6d 61 79 20 62 65 20 8 bytes) may be
0d50: 72 65 74 75 72 6e 65 64 20 69 6e 20 74 68 65 20 returned in the
0d60: 72 65 74 75 72 6e 0a 20 20 20 2a 20 20 20 20 76 return. * v
0d70: 61 6c 75 65 20 72 65 67 69 73 74 65 72 28 73 29 alue register(s)
0d80: 2c 20 6f 72 0a 20 20 20 2a 20 6d 2e 20 65 76 65 , or. * m. eve
0d90: 6e 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 n small structur
0da0: 65 73 20 61 72 65 20 70 61 73 73 65 64 20 69 6e es are passed in
0db0: 20 6d 65 6d 6f 72 79 2e 0a 20 20 20 2a 2f 0a 20 memory.. */.
0dc0: 20 2f 2a 20 67 63 63 2d 32 2e 36 2e 33 20 65 6d /* gcc-2.6.3 em
0dd0: 70 6c 6f 79 73 20 74 68 65 20 66 6f 6c 6c 6f 77 ploys the follow
0de0: 69 6e 67 20 73 74 72 61 74 65 67 79 3a 0a 20 20 ing strategy:.
0df0: 20 2a 20 20 20 2d 20 49 66 20 50 43 43 5f 53 54 * - If PCC_ST
0e00: 41 54 49 43 5f 53 54 52 55 43 54 5f 52 45 54 55 ATIC_STRUCT_RETU
0e10: 52 4e 20 69 73 20 64 65 66 69 6e 65 64 20 69 6e RN is defined in
0e20: 20 74 68 65 20 6d 61 63 68 69 6e 65 20 64 65 73 the machine des
0e30: 63 72 69 70 74 69 6f 6e 0a 20 20 20 2a 20 20 20 cription. *
0e40: 20 20 69 74 20 75 73 65 73 20 6d 65 74 68 6f 64 it uses method
0e50: 20 61 2c 20 65 6c 73 65 20 6d 65 74 68 6f 64 20 a, else method
0e60: 63 2e 0a 20 20 20 2a 20 20 20 2d 20 49 66 20 66 c.. * - If f
0e70: 6c 61 67 5f 70 63 63 5f 73 74 72 75 63 74 5f 72 lag_pcc_struct_r
0e80: 65 74 75 72 6e 20 69 73 20 73 65 74 20 28 65 69 eturn is set (ei
0e90: 74 68 65 72 20 62 79 20 2d 66 70 63 63 2d 73 74 ther by -fpcc-st
0ea0: 72 75 63 74 2d 72 65 74 75 72 6e 20 6f 72 20 69 ruct-return or i
0eb0: 66 0a 20 20 20 2a 20 20 20 20 20 44 45 46 41 55 f. * DEFAU
0ec0: 4c 54 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 LT_PCC_STRUCT_RE
0ed0: 54 55 52 4e 20 69 73 20 64 65 66 69 6e 65 64 20 TURN is defined
0ee0: 74 6f 20 31 20 69 6e 20 74 68 65 20 6d 61 63 68 to 1 in the mach
0ef0: 69 6e 65 20 64 65 73 63 72 69 70 74 69 6f 6e 29 ine description)
0f00: 0a 20 20 20 2a 20 20 20 20 20 69 74 20 75 73 65 . * it use
0f10: 73 20 6d 65 74 68 6f 64 20 6d 2c 20 65 6c 73 65 s method m, else
0f20: 20 28 65 69 74 68 65 72 20 62 79 20 2d 66 72 65 (either by -fre
0f30: 67 2d 73 74 72 75 63 74 2d 72 65 74 75 72 6e 20 g-struct-return
0f40: 6f 72 20 69 66 0a 20 20 20 2a 20 20 20 20 20 44 or if. * D
0f50: 45 46 41 55 4c 54 5f 50 43 43 5f 53 54 52 55 43 EFAULT_PCC_STRUC
0f60: 54 5f 52 45 54 55 52 4e 20 69 73 20 64 65 66 69 T_RETURN is defi
0f70: 6e 65 64 20 74 6f 20 30 20 69 6e 20 74 68 65 20 ned to 0 in the
0f80: 6d 61 63 68 69 6e 65 20 64 65 73 63 72 69 70 74 machine descript
0f90: 69 6f 6e 29 0a 20 20 20 2a 20 20 20 20 20 6d 65 ion). * me
0fa0: 74 68 6f 64 20 72 2e 0a 20 20 20 2a 2f 0a 20 20 thod r.. */.
0fb0: 5f 5f 56 41 5f 50 43 43 5f 53 54 52 55 43 54 5f __VA_PCC_STRUCT_
0fc0: 52 45 54 55 52 4e 09 3d 20 31 3c 3c 30 2c 09 2f RETURN.= 1<<0,./
0fd0: 2a 20 61 3a 20 6e 65 65 64 20 74 6f 20 63 6f 70 * a: need to cop
0fe0: 79 20 74 68 65 20 73 74 72 75 63 74 20 2a 2f 0a y the struct */.
0ff0: 20 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 __VA_SMALL_STR
1000: 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c UCT_RETURN.= 1<<
1010: 31 2c 09 2f 2a 20 72 3a 20 73 70 65 63 69 61 6c 1,./* r: special
1020: 20 63 61 73 65 20 66 6f 72 20 73 6d 61 6c 6c 20 case for small
1030: 73 74 72 75 63 74 73 20 2a 2f 0a 20 20 5f 5f 56 structs */. __V
1040: 41 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 A_GCC_STRUCT_RET
1050: 55 52 4e 09 3d 20 31 3c 3c 32 2c 09 2f 2a 20 63 URN.= 1<<2,./* c
1060: 6f 6e 73 69 64 65 72 20 38 20 62 79 74 65 20 73 onsider 8 byte s
1070: 74 72 75 63 74 73 20 61 73 20 73 6d 61 6c 6c 20 tructs as small
1080: 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f */.#if defined(_
1090: 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 _sparc__) && !de
10a0: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
10b0: 5f 29 0a 20 20 5f 5f 56 41 5f 53 55 4e 43 43 5f _). __VA_SUNCC_
10c0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 STRUCT_RETURN.=
10d0: 31 3c 3c 33 2c 0a 20 20 5f 5f 56 41 5f 53 55 4e 1<<3,. __VA_SUN
10e0: 50 52 4f 43 43 5f 53 54 52 55 43 54 5f 52 45 54 PROCC_STRUCT_RET
10f0: 55 52 4e 09 3d 20 31 3c 3c 34 2c 0a 23 65 6c 73 URN.= 1<<4,.#els
1100: 65 0a 20 20 5f 5f 56 41 5f 53 55 4e 43 43 5f 53 e. __VA_SUNCC_S
1110: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 30 TRUCT_RETURN.= 0
1120: 2c 0a 20 20 5f 5f 56 41 5f 53 55 4e 50 52 4f 43 ,. __VA_SUNPROC
1130: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 C_STRUCT_RETURN.
1140: 3d 20 30 2c 0a 23 65 6e 64 69 66 0a 23 69 66 20 = 0,.#endif.#if
1150: 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f defined(__i386__
1160: 29 0a 20 20 5f 5f 56 41 5f 4e 45 58 54 47 43 43 ). __VA_NEXTGCC
1170: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d _STRUCT_RETURN.=
1180: 20 31 3c 3c 33 2c 0a 20 20 5f 5f 56 41 5f 4d 53 1<<3,. __VA_MS
1190: 56 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e VC_STRUCT_RETURN
11a0: 09 3d 20 31 3c 3c 34 2c 0a 23 65 6e 64 69 66 0a .= 1<<4,.#endif.
11b0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 #if defined(__hp
11c0: 70 61 5f 5f 29 0a 20 20 5f 5f 56 41 5f 4f 4c 44 pa__). __VA_OLD
11d0: 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 GCC_STRUCT_RETUR
11e0: 4e 09 3d 20 31 3c 3c 33 2c 0a 23 65 6e 64 69 66 N.= 1<<3,.#endif
11f0: 0a 20 20 2f 2a 20 74 68 65 20 64 65 66 61 75 6c . /* the defaul
1200: 74 20 77 61 79 20 74 6f 20 72 65 74 75 72 6e 20 t way to return
1210: 73 74 72 75 63 74 73 20 2a 2f 0a 20 20 2f 2a 20 structs */. /*
1220: 54 68 69 73 20 63 68 6f 69 63 65 20 68 65 72 65 This choice here
1230: 20 69 73 20 62 61 73 65 64 20 6f 6e 20 74 68 65 is based on the
1240: 20 61 73 73 75 6d 70 74 69 6f 6e 20 74 68 61 74 assumption that
1250: 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 79 6f the function yo
1260: 75 20 61 72 65 0a 20 20 20 2a 20 67 6f 69 6e 67 u are. * going
1270: 20 74 6f 20 63 61 6c 6c 20 68 61 73 20 62 65 65 to call has bee
1280: 6e 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 n compiled with
1290: 74 68 65 20 73 61 6d 65 20 63 6f 6d 70 69 6c 65 the same compile
12a0: 72 20 79 6f 75 20 61 72 65 20 75 73 69 6e 67 20 r you are using
12b0: 74 6f 0a 20 20 20 2a 20 69 6e 63 6c 75 64 65 20 to. * include
12c0: 74 68 69 73 20 66 69 6c 65 2e 0a 20 20 20 2a 20 this file.. *
12d0: 49 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 If you want to c
12e0: 61 6c 6c 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 all functions wi
12f0: 74 68 20 61 6e 6f 74 68 65 72 20 73 74 72 75 63 th another struc
1300: 74 20 72 65 74 75 72 6e 69 6e 67 20 63 6f 6e 76 t returning conv
1310: 65 6e 74 69 6f 6e 2c 0a 20 20 20 2a 20 6a 75 73 ention,. * jus
1320: 74 20 20 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f t #define __VA_
1330: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 2e 2e STRUCT_RETURN ..
1340: 2e 0a 20 20 20 2a 20 62 65 66 6f 72 65 20 6f 72 .. * before or
1350: 20 61 66 74 65 72 20 23 69 6e 63 6c 75 64 69 6e after #includin
1360: 67 20 3c 76 61 63 61 6c 6c 5f 72 2e 68 3e 2e 0a g <vacall_r.h>..
1370: 20 20 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f */.#ifndef __
1380: 56 41 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e VA_STRUCT_RETURN
1390: 0a 20 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 52 . __VA_STRUCT_R
13a0: 45 54 55 52 4e 09 09 3d 0a 23 69 66 20 64 65 66 ETURN..=.#if def
13b0: 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 ined(__sparc__)
13c0: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 && !defined(__sp
13d0: 61 72 63 36 34 5f 5f 29 20 26 26 20 64 65 66 69 arc64__) && defi
13e0: 6e 65 64 28 73 75 6e 29 20 26 26 20 64 65 66 69 ned(sun) && defi
13f0: 6e 65 64 28 5f 5f 53 55 4e 50 52 4f 5f 43 29 20 ned(__SUNPRO_C)
1400: 2f 2a 20 53 55 4e 57 73 70 72 6f 20 63 63 20 2a /* SUNWspro cc *
1410: 2f 0a 09 09 09 09 20 20 5f 5f 56 41 5f 53 55 4e /..... __VA_SUN
1420: 50 52 4f 43 43 5f 53 54 52 55 43 54 5f 52 45 54 PROCC_STRUCT_RET
1430: 55 52 4e 2c 0a 23 65 6c 73 65 0a 23 69 66 20 64 URN,.#else.#if d
1440: 65 66 69 6e 65 64 28 5f 5f 50 43 43 5f 53 54 52 efined(__PCC_STR
1450: 55 43 54 5f 52 45 54 55 52 4e 5f 5f 29 20 2f 2a UCT_RETURN__) /*
1460: 20 64 65 66 69 6e 65 64 20 74 68 72 6f 75 67 68 defined through
1470: 20 63 6f 6e 66 69 67 75 72 65 2c 20 73 65 65 20 configure, see
1480: 61 62 6f 76 65 20 2a 2f 0a 09 09 09 09 20 20 5f above */..... _
1490: 5f 56 41 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 _VA_PCC_STRUCT_R
14a0: 45 54 55 52 4e 2c 0a 23 65 6c 73 65 0a 23 69 66 ETURN,.#else.#if
14b0: 20 64 65 66 69 6e 65 64 28 5f 5f 53 4d 41 4c 4c defined(__SMALL
14c0: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 5f 5f _STRUCT_RETURN__
14d0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d ) || defined(__m
14e0: 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 ipsn32__) || def
14f0: 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 ined(__mips64__)
1500: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 41 52 || defined(__AR
1510: 4d 45 4c 5f 5f 29 2f 2a 20 64 65 66 69 6e 65 64 MEL__)/* defined
1520: 20 74 68 72 6f 75 67 68 20 63 6f 6e 66 69 67 75 through configu
1530: 72 65 2c 20 73 65 65 20 61 62 6f 76 65 20 2a 2f re, see above */
1540: 0a 09 09 09 09 20 20 5f 5f 56 41 5f 53 4d 41 4c ..... __VA_SMAL
1550: 4c 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 L_STRUCT_RETURN
1560: 7c 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 |.#endif.#if def
1570: 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 0a 09 ined(__GNUC__)..
1580: 09 09 09 20 20 5f 5f 56 41 5f 47 43 43 5f 53 54 ... __VA_GCC_ST
1590: 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 0a 23 65 RUCT_RETURN |.#e
15a0: 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 ndif.#if defined
15b0: 28 5f 5f 69 33 38 36 5f 5f 29 20 26 26 20 64 65 (__i386__) && de
15c0: 66 69 6e 65 64 28 4e 65 58 54 29 20 26 26 20 64 fined(NeXT) && d
15d0: 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 efined(__GNUC__)
15e0: 20 2f 2a 20 4e 65 58 54 20 67 63 63 2d 32 2e 35 /* NeXT gcc-2.5
15f0: 2e 38 20 2a 2f 0a 09 09 09 09 20 20 5f 5f 56 41 .8 */..... __VA
1600: 5f 4e 45 58 54 47 43 43 5f 53 54 52 55 43 54 5f _NEXTGCC_STRUCT_
1610: 52 45 54 55 52 4e 20 7c 0a 23 65 6e 64 69 66 0a RETURN |.#endif.
1620: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 #if defined(__i3
1630: 38 36 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 86__) && defined
1640: 28 5f 4d 53 43 5f 56 45 52 29 20 2f 2a 20 4d 53 (_MSC_VER) /* MS
1650: 56 43 20 34 2e 30 20 2a 2f 0a 09 09 09 09 20 20 VC 4.0 */.....
1660: 5f 5f 56 41 5f 4d 53 56 43 5f 53 54 52 55 43 54 __VA_MSVC_STRUCT
1670: 5f 52 45 54 55 52 4e 20 7c 0a 23 65 6e 64 69 66 _RETURN |.#endif
1680: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 68 .#if defined(__h
1690: 70 70 61 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 ppa__) && define
16a0: 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 26 26 20 28 d(__GNUC__) && (
16b0: 5f 5f 47 4e 55 43 5f 5f 20 3c 20 33 29 20 26 26 __GNUC__ < 3) &&
16c0: 20 28 5f 5f 47 4e 55 43 5f 4d 49 4e 4f 52 5f 5f (__GNUC_MINOR__
16d0: 20 3c 20 37 29 0a 09 09 09 09 20 20 5f 5f 56 41 < 7)..... __VA
16e0: 5f 4f 4c 44 47 43 43 5f 53 54 52 55 43 54 5f 52 _OLDGCC_STRUCT_R
16f0: 45 54 55 52 4e 20 7c 0a 23 65 6e 64 69 66 0a 20 ETURN |.#endif.
1700: 20 09 09 09 09 20 20 30 2c 0a 23 65 6e 64 69 66 .... 0,.#endif
1710: 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0a .#endif.#endif..
1720: 20 20 2f 2a 20 68 6f 77 20 74 6f 20 72 65 74 75 /* how to retu
1730: 72 6e 20 66 6c 6f 61 74 73 20 2a 2f 0a 23 69 66 rn floats */.#if
1740: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f defined(__m68k_
1750: 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f _) || (defined(_
1760: 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 _sparc__) && !de
1770: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
1780: 5f 29 29 0a 20 20 5f 5f 56 41 5f 53 55 4e 43 43 _)). __VA_SUNCC
1790: 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 09 3d 20 _FLOAT_RETURN.=
17a0: 31 3c 3c 35 2c 0a 23 65 6e 64 69 66 0a 23 69 66 1<<5,.#endif.#if
17b0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f defined(__m68k_
17c0: 5f 29 0a 20 20 5f 5f 56 41 5f 46 52 45 47 5f 46 _). __VA_FREG_F
17d0: 4c 4f 41 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c LOAT_RETURN.= 1<
17e0: 3c 36 2c 0a 23 65 6e 64 69 66 0a 20 20 2f 2a 20 <6,.#endif. /*
17f0: 74 68 65 20 64 65 66 61 75 6c 74 20 77 61 79 20 the default way
1800: 74 6f 20 72 65 74 75 72 6e 20 66 6c 6f 61 74 73 to return floats
1810: 20 2a 2f 0a 20 20 2f 2a 20 54 68 69 73 20 63 68 */. /* This ch
1820: 6f 69 63 65 20 68 65 72 65 20 69 73 20 62 61 73 oice here is bas
1830: 65 64 20 6f 6e 20 74 68 65 20 61 73 73 75 6d 70 ed on the assump
1840: 74 69 6f 6e 20 74 68 61 74 20 74 68 65 20 66 75 tion that the fu
1850: 6e 63 74 69 6f 6e 20 79 6f 75 20 61 72 65 0a 20 nction you are.
1860: 20 20 2a 20 67 6f 69 6e 67 20 74 6f 20 63 61 6c * going to cal
1870: 6c 20 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 69 l has been compi
1880: 6c 65 64 20 77 69 74 68 20 74 68 65 20 73 61 6d led with the sam
1890: 65 20 63 6f 6d 70 69 6c 65 72 20 79 6f 75 20 61 e compiler you a
18a0: 72 65 20 75 73 69 6e 67 20 74 6f 0a 20 20 20 2a re using to. *
18b0: 20 69 6e 63 6c 75 64 65 20 74 68 69 73 20 66 69 include this fi
18c0: 6c 65 2e 0a 20 20 20 2a 20 49 66 20 79 6f 75 20 le.. * If you
18d0: 77 61 6e 74 20 74 6f 20 63 61 6c 6c 20 66 75 6e want to call fun
18e0: 63 74 69 6f 6e 73 20 77 69 74 68 20 61 6e 6f 74 ctions with anot
18f0: 68 65 72 20 66 6c 6f 61 74 20 72 65 74 75 72 6e her float return
1900: 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e 2c 0a ing convention,.
1910: 20 20 20 2a 20 6a 75 73 74 20 20 23 64 65 66 69 * just #defi
1920: 6e 65 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 45 ne __VA_FLOAT_RE
1930: 54 55 52 4e 20 2e 2e 2e 0a 20 20 20 2a 20 62 65 TURN .... * be
1940: 66 6f 72 65 20 6f 72 20 61 66 74 65 72 20 23 69 fore or after #i
1950: 6e 63 6c 75 64 69 6e 67 20 3c 76 61 63 61 6c 6c ncluding <vacall
1960: 5f 72 2e 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 _r.h>.. */.#if
1970: 6e 64 65 66 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f ndef __VA_FLOAT_
1980: 52 45 54 55 52 4e 0a 23 69 66 20 28 64 65 66 69 RETURN.#if (defi
1990: 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c ned(__m68k__) ||
19a0: 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 (defined(__spar
19b0: 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 c__) && !defined
19c0: 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 29 20 (__sparc64__)))
19d0: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 47 4e && !defined(__GN
19e0: 55 43 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 UC__) && defined
19f0: 28 73 75 6e 29 20 26 26 20 21 64 65 66 69 6e 65 (sun) && !define
1a00: 64 28 5f 5f 53 55 4e 50 52 4f 5f 43 29 20 20 2f d(__SUNPRO_C) /
1a10: 2a 20 73 75 6e 20 63 63 20 2a 2f 0a 20 20 5f 5f * sun cc */. __
1a20: 56 41 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 09 VA_FLOAT_RETURN.
1a30: 09 3d 20 5f 5f 56 41 5f 53 55 4e 43 43 5f 46 4c .= __VA_SUNCC_FL
1a40: 4f 41 54 5f 52 45 54 55 52 4e 2c 0a 23 65 6c 69 OAT_RETURN,.#eli
1a50: 66 20 28 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 f (defined(__m68
1a60: 6b 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 k__) && !defined
1a70: 28 5f 5f 49 52 45 47 5f 46 4c 4f 41 54 5f 52 45 (__IREG_FLOAT_RE
1a80: 54 55 52 4e 5f 5f 29 29 0a 20 20 5f 5f 56 41 5f TURN__)). __VA_
1a90: 46 4c 4f 41 54 5f 52 45 54 55 52 4e 09 09 3d 20 FLOAT_RETURN..=
1aa0: 5f 5f 56 41 5f 46 52 45 47 5f 46 4c 4f 41 54 5f __VA_FREG_FLOAT_
1ab0: 52 45 54 55 52 4e 2c 0a 23 65 6c 73 65 0a 20 20 RETURN,.#else.
1ac0: 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 45 54 55 52 __VA_FLOAT_RETUR
1ad0: 4e 09 09 3d 20 30 2c 0a 23 65 6e 64 69 66 0a 23 N..= 0,.#endif.#
1ae0: 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 68 6f 77 20 endif.. /* how
1af0: 74 6f 20 70 61 73 73 20 73 74 72 75 63 74 73 20 to pass structs
1b00: 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f */.#if defined(_
1b10: 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 64 65 66 69 _mips__) || defi
1b20: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
1b30: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
1b40: 70 73 36 34 5f 5f 29 0a 20 20 5f 5f 56 41 5f 53 ps64__). __VA_S
1b50: 47 49 43 43 5f 53 54 52 55 43 54 5f 41 52 47 53 GICC_STRUCT_ARGS
1b60: 09 3d 20 31 3c 3c 37 2c 0a 23 65 6e 64 69 66 0a .= 1<<7,.#endif.
1b70: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f #if defined(__po
1b80: 77 65 72 70 63 5f 5f 29 20 26 26 20 21 64 65 66 werpc__) && !def
1b90: 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 ined(__powerpc64
1ba0: 5f 5f 29 0a 20 20 5f 5f 56 41 5f 41 49 58 43 43 __). __VA_AIXCC
1bb0: 5f 53 54 52 55 43 54 5f 41 52 47 53 09 3d 20 31 _STRUCT_ARGS.= 1
1bc0: 3c 3c 37 2c 0a 23 65 6e 64 69 66 0a 20 20 2f 2a <<7,.#endif. /*
1bd0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 77 61 79 the default way
1be0: 20 74 6f 20 70 61 73 73 20 66 6c 6f 61 74 73 20 to pass floats
1bf0: 2a 2f 0a 20 20 2f 2a 20 54 68 69 73 20 63 68 6f */. /* This cho
1c00: 69 63 65 20 68 65 72 65 20 69 73 20 62 61 73 65 ice here is base
1c10: 64 20 6f 6e 20 74 68 65 20 61 73 73 75 6d 70 74 d on the assumpt
1c20: 69 6f 6e 20 74 68 61 74 20 74 68 65 20 66 75 6e ion that the fun
1c30: 63 74 69 6f 6e 20 79 6f 75 20 61 72 65 0a 20 20 ction you are.
1c40: 20 2a 20 67 6f 69 6e 67 20 74 6f 20 63 61 6c 6c * going to call
1c50: 20 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 69 6c has been compil
1c60: 65 64 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 ed with the same
1c70: 20 63 6f 6d 70 69 6c 65 72 20 79 6f 75 20 61 72 compiler you ar
1c80: 65 20 75 73 69 6e 67 20 74 6f 0a 20 20 20 2a 20 e using to. *
1c90: 69 6e 63 6c 75 64 65 20 74 68 69 73 20 66 69 6c include this fil
1ca0: 65 2e 0a 20 20 20 2a 20 49 66 20 79 6f 75 20 77 e.. * If you w
1cb0: 61 6e 74 20 74 6f 20 63 61 6c 6c 20 66 75 6e 63 ant to call func
1cc0: 74 69 6f 6e 73 20 77 69 74 68 20 61 6e 6f 74 68 tions with anoth
1cd0: 65 72 20 66 6c 6f 61 74 20 70 61 73 73 69 6e 67 er float passing
1ce0: 20 63 6f 6e 76 65 6e 74 69 6f 6e 2c 0a 20 20 20 convention,.
1cf0: 2a 20 6a 75 73 74 20 20 23 64 65 66 69 6e 65 20 * just #define
1d00: 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 52 47 53 __VA_STRUCT_ARGS
1d10: 20 2e 2e 2e 0a 20 20 20 2a 20 62 65 66 6f 72 65 .... * before
1d20: 20 6f 72 20 61 66 74 65 72 20 23 69 6e 63 6c 75 or after #inclu
1d30: 64 69 6e 67 20 3c 76 61 63 61 6c 6c 5f 72 2e 68 ding <vacall_r.h
1d40: 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 6e 64 65 66 >.. */.#ifndef
1d50: 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 52 47 __VA_STRUCT_ARG
1d60: 53 0a 23 69 66 20 28 64 65 66 69 6e 65 64 28 5f S.#if (defined(_
1d70: 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 64 65 66 69 _mips__) || defi
1d80: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
1d90: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
1da0: 70 73 36 34 5f 5f 29 29 20 26 26 20 21 64 65 66 ps64__)) && !def
1db0: 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 2f ined(__GNUC__) /
1dc0: 2a 20 53 47 49 20 6d 69 70 73 20 63 63 20 2a 2f * SGI mips cc */
1dd0: 0a 20 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 . __VA_STRUCT_A
1de0: 52 47 53 09 09 3d 20 5f 5f 56 41 5f 53 47 49 43 RGS..= __VA_SGIC
1df0: 43 5f 53 54 52 55 43 54 5f 41 52 47 53 2c 0a 23 C_STRUCT_ARGS,.#
1e00: 65 6c 73 65 0a 23 69 66 20 64 65 66 69 6e 65 64 else.#if defined
1e10: 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 26 (__powerpc__) &&
1e20: 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 !defined(__powe
1e30: 72 70 63 36 34 5f 5f 29 20 26 26 20 64 65 66 69 rpc64__) && defi
1e40: 6e 65 64 28 5f 41 49 58 29 20 26 26 20 21 64 65 ned(_AIX) && !de
1e50: 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 fined(__GNUC__)
1e60: 2f 2a 20 41 49 58 20 63 63 2c 20 78 6c 63 20 2a /* AIX cc, xlc *
1e70: 2f 0a 20 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f /. __VA_STRUCT_
1e80: 41 52 47 53 09 09 3d 20 5f 5f 56 41 5f 41 49 58 ARGS..= __VA_AIX
1e90: 43 43 5f 53 54 52 55 43 54 5f 41 52 47 53 2c 0a CC_STRUCT_ARGS,.
1ea0: 23 65 6c 73 65 0a 20 20 5f 5f 56 41 5f 53 54 52 #else. __VA_STR
1eb0: 55 43 54 5f 41 52 47 53 09 09 3d 20 30 2c 0a 23 UCT_ARGS..= 0,.#
1ec0: 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 23 65 6e endif.#endif.#en
1ed0: 64 69 66 0a 0a 20 20 2f 2a 20 68 6f 77 20 74 6f dif.. /* how to
1ee0: 20 70 61 73 73 20 66 6c 6f 61 74 73 20 2a 2f 0a pass floats */.
1ef0: 20 20 2f 2a 20 41 4e 53 49 20 43 20 63 6f 6d 70 /* ANSI C comp
1f00: 69 6c 65 72 73 20 61 6e 64 20 47 4e 55 20 67 63 ilers and GNU gc
1f10: 63 20 70 61 73 73 20 66 6c 6f 61 74 73 20 61 73 c pass floats as
1f20: 20 66 6c 6f 61 74 73 2e 0a 20 20 20 2a 20 4b 26 floats.. * K&
1f30: 52 20 43 20 63 6f 6d 70 69 6c 65 72 73 20 70 61 R C compilers pa
1f40: 73 73 20 66 6c 6f 61 74 73 20 61 73 20 64 6f 75 ss floats as dou
1f50: 62 6c 65 73 2e 20 57 65 20 64 6f 6e 27 74 20 73 bles. We don't s
1f60: 75 70 70 6f 72 74 20 74 68 65 6d 20 61 6e 79 20 upport them any
1f70: 6d 6f 72 65 2e 0a 20 20 20 2a 2f 0a 0a 20 20 2f more.. */.. /
1f80: 2a 20 68 6f 77 20 74 6f 20 70 61 73 73 20 61 6e * how to pass an
1f90: 64 20 72 65 74 75 72 6e 20 73 6d 61 6c 6c 20 69 d return small i
1fa0: 6e 74 65 67 65 72 20 61 72 67 75 6d 65 6e 74 73 nteger arguments
1fb0: 20 2a 2f 0a 20 20 5f 5f 56 41 5f 41 4e 53 49 5f */. __VA_ANSI_
1fc0: 49 4e 54 45 47 45 52 53 09 09 3d 20 30 2c 20 2f INTEGERS..= 0, /
1fd0: 2a 20 6e 6f 20 70 72 6f 6d 6f 74 69 6f 6e 73 20 * no promotions
1fe0: 2a 2f 0a 20 20 5f 5f 56 41 5f 54 52 41 44 49 54 */. __VA_TRADIT
1ff0: 49 4f 4e 41 4c 5f 49 4e 54 45 47 45 52 53 09 3d IONAL_INTEGERS.=
2000: 20 30 2c 20 2f 2a 20 70 72 6f 6d 6f 74 65 20 5b 0, /* promote [
2010: 75 5d 63 68 61 72 2c 20 5b 75 5d 73 68 6f 72 74 u]char, [u]short
2020: 20 74 6f 20 5b 75 5d 69 6e 74 20 2a 2f 0a 20 20 to [u]int */.
2030: 2f 2a 20 46 6f 72 74 75 6e 61 74 65 6c 79 20 74 /* Fortunately t
2040: 68 65 73 65 20 74 77 6f 20 6d 65 74 68 6f 64 73 hese two methods
2050: 20 61 72 65 20 63 6f 6d 70 61 74 69 62 6c 65 2e are compatible.
2060: 20 4f 75 72 20 6d 61 63 72 6f 73 20 77 6f 72 6b Our macros work
2070: 20 77 69 74 68 20 62 6f 74 68 2e 20 2a 2f 0a 0a with both. */..
2080: 20 20 2f 2a 20 73 74 61 63 6b 20 63 6c 65 61 6e /* stack clean
2090: 75 70 20 70 6f 6c 69 63 79 20 2a 2f 0a 20 20 5f up policy */. _
20a0: 5f 56 41 5f 43 44 45 43 4c 5f 43 4c 45 41 4e 55 _VA_CDECL_CLEANU
20b0: 50 09 09 3d 20 30 2c 20 2f 2a 20 63 61 6c 6c 65 P..= 0, /* calle
20c0: 72 20 70 6f 70 73 20 61 72 67 73 20 61 66 74 65 r pops args afte
20d0: 72 20 72 65 74 75 72 6e 20 2a 2f 0a 20 20 5f 5f r return */. __
20e0: 56 41 5f 53 54 44 43 41 4c 4c 5f 43 4c 45 41 4e VA_STDCALL_CLEAN
20f0: 55 50 09 09 3d 20 31 3c 3c 39 2c 20 2f 2a 20 63 UP..= 1<<9, /* c
2100: 61 6c 6c 65 65 20 70 6f 70 73 20 61 72 67 73 20 allee pops args
2110: 62 65 66 6f 72 65 20 72 65 74 75 72 6e 20 2a 2f before return */
2120: 0a 09 09 09 09 20 20 20 20 20 2f 2a 20 63 75 72 ..... /* cur
2130: 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 73 75 70 70 rently only supp
2140: 6f 72 74 65 64 20 6f 6e 20 5f 5f 69 33 38 36 5f orted on __i386_
2150: 5f 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 56 _ */.#ifndef __V
2160: 41 5f 43 4c 45 41 4e 55 50 0a 20 20 5f 5f 56 41 A_CLEANUP. __VA
2170: 5f 43 4c 45 41 4e 55 50 09 09 09 3d 20 5f 5f 56 _CLEANUP...= __V
2180: 41 5f 43 44 45 43 4c 5f 43 4c 45 41 4e 55 50 2c A_CDECL_CLEANUP,
2190: 0a 23 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 54 68 .#endif.. /* Th
21a0: 65 73 65 20 61 72 65 20 66 6f 72 20 69 6e 74 65 ese are for inte
21b0: 72 6e 61 6c 20 75 73 65 20 6f 6e 6c 79 20 2a 2f rnal use only */
21c0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 .#if defined(__i
21d0: 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 386__) || define
21e0: 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 d(__m68k__) || d
21f0: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 efined(__mipsn32
2200: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
2210: 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 _mips64__) || de
2220: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
2230: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
2240: 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 alpha__) || defi
2250: 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 ned(__arm__) ||
2260: 28 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 (defined(__power
2270: 70 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 pc__) && !define
2280: 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 d(__powerpc64__)
2290: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 ) || defined(__c
22a0: 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 64 65 66 69 onvex__) || defi
22b0: 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 7c 7c ned(__ia64__) ||
22c0: 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 defined(__x86_6
22d0: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
22e0: 5f 5f 73 33 39 30 5f 5f 29 0a 20 20 5f 5f 56 41 __s390__). __VA
22f0: 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 43 54 _REGISTER_STRUCT
2300: 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 31 30 2c _RETURN.= 1<<10,
2310: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
2320: 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 ned(__mips__) &&
2330: 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 !defined(__mips
2340: 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 6e n32__) && !defin
2350: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 ed(__mips64__).
2360: 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 31 09 09 09 __VA_FLOAT_1...
2370: 3d 20 31 3c 3c 31 31 2c 0a 20 20 5f 5f 56 41 5f = 1<<11,. __VA_
2380: 46 4c 4f 41 54 5f 32 09 09 09 3d 20 31 3c 3c 31 FLOAT_2...= 1<<1
2390: 32 2c 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 2,.#endif.#if de
23a0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f fined(__mipsn32_
23b0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
23c0: 6d 69 70 73 36 34 5f 5f 29 0a 20 20 5f 5f 56 41 mips64__). __VA
23d0: 5f 52 45 47 49 53 54 45 52 5f 46 4c 4f 41 54 53 _REGISTER_FLOATS
23e0: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 TRUCT_RETURN.= 1
23f0: 3c 3c 31 33 2c 0a 20 20 5f 5f 56 41 5f 52 45 47 <<13,. __VA_REG
2400: 49 53 54 45 52 5f 44 4f 55 42 4c 45 53 54 52 55 ISTER_DOUBLESTRU
2410: 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 31 CT_RETURN.= 1<<1
2420: 34 2c 0a 23 65 6e 64 69 66 0a 0a 20 20 5f 5f 56 4,.#endif.. __V
2430: 41 5f 66 6c 61 67 5f 66 6f 72 5f 62 72 6f 6b 65 A_flag_for_broke
2440: 6e 5f 63 6f 6d 70 69 6c 65 72 73 5f 74 68 61 74 n_compilers_that
2450: 5f 64 6f 6e 74 5f 6c 69 6b 65 5f 74 72 61 69 6c _dont_like_trail
2460: 69 6e 67 5f 63 6f 6d 6d 61 73 0a 7d 3b 0a 0a 2f ing_commas.};../
2470: 2a 0a 20 2a 20 44 65 66 69 6e 69 74 69 6f 6e 20 *. * Definition
2480: 6f 66 20 74 68 65 20 60 76 61 5f 61 6c 69 73 74 of the `va_alist
2490: 27 20 74 79 70 65 2e 0a 20 2a 2f 0a 74 79 70 65 ' type.. */.type
24a0: 64 65 66 20 73 74 72 75 63 74 0a 7b 0a 20 20 2f def struct.{. /
24b0: 2a 20 73 6f 6d 65 20 76 61 5f 2e 2e 2e 20 6d 61 * some va_... ma
24c0: 63 72 6f 73 20 6e 65 65 64 20 74 68 65 73 65 20 cros need these
24d0: 66 6c 61 67 73 20 2a 2f 0a 20 20 69 6e 74 20 20 flags */. int
24e0: 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 3b flags;
24f0: 0a 20 20 2f 2a 20 63 75 72 72 65 6e 74 20 70 6f . /* current po
2500: 69 6e 74 65 72 20 69 6e 74 6f 20 74 68 65 20 61 inter into the a
2510: 72 67 75 6d 65 6e 74 20 61 72 72 61 79 20 2a 2f rgument array */
2520: 0a 20 20 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 . unsigned long
2530: 20 20 61 70 74 72 3b 0a 20 20 2f 2a 20 73 74 72 aptr;. /* str
2540: 75 63 74 75 72 65 20 72 65 74 75 72 6e 20 70 6f ucture return po
2550: 69 6e 74 65 72 2c 20 72 65 74 75 72 6e 20 74 79 inter, return ty
2560: 70 65 2c 20 72 65 74 75 72 6e 20 74 79 70 65 20 pe, return type
2570: 73 69 7a 65 20 2a 2f 0a 20 20 76 6f 69 64 2a 20 size */. void*
2580: 20 20 20 20 20 20 20 20 20 72 61 64 64 72 3b 0a raddr;.
2590: 20 20 65 6e 75 6d 20 5f 5f 56 41 74 79 70 65 20 enum __VAtype
25a0: 20 72 74 79 70 65 3b 0a 20 20 75 6e 73 69 67 6e rtype;. unsign
25b0: 65 64 20 6c 6f 6e 67 20 20 72 73 69 7a 65 3b 0a ed long rsize;.
25c0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 #if defined(__i3
25d0: 38 36 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 86__) || (define
25e0: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 d(__powerpc__) &
25f0: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 & !defined(__pow
2600: 65 72 70 63 36 34 5f 5f 29 20 26 26 20 64 65 66 erpc64__) && def
2610: 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 ined(__MACH__) &
2620: 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c & defined(__APPL
2630: 45 5f 5f 29 29 0a 20 20 2f 2a 20 46 69 6c 6c 65 E__)). /* Fille
2640: 72 20 77 6f 72 64 2c 20 6e 65 65 64 65 64 20 69 r word, needed i
2650: 66 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f 66 f the numbers of
2660: 20 77 6f 72 64 73 20 75 70 20 74 6f 20 6e 6f 77 words up to now
2670: 20 69 6e 20 74 68 69 73 20 73 74 72 75 63 74 75 in this structu
2680: 72 65 20 2a 2f 0a 20 20 2f 2a 20 69 73 20 6f 64 re */. /* is od
2690: 64 20 28 62 65 63 61 75 73 65 20 6f 6e 20 4d 53 d (because on MS
26a0: 56 43 2c 20 61 6c 69 67 6e 6f 66 28 64 6f 75 62 VC, alignof(doub
26b0: 6c 65 29 20 3d 20 38 2c 20 6e 6f 72 6d 61 6c 6c le) = 8, normall
26c0: 79 20 3d 20 34 3b 20 73 69 6d 69 6c 61 72 6c 79 y = 4; similarly
26d0: 2c 20 20 2a 2f 0a 20 20 2f 2a 20 6f 6e 20 4d 61 , */. /* on Ma
26e0: 63 4f 53 20 58 2c 20 74 68 65 20 41 70 70 6c 65 cOS X, the Apple
26f0: 20 63 6f 6d 70 69 6c 65 72 20 68 61 73 20 61 6c compiler has al
2700: 69 67 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3d 20 ignof(double) =
2710: 38 20 77 68 65 72 65 61 73 20 74 68 65 20 20 20 8 whereas the
2720: 20 20 20 2a 2f 0a 20 20 2f 2a 20 73 74 61 6e 64 */. /* stand
2730: 61 72 64 20 47 43 43 20 68 61 73 20 61 6c 69 67 ard GCC has alig
2740: 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3d 20 34 2e nof(double) = 4.
2750: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2760: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2770: 20 20 20 2a 2f 0a 20 20 5f 5f 76 61 77 6f 72 64 */. __vaword
2780: 20 20 20 20 20 20 20 66 69 6c 6c 65 72 31 3b 0a filler1;.
2790: 23 65 6e 64 69 66 0a 20 20 2f 2a 20 74 65 6d 70 #endif. /* temp
27a0: 6f 72 61 72 79 20 73 74 6f 72 61 67 65 20 66 6f orary storage fo
27b0: 72 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 2a r return value *
27c0: 2f 0a 20 20 75 6e 69 6f 6e 20 7b 0a 20 20 20 20 /. union {.
27d0: 63 68 61 72 20 20 20 20 20 20 20 20 20 20 20 20 char
27e0: 20 20 20 20 5f 63 68 61 72 3b 0a 20 20 20 20 73 _char;. s
27f0: 69 67 6e 65 64 20 63 68 61 72 20 20 20 20 20 20 igned char
2800: 20 20 20 5f 73 63 68 61 72 3b 0a 20 20 20 20 75 _schar;. u
2810: 6e 73 69 67 6e 65 64 20 63 68 61 72 20 20 20 20 nsigned char
2820: 20 20 20 5f 75 63 68 61 72 3b 0a 20 20 20 20 73 _uchar;. s
2830: 68 6f 72 74 20 20 20 20 20 20 20 20 20 20 20 20 hort
2840: 20 20 20 5f 73 68 6f 72 74 3b 0a 20 20 20 20 75 _short;. u
2850: 6e 73 69 67 6e 65 64 20 73 68 6f 72 74 20 20 20 nsigned short
2860: 20 20 20 5f 75 73 68 6f 72 74 3b 0a 20 20 20 20 _ushort;.
2870: 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 20 int
2880: 20 20 20 20 5f 69 6e 74 3b 0a 20 20 20 20 75 6e _int;. un
2890: 73 69 67 6e 65 64 20 69 6e 74 20 20 20 20 20 20 signed int
28a0: 20 20 5f 75 69 6e 74 3b 0a 20 20 20 20 6c 6f 6e _uint;. lon
28b0: 67 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 g
28c0: 20 5f 6c 6f 6e 67 3b 0a 20 20 20 20 75 6e 73 69 _long;. unsi
28d0: 67 6e 65 64 20 6c 6f 6e 67 20 20 20 20 20 20 20 gned long
28e0: 5f 75 6c 6f 6e 67 3b 0a 23 69 66 20 21 28 64 65 _ulong;.#if !(de
28f0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
2900: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 ) || defined(__a
2910: 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e lpha__) || defin
2920: 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f ed(__powerpc64__
2930: 29 29 20 26 26 20 64 65 66 69 6e 65 64 28 48 41 )) && defined(HA
2940: 56 45 5f 4c 4f 4e 47 5f 4c 4f 4e 47 5f 49 4e 54 VE_LONG_LONG_INT
2950: 29 0a 20 20 20 20 6c 6f 6e 67 20 6c 6f 6e 67 20 ). long long
2960: 20 20 20 20 20 20 20 20 20 20 5f 6c 6f 6e 67 6c _longl
2970: 6f 6e 67 3b 0a 20 20 20 20 75 6e 73 69 67 6e 65 ong;. unsigne
2980: 64 20 6c 6f 6e 67 20 6c 6f 6e 67 20 20 5f 75 6c d long long _ul
2990: 6f 6e 67 6c 6f 6e 67 3b 0a 23 65 6e 64 69 66 0a onglong;.#endif.
29a0: 20 20 20 20 66 6c 6f 61 74 20 20 20 20 20 20 20 float
29b0: 20 20 20 20 20 20 20 20 5f 66 6c 6f 61 74 3b 0a _float;.
29c0: 20 20 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 double
29d0: 20 20 20 20 20 20 20 20 5f 64 6f 75 62 6c 65 3b _double;
29e0: 0a 20 20 20 20 76 6f 69 64 2a 20 20 20 20 20 20 . void*
29f0: 20 20 20 20 20 20 20 20 20 5f 70 74 72 3b 0a 20 _ptr;.
2a00: 20 20 20 5f 5f 76 61 77 6f 72 64 20 20 20 20 20 __vaword
2a10: 20 20 20 20 20 20 20 5f 77 6f 72 64 73 5b 32 5d _words[2]
2a20: 3b 0a 20 20 7d 20 20 20 20 20 20 20 20 20 20 20 ;. }
2a30: 20 20 20 74 6d 70 3b 0a 23 69 66 20 64 65 66 69 tmp;.#if defi
2a40: 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c ned(__i386__) ||
2a50: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f defined(__m68k_
2a60: 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f _) || (defined(_
2a70: 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 _sparc__) && !de
2a80: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
2a90: 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f _)) || defined(_
2aa0: 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 64 65 66 69 _hppa__) || defi
2ab0: 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c ned(__m88k__) ||
2ac0: 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f defined(__ia64_
2ad0: 5f 29 0a 20 20 76 6f 69 64 2a 20 20 20 20 20 20 _). void*
2ae0: 20 20 20 20 73 74 72 75 63 74 72 61 64 64 72 3b structraddr;
2af0: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
2b00: 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 7c 7c ned(__mips__) ||
2b10: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e defined(__mipsn
2b20: 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 32__) || defined
2b30: 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 (__mips64__) ||
2b40: 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 5f defined(__alpha_
2b50: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
2b60: 68 70 70 61 5f 5f 29 0a 20 20 6c 6f 6e 67 20 20 hppa__). long
2b70: 20 20 20 20 20 20 20 20 20 6d 65 6d 61 72 67 70 memargp
2b80: 74 72 3b 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 tr;.#endif.#if d
2b90: 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 efined(__hppa__)
2ba0: 0a 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 20 . long
2bb0: 20 20 66 61 72 67 5f 6f 66 66 73 65 74 3b 0a 20 farg_offset;.
2bc0: 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 20 20 20 long
2bd0: 64 61 72 67 5f 6f 66 66 73 65 74 3b 0a 20 20 66 darg_offset;. f
2be0: 6c 6f 61 74 20 20 20 20 20 20 20 20 20 20 66 61 loat fa
2bf0: 72 67 5b 34 5d 3b 0a 20 20 64 6f 75 62 6c 65 20 rg[4];. double
2c00: 20 20 20 20 20 20 20 20 64 61 72 67 5b 32 5d 3b darg[2];
2c10: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
2c20: 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 ned(__mips__) &&
2c30: 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 !defined(__mips
2c40: 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 6e n32__) && !defin
2c50: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 ed(__mips64__).
2c60: 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 int
2c70: 61 6e 75 6d 3b 0a 20 20 66 6c 6f 61 74 20 20 20 anum;. float
2c80: 20 20 20 20 20 20 20 66 61 72 67 5b 32 5d 3b 0a farg[2];.
2c90: 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 double
2ca0: 20 64 61 72 67 5b 32 5d 3b 0a 23 65 6e 64 69 66 darg[2];.#endif
2cb0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
2cc0: 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 ipsn32__) || def
2cd0: 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 ined(__mips64__)
2ce0: 0a 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 . int
2cf0: 20 20 61 6e 75 6d 3b 0a 20 20 66 6c 6f 61 74 20 anum;. float
2d00: 20 20 20 20 20 20 20 20 20 66 61 72 67 5b 38 5d farg[8]
2d10: 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 ;. double
2d20: 20 20 20 64 61 72 67 5b 38 5d 3b 0a 23 65 6e 64 darg[8];.#end
2d30: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
2d40: 5f 73 70 61 72 63 36 34 5f 5f 29 0a 20 20 69 6e _sparc64__). in
2d50: 74 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 75 t anu
2d60: 6d 3b 0a 20 20 66 6c 6f 61 74 20 20 20 20 20 20 m;. float
2d70: 20 20 20 20 66 61 72 67 5b 31 36 5d 3b 0a 20 20 farg[16];.
2d80: 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 64 double d
2d90: 61 72 67 5b 31 36 5d 3b 0a 23 65 6e 64 69 66 0a arg[16];.#endif.
2da0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f #if defined(__po
2db0: 77 65 72 70 63 5f 5f 29 20 7c 7c 20 64 65 66 69 werpc__) || defi
2dc0: 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f ned(__powerpc64_
2dd0: 5f 29 0a 20 20 64 6f 75 62 6c 65 2a 20 20 20 20 _). double*
2de0: 20 20 20 20 6d 65 6d 66 61 72 67 70 74 72 3b 0a memfargptr;.
2df0: 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 double
2e00: 20 66 61 72 67 5b 31 33 5d 3b 0a 23 69 66 20 21 farg[13];.#if !
2e10: 28 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c (defined(_AIX) |
2e20: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 | (defined(__MAC
2e30: 48 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 H__) && defined(
2e40: 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 20 20 5f __APPLE__))). _
2e50: 5f 76 61 77 6f 72 64 20 20 20 20 20 20 20 72 65 _vaword re
2e60: 67 61 72 67 5b 38 5d 3b 0a 20 20 75 6e 73 69 67 garg[8];. unsig
2e70: 6e 65 64 20 6c 6f 6e 67 20 20 73 61 70 74 72 3b ned long saptr;
2e80: 0a 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 . int
2e90: 20 20 6f 6e 73 74 61 63 6b 3b 0a 23 65 6e 64 69 onstack;.#endi
2ea0: 66 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 f.#endif.#if def
2eb0: 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 20 ined(__s390__).
2ec0: 20 66 6c 6f 61 74 2a 20 20 20 20 20 20 20 20 20 float*
2ed0: 6d 65 6d 66 61 72 67 70 74 72 3b 0a 20 20 64 6f memfargptr;. do
2ee0: 75 62 6c 65 2a 20 20 20 20 20 20 20 20 6d 65 6d uble* mem
2ef0: 64 61 72 67 70 74 72 3b 0a 20 20 66 6c 6f 61 74 dargptr;. float
2f00: 20 20 20 20 20 20 20 20 20 20 66 61 72 67 5b 32 farg[2
2f10: 5d 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 ];. double
2f20: 20 20 20 20 64 61 72 67 5b 32 5d 3b 0a 20 20 5f darg[2];. _
2f30: 5f 76 61 77 6f 72 64 20 20 20 20 20 20 20 72 65 _vaword re
2f40: 67 61 72 67 5b 35 5d 3b 0a 20 20 75 6e 73 69 67 garg[5];. unsig
2f50: 6e 65 64 20 6c 6f 6e 67 20 20 73 61 70 74 72 3b ned long saptr;
2f60: 0a 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 . int
2f70: 20 20 6f 6e 73 74 61 63 6b 3b 0a 23 65 6e 64 69 onstack;.#endi
2f80: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
2f90: 69 61 36 34 5f 5f 29 0a 20 20 5f 5f 76 61 77 6f ia64__). __vawo
2fa0: 72 64 2a 20 20 20 20 20 20 73 61 70 74 72 3b 0a rd* saptr;.
2fb0: 20 20 64 6f 75 62 6c 65 2a 20 20 20 20 20 20 20 double*
2fc0: 20 6d 65 6d 66 61 72 67 70 74 72 3b 0a 20 20 64 memfargptr;. d
2fd0: 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 66 61 ouble fa
2fe0: 72 67 5b 38 5d 3b 0a 23 65 6e 64 69 66 0a 23 69 rg[8];.#endif.#i
2ff0: 66 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f f defined(__x86_
3000: 36 34 5f 5f 29 0a 20 20 64 6f 75 62 6c 65 2a 20 64__). double*
3010: 20 20 20 20 20 20 20 6d 65 6d 66 61 72 67 70 74 memfargpt
3020: 72 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 r;. double
3030: 20 20 20 20 66 61 72 67 5b 38 5d 3b 0a 20 20 5f farg[8];. _
3040: 5f 76 61 77 6f 72 64 2a 20 20 20 20 20 20 6d 65 _vaword* me
3050: 6d 69 61 72 67 70 74 72 3b 0a 20 20 5f 5f 76 61 miargptr;. __va
3060: 77 6f 72 64 20 20 20 20 20 20 20 69 61 72 67 5b word iarg[
3070: 36 5d 3b 0a 23 65 6e 64 69 66 0a 7d 20 5f 5f 76 6];.#endif.} __v
3080: 61 5f 61 6c 69 73 74 3b 0a 0a 74 79 70 65 64 65 a_alist;..typede
3090: 66 20 5f 5f 76 61 5f 61 6c 69 73 74 2a 20 76 61 f __va_alist* va
30a0: 5f 61 6c 69 73 74 3b 0a 0a 0a 2f 2a 0a 20 2a 20 _alist;.../*. *
30b0: 44 65 66 69 6e 69 74 69 6f 6e 20 6f 66 20 74 68 Definition of th
30c0: 65 20 76 61 5f 73 74 61 72 74 5f 78 78 78 20 6d e va_start_xxx m
30d0: 61 63 72 6f 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 acros.. */.#defi
30e0: 6e 65 20 5f 5f 56 41 5f 53 54 41 52 54 5f 46 4c ne __VA_START_FL
30f0: 41 47 53 20 20 5c 0a 20 20 5f 5f 56 41 5f 53 54 AGS \. __VA_ST
3100: 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 20 5f 5f RUCT_RETURN | __
3110: 56 41 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 20 VA_FLOAT_RETURN
3120: 7c 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 52 | __VA_STRUCT_AR
3130: 47 53 20 7c 20 5f 5f 56 41 5f 43 4c 45 41 4e 55 GS | __VA_CLEANU
3140: 50 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 P.#define __va_s
3150: 74 61 72 74 28 4c 49 53 54 2c 52 45 54 54 59 50 tart(LIST,RETTYP
3160: 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d E) \. ((LIST)-
3170: 3e 66 6c 61 67 73 20 3d 20 5f 5f 56 41 5f 53 54 >flags = __VA_ST
3180: 41 52 54 5f 46 4c 41 47 53 2c 09 09 09 09 09 5c ART_FLAGS,.....\
3190: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 72 74 79 70 . (LIST)->rtyp
31a0: 65 20 3d 20 28 52 45 54 54 59 50 45 29 09 09 09 e = (RETTYPE)...
31b0: 09 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 ...\. ).#define
31c0: 20 76 61 5f 73 74 61 72 74 5f 76 6f 69 64 28 4c va_start_void(L
31d0: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
31e0: 28 4c 49 53 54 2c 5f 5f 56 41 76 6f 69 64 29 0a (LIST,__VAvoid).
31f0: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3200: 5f 63 68 61 72 28 4c 49 53 54 29 09 20 5f 5f 76 _char(LIST). __v
3210: 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 a_start(LIST,__V
3220: 41 63 68 61 72 29 0a 23 64 65 66 69 6e 65 20 76 Achar).#define v
3230: 61 5f 73 74 61 72 74 5f 73 63 68 61 72 28 4c 49 a_start_schar(LI
3240: 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 28 ST). __va_start(
3250: 4c 49 53 54 2c 5f 5f 56 41 73 63 68 61 72 29 0a LIST,__VAschar).
3260: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3270: 5f 75 63 68 61 72 28 4c 49 53 54 29 09 20 5f 5f _uchar(LIST). __
3280: 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f va_start(LIST,__
3290: 56 41 75 63 68 61 72 29 0a 23 64 65 66 69 6e 65 VAuchar).#define
32a0: 20 76 61 5f 73 74 61 72 74 5f 73 68 6f 72 74 28 va_start_short(
32b0: 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 LIST). __va_star
32c0: 74 28 4c 49 53 54 2c 5f 5f 56 41 73 68 6f 72 74 t(LIST,__VAshort
32d0: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 ).#define va_sta
32e0: 72 74 5f 75 73 68 6f 72 74 28 4c 49 53 54 29 09 rt_ushort(LIST).
32f0: 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 __va_start(LIST
3300: 2c 5f 5f 56 41 75 73 68 6f 72 74 29 0a 23 64 65 ,__VAushort).#de
3310: 66 69 6e 65 20 76 61 5f 73 74 61 72 74 5f 69 6e fine va_start_in
3320: 74 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 t(LIST). __va_st
3330: 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 69 6e 74 art(LIST,__VAint
3340: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 ).#define va_sta
3350: 72 74 5f 75 69 6e 74 28 4c 49 53 54 29 09 20 5f rt_uint(LIST). _
3360: 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f _va_start(LIST,_
3370: 5f 56 41 75 69 6e 74 29 0a 23 64 65 66 69 6e 65 _VAuint).#define
3380: 20 76 61 5f 73 74 61 72 74 5f 6c 6f 6e 67 28 4c va_start_long(L
3390: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
33a0: 28 4c 49 53 54 2c 5f 5f 56 41 6c 6f 6e 67 29 0a (LIST,__VAlong).
33b0: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
33c0: 5f 75 6c 6f 6e 67 28 4c 49 53 54 29 09 20 5f 5f _ulong(LIST). __
33d0: 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f va_start(LIST,__
33e0: 56 41 75 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 VAulong).#define
33f0: 20 76 61 5f 73 74 61 72 74 5f 6c 6f 6e 67 6c 6f va_start_longlo
3400: 6e 67 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 ng(LIST). __va_s
3410: 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 6c 6f tart(LIST,__VAlo
3420: 6e 67 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 20 nglong).#define
3430: 76 61 5f 73 74 61 72 74 5f 75 6c 6f 6e 67 6c 6f va_start_ulonglo
3440: 6e 67 28 4c 49 53 54 29 20 5f 5f 76 61 5f 73 74 ng(LIST) __va_st
3450: 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 75 6c 6f art(LIST,__VAulo
3460: 6e 67 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 20 nglong).#define
3470: 76 61 5f 73 74 61 72 74 5f 66 6c 6f 61 74 28 4c va_start_float(L
3480: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
3490: 28 4c 49 53 54 2c 5f 5f 56 41 66 6c 6f 61 74 29 (LIST,__VAfloat)
34a0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 .#define va_star
34b0: 74 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 20 t_double(LIST).
34c0: 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c __va_start(LIST,
34d0: 5f 5f 56 41 64 6f 75 62 6c 65 29 0a 23 64 65 66 __VAdouble).#def
34e0: 69 6e 65 20 76 61 5f 73 74 61 72 74 5f 70 74 72 ine va_start_ptr
34f0: 28 4c 49 53 54 2c 54 59 50 45 29 09 20 5f 5f 76 (LIST,TYPE). __v
3500: 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 a_start(LIST,__V
3510: 41 76 6f 69 64 70 29 0a 0a 2f 2a 0a 20 2a 20 76 Avoidp)../*. * v
3520: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 3a 20 a_start_struct:
3530: 50 72 65 70 61 72 69 6e 67 20 73 74 72 75 63 74 Preparing struct
3540: 75 72 65 20 72 65 74 75 72 6e 2e 0a 20 2a 2f 0a ure return.. */.
3550: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3560: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
3570: 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c E,TYPE_SPLITTABL
3580: 45 29 20 20 5c 0a 20 20 5f 76 61 5f 73 74 61 72 E) \. _va_star
3590: 74 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 73 69 t_struct(LIST,si
35a0: 7a 65 6f 66 28 54 59 50 45 29 2c 5f 5f 56 41 5f zeof(TYPE),__VA_
35b0: 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 2c 54 59 alignof(TYPE),TY
35c0: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 0a 2f PE_SPLITTABLE)./
35d0: 2a 20 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 * _va_start_stru
35e0: 63 74 28 29 20 69 73 20 6c 69 6b 65 20 76 61 5f ct() is like va_
35f0: 73 74 61 72 74 5f 73 74 72 75 63 74 28 29 2c 20 start_struct(),
3600: 65 78 63 65 70 74 20 74 68 61 74 20 79 6f 75 20 except that you
3610: 70 61 73 73 0a 20 2a 20 74 68 65 20 74 79 70 65 pass. * the type
3620: 27 73 20 73 69 7a 65 20 61 6e 64 20 61 6c 69 67 's size and alig
3630: 6e 6d 65 6e 74 20 69 6e 73 74 65 61 64 20 6f 66 nment instead of
3640: 20 74 68 65 20 74 79 70 65 20 69 74 73 65 6c 66 the type itself
3650: 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 76 .. */.#define _v
3660: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 28 4c a_start_struct(L
3670: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
3680: 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 PE_ALIGN,TYPE_SP
3690: 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 LITTABLE) \. (
36a0: 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c __va_start(LIST,
36b0: 5f 5f 56 41 73 74 72 75 63 74 29 2c 09 09 09 09 __VAstruct),....
36c0: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 72 ..\. (LIST)->r
36d0: 73 69 7a 65 20 3d 20 28 54 59 50 45 5f 53 49 5a size = (TYPE_SIZ
36e0: 45 29 2c 09 09 09 09 09 09 5c 0a 20 20 20 28 28 E),......\. ((
36f0: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f LIST)->flags & _
3700: 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 54 52 _VA_SUNPROCC_STR
3710: 55 43 54 5f 52 45 54 55 52 4e 09 09 09 09 5c 0a UCT_RETURN....\.
3720: 20 20 20 20 3f 20 5f 5f 76 61 5f 73 74 61 72 74 ? __va_start
3730: 5f 73 74 72 75 63 74 32 28 4c 49 53 54 29 09 09 _struct2(LIST)..
3740: 09 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 4c 49 ....\. : ((LI
3750: 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 28 5f 5f ST)->flags & (__
3760: 56 41 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 VA_PCC_STRUCT_RE
3770: 54 55 52 4e 20 7c 20 5f 5f 56 41 5f 53 55 4e 43 TURN | __VA_SUNC
3780: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 C_STRUCT_RETURN)
3790: 20 5c 0a 20 20 20 20 20 20 20 3f 20 28 28 54 59 \. ? ((TY
37a0: 50 45 5f 53 49 5a 45 29 20 3c 3d 20 73 69 7a 65 PE_SIZE) <= size
37b0: 6f 66 28 5f 5f 76 61 5f 73 74 72 75 63 74 5f 62 of(__va_struct_b
37c0: 75 66 66 65 72 29 20 7c 7c 20 5f 5f 76 61 5f 65 uffer) || __va_e
37d0: 72 72 6f 72 32 28 54 59 50 45 5f 53 49 5a 45 29 rror2(TYPE_SIZE)
37e0: 2c 20 5c 0a 20 20 20 20 20 20 20 20 20 20 28 4c , \. (L
37f0: 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 26 5f IST)->raddr = &_
3800: 5f 76 61 5f 73 74 72 75 63 74 5f 62 75 66 66 65 _va_struct_buffe
3810: 72 2c 09 09 09 09 5c 0a 20 20 20 20 20 20 20 20 r,....\.
3820: 20 20 30 09 09 09 09 09 09 09 09 5c 0a 20 20 20 0........\.
3830: 20 20 20 20 20 20 29 09 09 09 09 09 09 09 09 5c )........\
3840: 0a 20 20 20 20 20 20 20 3a 20 28 28 28 4c 49 53 . : (((LIS
3850: 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 T)->flags & __VA
3860: 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 _SMALL_STRUCT_RE
3870: 54 55 52 4e 29 09 09 09 5c 0a 20 20 20 20 20 20 TURN)...\.
3880: 20 20 20 20 26 26 20 5f 5f 76 61 5f 72 65 67 5f && __va_reg_
3890: 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 struct_return(LI
38a0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
38b0: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 5c 0a E_SPLITTABLE).\.
38c0: 20 20 20 20 20 20 20 20 20 20 3f 20 28 28 4c 49 ? ((LI
38d0: 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 26 28 4c ST)->raddr = &(L
38e0: 49 53 54 29 2d 3e 74 6d 70 2c 09 09 09 09 5c 0a IST)->tmp,....\.
38f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 5f 76 __v
3900: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 a_start_struct1(
3910: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
3920: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
3930: 50 4c 49 54 54 41 42 4c 45 29 20 5c 0a 20 20 20 PLITTABLE) \.
3940: 20 20 20 20 20 20 20 20 20 29 09 09 09 09 09 09 )......
3950: 09 09 5c 0a 20 20 20 20 20 20 20 20 20 20 3a 20 ..\. :
3960: 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 __va_start_struc
3970: 74 32 28 4c 49 53 54 29 09 09 09 09 09 5c 0a 20 t2(LIST).....\.
3980: 20 29 29 20 20 29 20 20 29 0a 2f 2a 20 44 65 74 )) ) )./* Det
3990: 65 72 6d 69 6e 65 73 20 77 68 65 74 68 65 72 20 ermines whether
39a0: 61 20 73 74 72 75 63 74 75 72 65 20 69 73 20 72 a structure is r
39b0: 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 73 eturned in regis
39c0: 74 65 72 73 2c 0a 20 2a 20 64 65 70 65 6e 64 69 ters,. * dependi
39d0: 6e 67 20 6f 6e 20 69 74 73 20 73 69 7a 65 20 61 ng on its size a
39e0: 6e 64 20 69 74 73 20 77 6f 72 64 2d 73 70 6c 69 nd its word-spli
39f0: 74 74 61 62 6c 65 20 66 6c 61 67 2e 0a 20 2a 2f ttable flag.. */
3a00: 0a 23 69 66 20 28 64 65 66 69 6e 65 64 28 5f 5f .#if (defined(__
3a10: 69 33 38 36 5f 5f 29 20 26 26 20 64 65 66 69 6e i386__) && defin
3a20: 65 64 28 5f 57 49 4e 33 32 29 29 0a 23 64 65 66 ed(_WIN32)).#def
3a30: 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 74 72 ine __va_reg_str
3a40: 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c uct_return(LIST,
3a50: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 53 TYPE_SIZE,TYPE_S
3a60: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
3a70: 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 ((TYPE_SIZE) ==
3a80: 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 1 || (TYPE_SIZE)
3a90: 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f 53 == 2 || (TYPE_S
3aa0: 49 5a 45 29 20 3d 3d 20 34 09 09 5c 0a 20 20 20 IZE) == 4..\.
3ab0: 7c 7c 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 || ((TYPE_SIZE)
3ac0: 3d 3d 20 38 09 09 09 09 09 09 09 5c 0a 20 20 20 == 8.......\.
3ad0: 20 20 20 20 26 26 20 28 28 28 4c 49 53 54 29 2d && (((LIST)-
3ae0: 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 4d 53 >flags & __VA_MS
3af0: 56 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e VC_STRUCT_RETURN
3b00: 29 09 09 09 5c 0a 20 20 20 20 20 20 20 20 20 20 )...\.
3b10: 20 7c 7c 20 28 28 54 59 50 45 5f 53 50 4c 49 54 || ((TYPE_SPLIT
3b20: 54 41 42 4c 45 29 09 09 09 09 09 5c 0a 20 20 20 TABLE).....\.
3b30: 20 20 20 20 20 20 20 20 20 20 20 20 26 26 20 28 && (
3b40: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 (LIST)->flags &
3b50: 5f 5f 56 41 5f 47 43 43 5f 53 54 52 55 43 54 5f __VA_GCC_STRUCT_
3b60: 52 45 54 55 52 4e 29 09 09 5c 0a 20 20 29 20 20 RETURN)..\. )
3b70: 20 29 20 20 20 29 20 20 20 29 0a 2f 2a 20 54 75 ) ) )./* Tu
3b80: 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 rn on __VA_REGIS
3b90: 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 TER_STRUCT_RETUR
3ba0: 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f N if __VA_SMALL_
3bb0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 STRUCT_RETURN wa
3bc0: 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 s set. * and the
3bd0: 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 struct will act
3be0: 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 ually be returne
3bf0: 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a d in registers..
3c00: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
3c10: 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c _start_struct1(L
3c20: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
3c30: 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 PE_ALIGN,TYPE_SP
3c40: 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 LITTABLE) \. (
3c50: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d (LIST)->flags |=
3c60: 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 __VA_REGISTER_S
3c70: 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 29 TRUCT_RETURN, 0)
3c80: 0a 23 65 6e 64 69 66 0a 23 69 66 20 28 64 65 66 .#endif.#if (def
3c90: 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 26 ined(__i386__) &
3ca0: 26 20 21 64 65 66 69 6e 65 64 28 5f 57 49 4e 33 & !defined(_WIN3
3cb0: 32 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 2)) || defined(_
3cc0: 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 65 66 _m68k__) || (def
3cd0: 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 26 26 ined(__arm__) &&
3ce0: 20 21 64 65 66 69 6e 65 64 28 5f 5f 41 52 4d 45 !defined(__ARME
3cf0: 4c 5f 5f 29 29 20 7c 7c 20 28 64 65 66 69 6e 65 L__)) || (define
3d00: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 d(__powerpc__) &
3d10: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 & !defined(__pow
3d20: 65 72 70 63 36 34 5f 5f 29 29 20 7c 7c 20 64 65 erpc64__)) || de
3d30: 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f fined(__convex__
3d40: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
3d50: 33 39 30 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 390__).#define _
3d60: 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 _va_reg_struct_r
3d70: 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f eturn(LIST,TYPE_
3d80: 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 SIZE,TYPE_SPLITT
3d90: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 50 ABLE) \. ((TYP
3da0: 45 5f 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 E_SIZE) == 1 ||
3db0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 (TYPE_SIZE) == 2
3dc0: 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 || (TYPE_SIZE)
3dd0: 3d 3d 20 34 09 09 5c 0a 20 20 20 7c 7c 20 28 28 == 4..\. || ((
3de0: 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 38 20 TYPE_SIZE) == 8
3df0: 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 54 41 && (TYPE_SPLITTA
3e00: 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 20 20 BLE)....\.
3e10: 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 && ((LIST)->fla
3e20: 67 73 20 26 20 5f 5f 56 41 5f 47 43 43 5f 53 54 gs & __VA_GCC_ST
3e30: 52 55 43 54 5f 52 45 54 55 52 4e 29 09 09 09 5c RUCT_RETURN)...\
3e40: 0a 20 20 29 20 20 20 29 0a 2f 2a 20 54 75 72 6e . ) )./* Turn
3e50: 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 on __VA_REGISTE
3e60: 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 R_STRUCT_RETURN
3e70: 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 if __VA_SMALL_ST
3e80: 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 73 20 RUCT_RETURN was
3e90: 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 20 73 set. * and the s
3ea0: 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 75 61 truct will actua
3eb0: 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 64 20 lly be returned
3ec0: 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a in registers.. *
3ed0: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 /.#define __va_s
3ee0: 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 tart_struct1(LIS
3ef0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
3f00: 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 _ALIGN,TYPE_SPLI
3f10: 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c TTABLE) \. ((L
3f20: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
3f30: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 _VA_REGISTER_STR
3f40: 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 29 0a 23 UCT_RETURN, 0).#
3f50: 65 6e 64 69 66 0a 0a 23 69 66 20 64 65 66 69 6e endif..#if defin
3f60: 65 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 0a 2f 2a ed(__ARMEL__)./*
3f70: 20 73 74 72 75 63 74 73 20 6f 66 20 73 69 7a 65 structs of size
3f80: 20 33 20 61 6c 73 6f 20 77 69 6c 6c 20 62 65 20 3 also will be
3f90: 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 returned in regi
3fa0: 73 74 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ster */.#define
3fb0: 5f 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f __va_reg_struct_
3fc0: 72 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 return(LIST,TYPE
3fd0: 5f 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 _SIZE,TYPE_SPLIT
3fe0: 54 41 42 4c 45 29 20 20 5c 0a 20 20 20 20 28 28 TABLE) \. ((
3ff0: 54 59 50 45 5f 53 49 5a 45 29 20 3c 3d 20 34 29 TYPE_SIZE) <= 4)
4000: 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f 56 41 ./* Turn on __VA
4010: 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 43 54 _REGISTER_STRUCT
4020: 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f 56 41 5f _RETURN if __VA_
4030: 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 54 SMALL_STRUCT_RET
4040: 55 52 4e 20 77 61 73 20 73 65 74 0a 20 2a 20 61 URN was set. * a
4050: 6e 64 20 74 68 65 20 73 74 72 75 63 74 20 77 69 nd the struct wi
4060: 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 20 72 ll actually be r
4070: 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 73 eturned in regis
4080: 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e ters.. */.#defin
4090: 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 e __va_start_str
40a0: 75 63 74 31 28 4c 49 53 54 2c 54 59 50 45 5f 53 uct1(LIST,TYPE_S
40b0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c 54 IZE,TYPE_ALIGN,T
40c0: 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 YPE_SPLITTABLE)
40d0: 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c \. ((LIST)->fl
40e0: 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 ags |= __VA_REGI
40f0: 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 STER_STRUCT_RETU
4100: 52 4e 2c 20 30 29 0a 23 65 6e 64 69 66 0a 23 69 RN, 0).#endif.#i
4110: 66 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 f defined(__alph
4120: 61 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 a__).#define __v
4130: 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 65 74 a_reg_struct_ret
4140: 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 urn(LIST,TYPE_SI
4150: 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 ZE,TYPE_SPLITTAB
4160: 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f LE) \. ((TYPE_
4170: 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 28 54 SIZE) == 1 || (T
4180: 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 20 7c YPE_SIZE) == 2 |
4190: 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d | (TYPE_SIZE) ==
41a0: 20 34 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 4 || (TYPE_SIZE
41b0: 29 20 3d 3d 20 38 09 5c 0a 20 20 20 7c 7c 20 28 ) == 8.\. || (
41c0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 31 (TYPE_SIZE) == 1
41d0: 36 20 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 6 && (TYPE_SPLIT
41e0: 54 41 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 TABLE)....\.
41f0: 20 20 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 && ((LIST)->f
4200: 6c 61 67 73 20 26 20 5f 5f 56 41 5f 47 43 43 5f lags & __VA_GCC_
4210: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 09 09 STRUCT_RETURN)..
4220: 09 5c 0a 20 20 29 20 20 20 29 0a 2f 2a 20 54 75 .\. ) )./* Tu
4230: 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 rn on __VA_REGIS
4240: 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 TER_STRUCT_RETUR
4250: 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f N if __VA_SMALL_
4260: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 STRUCT_RETURN wa
4270: 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 s set. * and the
4280: 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 struct will act
4290: 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 ually be returne
42a0: 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a d in registers..
42b0: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
42c0: 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c _start_struct1(L
42d0: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
42e0: 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 PE_ALIGN,TYPE_SP
42f0: 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 LITTABLE) \. (
4300: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d (LIST)->flags |=
4310: 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 __VA_REGISTER_S
4320: 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 29 TRUCT_RETURN, 0)
4330: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
4340: 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a 23 64 ned(__hppa__).#d
4350: 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 efine __va_reg_s
4360: 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 truct_return(LIS
4370: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
4380: 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a _SPLITTABLE) \.
4390: 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 ((LIST)->flags
43a0: 20 26 20 5f 5f 56 41 5f 4f 4c 44 47 43 43 5f 53 & __VA_OLDGCC_S
43b0: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 09 09 09 TRUCT_RETURN....
43c0: 5c 0a 20 20 20 3f 20 28 28 54 59 50 45 5f 53 49 \. ? ((TYPE_SI
43d0: 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 28 54 59 50 ZE) == 1 || (TYP
43e0: 45 5f 53 49 5a 45 29 20 3d 3d 20 32 20 7c 7c 20 E_SIZE) == 2 ||
43f0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 34 (TYPE_SIZE) == 4
4400: 29 09 09 5c 0a 20 20 20 3a 20 28 28 54 59 50 45 )..\. : ((TYPE
4410: 5f 53 49 5a 45 29 20 3c 3d 20 38 29 09 09 09 09 _SIZE) <= 8)....
4420: 09 09 09 5c 0a 20 20 29 0a 2f 2a 20 54 65 73 74 ...\. )./* Test
4430: 20 62 6f 74 68 20 5f 5f 56 41 5f 4f 4c 44 47 43 both __VA_OLDGC
4440: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 C_STRUCT_RETURN
4450: 61 6e 64 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 and __VA_SMALL_S
4460: 54 52 55 43 54 5f 52 45 54 55 52 4e 20 61 74 20 TRUCT_RETURN at
4470: 72 75 6e 20 74 69 6d 65 2e 20 2a 2f 0a 23 64 65 run time. */.#de
4480: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
4490: 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 struct1(LIST,TYP
44a0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
44b0: 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c N,TYPE_SPLITTABL
44c0: 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 69 66 E) \. 0.#endif
44d0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
44e0: 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e ips__) && !defin
44f0: 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 ed(__mipsn32__)
4500: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 && !defined(__mi
4510: 70 73 36 34 5f 5f 29 20 7c 7c 20 28 64 65 66 69 ps64__) || (defi
4520: 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 ned(__sparc__) &
4530: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 & !defined(__spa
4540: 72 63 36 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 rc64__)) || defi
4550: 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 0a 23 64 ned(__m88k__).#d
4560: 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 efine __va_reg_s
4570: 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 truct_return(LIS
4580: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
4590: 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a _SPLITTABLE) \.
45a0: 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d ((TYPE_SIZE) =
45b0: 3d 20 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a = 1 || (TYPE_SIZ
45c0: 45 29 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 E) == 2 || (TYPE
45d0: 5f 53 49 5a 45 29 20 3d 3d 20 34 29 0a 2f 2a 20 _SIZE) == 4)./*
45e0: 54 65 73 74 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f Test __VA_SMALL_
45f0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 6e STRUCT_RETURN in
4600: 73 74 65 61 64 20 6f 66 20 5f 5f 56 41 5f 52 45 stead of __VA_RE
4610: 47 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 GISTER_STRUCT_RE
4620: 54 55 52 4e 2e 20 2a 2f 0a 23 69 66 20 64 65 66 TURN. */.#if def
4630: 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 ined(__mips__) &
4640: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 & !defined(__mip
4650: 73 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 sn32__) && !defi
4660: 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a ned(__mips64__).
4670: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 #define __va_sta
4680: 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 2c rt_struct1(LIST,
4690: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
46a0: 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 LIGN,TYPE_SPLITT
46b0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 ABLE) \. ((LIS
46c0: 54 29 2d 3e 61 6e 75 6d 2b 2b 2c 09 09 09 09 09 T)->anum++,.....
46d0: 09 09 5c 0a 20 20 20 30 09 09 09 09 09 09 09 09 ..\. 0........
46e0: 09 5c 0a 20 20 29 0a 23 65 6c 73 65 0a 23 64 65 .\. ).#else.#de
46f0: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
4700: 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 struct1(LIST,TYP
4710: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
4720: 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c N,TYPE_SPLITTABL
4730: 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 69 66 E) \. 0.#endif
4740: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
4750: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
4760: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
4770: 70 73 36 34 5f 5f 29 0a 23 64 65 66 69 6e 65 20 ps64__).#define
4780: 5f 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f __va_reg_struct_
4790: 72 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 return(LIST,TYPE
47a0: 5f 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 _SIZE,TYPE_SPLIT
47b0: 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 TABLE) \. ((LI
47c0: 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 ST)->flags & __V
47d0: 41 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 A_GCC_STRUCT_RET
47e0: 55 52 4e 09 09 09 09 5c 0a 20 20 20 3f 20 28 28 URN....\. ? ((
47f0: 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 31 20 TYPE_SIZE) == 1
4800: 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d || (TYPE_SIZE) =
4810: 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a = 2 || (TYPE_SIZ
4820: 45 29 20 3d 3d 20 34 20 7c 7c 20 28 54 59 50 45 E) == 4 || (TYPE
4830: 5f 53 49 5a 45 29 20 3d 3d 20 38 29 20 5c 0a 20 _SIZE) == 8) \.
4840: 20 20 3a 20 28 28 54 59 50 45 5f 53 49 5a 45 29 : ((TYPE_SIZE)
4850: 20 3c 3d 20 31 36 29 09 09 09 09 09 09 5c 0a 20 <= 16)......\.
4860: 20 29 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f )./* Turn on __
4870: 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 VA_REGISTER_STRU
4880: 43 54 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f 56 CT_RETURN if __V
4890: 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 A_SMALL_STRUCT_R
48a0: 45 54 55 52 4e 20 77 61 73 20 73 65 74 0a 20 2a ETURN was set. *
48b0: 20 61 6e 64 20 74 68 65 20 73 74 72 75 63 74 20 and the struct
48c0: 77 69 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 will actually be
48d0: 20 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 returned in reg
48e0: 69 73 74 65 72 73 2e 20 41 6c 73 6f 20 74 75 72 isters. Also tur
48f0: 6e 20 6f 6e 0a 20 2a 20 5f 5f 56 41 5f 52 45 47 n on. * __VA_REG
4900: 49 53 54 45 52 5f 46 4c 4f 41 54 53 54 52 55 43 ISTER_FLOATSTRUC
4910: 54 5f 52 45 54 55 52 4e 20 6f 72 20 5f 5f 56 41 T_RETURN or __VA
4920: 5f 52 45 47 49 53 54 45 52 5f 44 4f 55 42 4c 45 _REGISTER_DOUBLE
4930: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 66 STRUCT_RETURN if
4940: 0a 20 2a 20 74 68 65 20 73 74 72 75 63 74 20 77 . * the struct w
4950: 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 20 ill be returned
4960: 69 6e 20 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e in floating-poin
4970: 74 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a 2f t registers.. */
4980: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 .#define __va_st
4990: 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 art_struct1(LIST
49a0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
49b0: 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 ALIGN,TYPE_SPLIT
49c0: 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 TABLE) \. ((LI
49d0: 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f ST)->flags |= __
49e0: 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 VA_REGISTER_STRU
49f0: 43 54 5f 52 45 54 55 52 4e 2c 09 09 09 09 5c 0a CT_RETURN,....\.
4a00: 20 20 20 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 (TYPE_ALIGN)
4a10: 3d 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 == sizeof(float)
4a20: 20 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 54 && (TYPE_SPLITT
4a30: 41 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 26 ABLE)....\. &
4a40: 26 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d & ((TYPE_SIZE) =
4a50: 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 20 = sizeof(float)
4a60: 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d || (TYPE_SIZE) =
4a70: 3d 20 32 2a 73 69 7a 65 6f 66 28 66 6c 6f 61 74 = 2*sizeof(float
4a80: 29 29 09 09 5c 0a 20 20 20 20 26 26 20 28 28 4c ))..\. && ((L
4a90: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
4aa0: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 46 4c 4f _VA_REGISTER_FLO
4ab0: 41 54 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 ATSTRUCT_RETURN)
4ac0: 2c 09 09 09 5c 0a 20 20 20 28 54 59 50 45 5f 41 ,...\. (TYPE_A
4ad0: 4c 49 47 4e 29 20 3d 3d 20 73 69 7a 65 6f 66 28 LIGN) == sizeof(
4ae0: 64 6f 75 62 6c 65 29 20 26 26 20 28 54 59 50 45 double) && (TYPE
4af0: 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 09 09 09 _SPLITTABLE)....
4b00: 5c 0a 20 20 20 20 26 26 20 28 28 54 59 50 45 5f \. && ((TYPE_
4b10: 53 49 5a 45 29 20 3d 3d 20 73 69 7a 65 6f 66 28 SIZE) == sizeof(
4b20: 64 6f 75 62 6c 65 29 20 7c 7c 20 28 54 59 50 45 double) || (TYPE
4b30: 5f 53 49 5a 45 29 20 3d 3d 20 32 2a 73 69 7a 65 _SIZE) == 2*size
4b40: 6f 66 28 64 6f 75 62 6c 65 29 29 09 5c 0a 20 20 of(double)).\.
4b50: 20 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c && ((LIST)->fl
4b60: 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 ags |= __VA_REGI
4b70: 53 54 45 52 5f 44 4f 55 42 4c 45 53 54 52 55 43 STER_DOUBLESTRUC
4b80: 54 5f 52 45 54 55 52 4e 29 2c 09 09 09 5c 0a 20 T_RETURN),...\.
4b90: 20 20 30 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 0).#endif.#if
4ba0: 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 defined(__powerp
4bb0: 63 36 34 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f c64__).#define _
4bc0: 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 _va_reg_struct_r
4bd0: 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f eturn(LIST,TYPE_
4be0: 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 SIZE,TYPE_SPLITT
4bf0: 41 42 4c 45 29 20 20 5c 0a 20 20 30 0a 23 64 65 ABLE) \. 0.#de
4c00: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
4c10: 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 struct1(LIST,TYP
4c20: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
4c30: 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c N,TYPE_SPLITTABL
4c40: 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 69 66 E) \. 0.#endif
4c50: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 .#if defined(__s
4c60: 70 61 72 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 parc64__) || def
4c70: 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 23 ined(__ia64__).#
4c80: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f define __va_reg_
4c90: 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 struct_return(LI
4ca0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
4cb0: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c E_SPLITTABLE) \
4cc0: 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 . ((TYPE_SIZE)
4cd0: 3c 3d 20 33 32 29 0a 2f 2a 20 54 75 72 6e 20 6f <= 32)./* Turn o
4ce0: 6e 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f n __VA_REGISTER_
4cf0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 66 STRUCT_RETURN if
4d00: 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 __VA_SMALL_STRU
4d10: 43 54 5f 52 45 54 55 52 4e 20 77 61 73 20 73 65 CT_RETURN was se
4d20: 74 0a 20 2a 20 61 6e 64 20 74 68 65 20 73 74 72 t. * and the str
4d30: 75 63 74 20 77 69 6c 6c 20 61 63 74 75 61 6c 6c uct will actuall
4d40: 79 20 62 65 20 72 65 74 75 72 6e 65 64 20 69 6e y be returned in
4d50: 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a 2f 0a registers.. */.
4d60: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 #define __va_sta
4d70: 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 2c rt_struct1(LIST,
4d80: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
4d90: 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 LIGN,TYPE_SPLITT
4da0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 ABLE) \. ((LIS
4db0: 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 T)->flags |= __V
4dc0: 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 43 A_REGISTER_STRUC
4dd0: 54 5f 52 45 54 55 52 4e 2c 09 09 09 09 5c 0a 20 T_RETURN,....\.
4de0: 20 20 30 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 0).#endif.#if
4df0: 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 defined(__x86_64
4e00: 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 __).#define __va
4e10: 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 65 74 75 _reg_struct_retu
4e20: 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a rn(LIST,TYPE_SIZ
4e30: 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c E,TYPE_SPLITTABL
4e40: 45 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 E) \. ((TYPE_S
4e50: 49 5a 45 29 20 3c 3d 20 31 36 29 0a 2f 2a 20 54 IZE) <= 16)./* T
4e60: 75 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 urn on __VA_REGI
4e70: 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 STER_STRUCT_RETU
4e80: 52 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c RN if __VA_SMALL
4e90: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 _STRUCT_RETURN w
4ea0: 61 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 as set. * and th
4eb0: 65 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 e struct will ac
4ec0: 74 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e tually be return
4ed0: 65 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e ed in registers.
4ee0: 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
4ef0: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 a_start_struct1(
4f00: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
4f10: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
4f20: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
4f30: 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c ((LIST)->flags |
4f40: 3d 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f = __VA_REGISTER_
4f50: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 09 09 STRUCT_RETURN,..
4f60: 09 09 5c 0a 20 20 20 30 29 0a 23 65 6e 64 69 66 ..\. 0).#endif
4f70: 0a 2f 2a 0a 20 2a 20 50 72 65 70 61 72 69 6e 67 ./*. * Preparing
4f80: 20 73 74 72 75 63 74 75 72 65 20 72 65 74 75 72 structure retur
4f90: 6e 20 69 6e 20 6d 65 6d 6f 72 79 2e 0a 20 2a 2f n in memory.. */
4fa0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 .#if defined(__i
4fb0: 33 38 36 5f 5f 29 0a 2f 2a 20 52 65 74 75 72 6e 386__)./* Return
4fc0: 20 73 74 72 75 63 74 75 72 65 20 70 6f 69 6e 74 structure point
4fd0: 65 72 20 69 73 20 70 61 73 73 65 64 20 69 6e 20 er is passed in
4fe0: 61 20 73 70 65 63 69 61 6c 20 72 65 67 69 73 74 a special regist
4ff0: 65 72 20 6f 72 20 61 73 20 66 69 72 73 74 20 61 er or as first a
5000: 72 67 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f rg. */.#define _
5010: 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 _va_start_struct
5020: 32 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 2(LIST) \. ((L
5030: 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f IST)->flags & __
5040: 56 41 5f 4e 45 58 54 47 43 43 5f 53 54 52 55 43 VA_NEXTGCC_STRUC
5050: 54 5f 52 45 54 55 52 4e 09 09 09 09 5c 0a 20 20 T_RETURN....\.
5060: 20 3f 20 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 ? ((LIST)->radd
5070: 72 20 3d 20 28 4c 49 53 54 29 2d 3e 73 74 72 75 r = (LIST)->stru
5080: 63 74 72 61 64 64 72 2c 20 30 29 09 20 2f 2a 20 ctraddr, 0). /*
5090: 73 70 65 63 69 61 6c 20 72 65 67 69 73 74 65 72 special register
50a0: 20 2a 2f 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 */.\. : ((LIS
50b0: 54 29 2d 3e 72 61 64 64 72 20 3d 20 2a 28 76 6f T)->raddr = *(vo
50c0: 69 64 2a 20 2a 29 28 28 4c 49 53 54 29 2d 3e 61 id* *)((LIST)->a
50d0: 70 74 72 29 2c 09 09 2f 2a 20 66 69 72 73 74 20 ptr),../* first
50e0: 61 72 67 20 2a 2f 09 5c 0a 20 20 20 20 20 20 28 arg */.\. (
50f0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
5100: 69 7a 65 6f 66 28 76 6f 69 64 2a 29 2c 09 09 09 izeof(void*),...
5110: 09 09 5c 0a 20 20 20 20 20 20 30 09 09 09 09 09 ..\. 0.....
5120: 09 09 09 09 5c 0a 20 20 29 20 20 29 0a 23 65 6e ....\. ) ).#en
5130: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
5140: 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 __alpha__) || de
5150: 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c fined(__arm__) |
5160: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 | defined(__powe
5170: 72 70 63 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 rpc__) || define
5180: 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 d(__powerpc64__)
5190: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f || defined(__co
51a0: 6e 76 65 78 5f 5f 29 20 20 7c 7c 20 64 65 66 69 nvex__) || defi
51b0: 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a ned(__s390__)./*
51c0: 20 52 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 Return structur
51d0: 65 20 70 6f 69 6e 74 65 72 20 69 73 20 70 61 73 e pointer is pas
51e0: 73 65 64 20 61 73 20 66 69 72 73 74 20 61 72 67 sed as first arg
51f0: 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
5200: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 a_start_struct2(
5210: 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 LIST) \. ((LIS
5220: 54 29 2d 3e 72 61 64 64 72 20 3d 20 2a 28 76 6f T)->raddr = *(vo
5230: 69 64 2a 20 2a 29 28 28 4c 49 53 54 29 2d 3e 61 id* *)((LIST)->a
5240: 70 74 72 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c ptr),....\. (L
5250: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
5260: 7a 65 6f 66 28 76 6f 69 64 2a 29 2c 09 09 09 09 zeof(void*),....
5270: 09 5c 0a 20 20 20 30 09 09 09 09 09 09 09 09 09 .\. 0.........
5280: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
5290: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f defined(__mips_
52a0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
52b0: 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 mipsn32__) || de
52c0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
52d0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
52e0: 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 52 65 74 parc64__)./* Ret
52f0: 75 72 6e 20 73 74 72 75 63 74 75 72 65 20 70 6f urn structure po
5300: 69 6e 74 65 72 20 69 73 20 70 61 73 73 65 64 20 inter is passed
5310: 61 73 20 66 69 72 73 74 20 61 72 67 2e 20 2a 2f as first arg. */
5320: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 .#define __va_st
5330: 61 72 74 5f 73 74 72 75 63 74 32 28 4c 49 53 54 art_struct2(LIST
5340: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
5350: 72 61 64 64 72 20 3d 20 2a 28 76 6f 69 64 2a 20 raddr = *(void*
5360: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 *)((LIST)->aptr)
5370: 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 ,....\. (LIST)
5380: 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 ->aptr += sizeof
5390: 28 76 6f 69 64 2a 29 2c 09 09 09 09 09 5c 0a 20 (void*),.....\.
53a0: 20 20 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 2b 2b (LIST)->anum++
53b0: 2c 09 09 09 09 09 09 09 5c 0a 20 20 20 30 09 09 ,.......\. 0..
53c0: 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e .......\. ).#en
53d0: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
53e0: 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a 2f 2a 20 52 __x86_64__)./* R
53f0: 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 65 20 eturn structure
5400: 70 6f 69 6e 74 65 72 20 69 73 20 70 61 73 73 65 pointer is passe
5410: 64 20 61 73 20 66 69 72 73 74 20 61 72 67 2e 20 d as first arg.
5420: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
5430: 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 4c 49 start_struct2(LI
5440: 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 ST) \. ((LIST)
5450: 2d 3e 72 61 64 64 72 20 3d 20 28 76 6f 69 64 20 ->raddr = (void
5460: 2a 29 28 2a 28 4c 49 53 54 29 2d 3e 6d 65 6d 69 *)(*(LIST)->memi
5470: 61 72 67 70 74 72 2b 2b 29 2c 09 09 09 5c 0a 20 argptr++),...\.
5480: 20 20 30 09 09 09 09 09 09 09 09 09 5c 0a 20 20 0.........\.
5490: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
54a0: 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c ined(__m68k__) |
54b0: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 | (defined(__spa
54c0: 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 rc__) && !define
54d0: 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 20 d(__sparc64__))
54e0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 || defined(__hpp
54f0: 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 a__) || defined(
5500: 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 __m88k__) || def
5510: 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 2f ined(__ia64__)./
5520: 2a 20 52 65 74 75 72 6e 20 73 74 72 75 63 74 75 * Return structu
5530: 72 65 20 70 6f 69 6e 74 65 72 20 69 73 20 70 61 re pointer is pa
5540: 73 73 65 64 20 69 6e 20 61 20 73 70 65 63 69 61 ssed in a specia
5550: 6c 20 72 65 67 69 73 74 65 72 2e 20 2a 2f 0a 23 l register. */.#
5560: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 define __va_star
5570: 74 5f 73 74 72 75 63 74 32 28 4c 49 53 54 29 20 t_struct2(LIST)
5580: 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 72 61 \. ((LIST)->ra
5590: 64 64 72 20 3d 20 28 4c 49 53 54 29 2d 3e 73 74 ddr = (LIST)->st
55a0: 72 75 63 74 72 61 64 64 72 2c 20 30 29 0a 23 65 ructraddr, 0).#e
55b0: 6e 64 69 66 0a 0a 0a 2f 2a 0a 20 2a 20 44 65 66 ndif.../*. * Def
55c0: 69 6e 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 76 inition of the v
55d0: 61 5f 61 72 67 5f 78 78 78 20 6d 61 63 72 6f 73 a_arg_xxx macros
55e0: 2e 0a 20 2a 2f 0a 0a 2f 2a 20 50 61 64 64 69 6e .. */../* Paddin
55f0: 67 20 6f 66 20 6e 6f 6e 2d 73 74 72 75 63 74 20 g of non-struct
5600: 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 23 64 arguments. */.#d
5610: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 73 69 efine __va_argsi
5620: 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 20 20 5c ze(TYPE_SIZE) \
5630: 0a 20 20 28 28 28 54 59 50 45 5f 53 49 5a 45 29 . (((TYPE_SIZE)
5640: 20 2b 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f + sizeof(__vawo
5650: 72 64 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 rd)-1) & -(long)
5660: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
5670: 29 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f ).#if defined(__
5680: 69 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e i386__) || defin
5690: 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 ed(__m68k__) ||
56a0: 28 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f (defined(__mips_
56b0: 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f _) && !defined(_
56c0: 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 26 26 20 21 _mipsn32__) && !
56d0: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 defined(__mips64
56e0: 5f 5f 29 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 __)) || (defined
56f0: 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 (__sparc__) && !
5700: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
5710: 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 4__)) || defined
5720: 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 (__alpha__) || d
5730: 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 efined(__arm__)
5740: 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 70 6f || (defined(__po
5750: 77 65 72 70 63 5f 5f 29 20 26 26 20 21 64 65 66 werpc__) && !def
5760: 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 ined(__powerpc64
5770: 5f 5f 29 20 26 26 20 28 64 65 66 69 6e 65 64 28 __) && (defined(
5780: 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 _AIX) || (define
5790: 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 d(__MACH__) && d
57a0: 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f efined(__APPLE__
57b0: 29 29 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 )))) || defined(
57c0: 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 20 7c __powerpc64__) |
57d0: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 38 6b | defined(__m88k
57e0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
57f0: 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 64 65 _convex__) || de
5800: 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 fined(__ia64__)
5810: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 || defined(__x86
5820: 5f 36 34 5f 5f 29 0a 2f 2a 20 61 72 67 73 20 67 _64__)./* args g
5830: 72 6f 77 20 75 70 20 2a 2f 0a 2f 2a 20 73 6d 61 row up */./* sma
5840: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 3c 20 ll structures <
5850: 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 1 word are adjus
5860: 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e ted depending on
5870: 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 23 64 65 compiler */.#de
5880: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 fine __va_arg_le
5890: 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c ftadjusted(LIST,
58a0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
58b0: 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c 49 53 LIGN) \. ((LIS
58c0: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 61 T)->aptr += __va
58d0: 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 _argsize(TYPE_SI
58e0: 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 ZE),....\. (LI
58f0: 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f 76 61 ST)->aptr - __va
5900: 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 _argsize(TYPE_SI
5910: 5a 45 29 09 09 09 09 5c 0a 20 20 29 0a 23 64 65 ZE)....\. ).#de
5920: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 72 69 fine __va_arg_ri
5930: 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 ghtadjusted(LIST
5940: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
5950: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c 49 ALIGN) \. ((LI
5960: 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 ST)->aptr += __v
5970: 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 a_argsize(TYPE_S
5980: 49 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c IZE),....\. (L
5990: 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 28 54 IST)->aptr - ((T
59a0: 59 50 45 5f 53 49 5a 45 29 20 3c 20 73 69 7a 65 YPE_SIZE) < size
59b0: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 09 09 09 5c of(__vaword)...\
59c0: 0a 09 09 20 20 20 3f 20 28 54 59 50 45 5f 53 49 ... ? (TYPE_SI
59d0: 5a 45 29 09 09 09 09 09 5c 0a 09 09 20 20 20 3a ZE).....\... :
59e0: 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 __va_argsize(TY
59f0: 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a 09 09 PE_SIZE)....\...
5a00: 20 20 29 09 09 09 09 09 09 09 5c 0a 20 20 29 0a ).......\. ).
5a10: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
5a20: 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 ed(__powerpc__)
5a30: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f && !defined(__po
5a40: 77 65 72 70 63 36 34 5f 5f 29 20 26 26 20 21 28 werpc64__) && !(
5a50: 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c defined(_AIX) ||
5a60: 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 (defined(__MACH
5a70: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
5a80: 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a 20 61 _APPLE__)))./* a
5a90: 72 67 73 20 67 72 6f 77 20 75 70 20 2a 2f 0a 2f rgs grow up */./
5aa0: 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 * small structur
5ab0: 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 es < 1 word are
5ac0: 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 69 adjusted dependi
5ad0: 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a ng on compiler *
5ae0: 2f 0a 2f 2a 20 41 6c 73 6f 20 6d 61 6b 65 20 73 /./* Also make s
5af0: 75 72 65 20 77 65 20 73 77 69 74 63 68 20 74 6f ure we switch to
5b00: 20 74 68 65 20 73 74 61 63 6b 20 70 6f 69 6e 74 the stack point
5b10: 65 72 20 61 66 74 65 72 20 38 20 61 72 67 73 20 er after 8 args
5b20: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
5b30: 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 arg_leftadjusted
5b40: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
5b50: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
5b60: 20 28 28 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 ((((LIST)->onst
5b70: 61 63 6b 20 3d 3d 20 30 20 26 26 20 28 4c 49 53 ack == 0 && (LIS
5b80: 54 29 2d 3e 61 70 74 72 20 3e 3d 20 28 6c 6f 6e T)->aptr >= (lon
5b90: 67 29 26 28 4c 49 53 54 29 2d 3e 72 65 67 61 72 g)&(LIST)->regar
5ba0: 67 5b 38 5d 29 09 5c 0a 20 20 20 20 3f 20 28 28 g[8]).\. ? ((
5bb0: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 LIST)->onstack=1
5bc0: 2c 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d , (LIST)->aptr =
5bd0: 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 (LIST)->saptr)
5be0: 3a 20 30 29 2c 09 09 5c 0a 20 20 20 28 4c 49 53 : 0),..\. (LIS
5bf0: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 61 T)->aptr += __va
5c00: 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 _argsize(TYPE_SI
5c10: 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 ZE),....\. (LI
5c20: 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f 76 61 ST)->aptr - __va
5c30: 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 _argsize(TYPE_SI
5c40: 5a 45 29 09 09 09 09 5c 0a 20 20 29 0a 23 64 65 ZE)....\. ).#de
5c50: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 72 69 fine __va_arg_ri
5c60: 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 ghtadjusted(LIST
5c70: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
5c80: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 28 28 ALIGN) \. ((((
5c90: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d LIST)->onstack =
5ca0: 3d 20 30 20 26 26 20 28 4c 49 53 54 29 2d 3e 61 = 0 && (LIST)->a
5cb0: 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c ptr >= (long)&(L
5cc0: 49 53 54 29 2d 3e 72 65 67 61 72 67 5b 38 5d 29 IST)->regarg[8])
5cd0: 09 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 .\. ? ((LIST)
5ce0: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
5cf0: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 53 ST)->aptr = (LIS
5d00: 54 29 2d 3e 73 61 70 74 72 29 20 3a 20 30 29 2c T)->saptr) : 0),
5d10: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
5d20: 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 ptr += __va_args
5d30: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 ize(TYPE_SIZE),.
5d40: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
5d50: 61 70 74 72 20 2d 20 28 28 54 59 50 45 5f 53 49 aptr - ((TYPE_SI
5d60: 5a 45 29 20 3c 20 73 69 7a 65 6f 66 28 5f 5f 76 ZE) < sizeof(__v
5d70: 61 77 6f 72 64 29 09 09 09 5c 0a 09 09 20 20 20 aword)...\...
5d80: 3f 20 28 54 59 50 45 5f 53 49 5a 45 29 09 09 09 ? (TYPE_SIZE)...
5d90: 09 09 5c 0a 09 09 20 20 20 3a 20 5f 5f 76 61 5f ..\... : __va_
5da0: 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a argsize(TYPE_SIZ
5db0: 45 29 09 09 09 09 5c 0a 09 09 20 20 29 09 09 09 E)....\... )...
5dc0: 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 ....\. ).#endif
5dd0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 .#if defined(__s
5de0: 33 39 30 5f 5f 29 0a 2f 2a 20 61 72 67 73 20 67 390__)./* args g
5df0: 72 6f 77 20 75 70 20 2a 2f 0a 2f 2a 20 73 6d 61 row up */./* sma
5e00: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 3c 20 ll structures <
5e10: 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 1 word are adjus
5e20: 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e ted depending on
5e30: 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 2f 2a 20 compiler */./*
5e40: 41 6c 73 6f 20 6d 61 6b 65 20 73 75 72 65 20 77 Also make sure w
5e50: 65 20 73 77 69 74 63 68 20 74 6f 20 74 68 65 20 e switch to the
5e60: 73 74 61 63 6b 20 70 6f 69 6e 74 65 72 20 61 66 stack pointer af
5e70: 74 65 72 20 35 20 61 72 67 73 20 2a 2f 0a 23 64 ter 5 args */.#d
5e80: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c efine __va_arg_l
5e90: 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 eftadjusted(LIST
5ea0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
5eb0: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 28 28 ALIGN) \. ((((
5ec0: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d LIST)->onstack =
5ed0: 3d 20 30 20 26 26 20 28 4c 49 53 54 29 2d 3e 61 = 0 && (LIST)->a
5ee0: 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c ptr >= (long)&(L
5ef0: 49 53 54 29 2d 3e 72 65 67 61 72 67 5b 35 5d 29 IST)->regarg[5])
5f00: 09 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 .\. ? ((LIST)
5f10: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
5f20: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 53 ST)->aptr = (LIS
5f30: 54 29 2d 3e 73 61 70 74 72 29 20 3a 20 30 29 2c T)->saptr) : 0),
5f40: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
5f50: 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 ptr += __va_args
5f60: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 ize(TYPE_SIZE),.
5f70: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
5f80: 61 70 74 72 20 2d 20 5f 5f 76 61 5f 61 72 67 73 aptr - __va_args
5f90: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 09 09 ize(TYPE_SIZE)..
5fa0: 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 20 ..\. ).#define
5fb0: 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 61 64 __va_arg_rightad
5fc0: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
5fd0: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
5fe0: 29 20 20 5c 0a 20 20 28 28 28 28 28 4c 49 53 54 ) \. (((((LIST
5ff0: 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 20 )->onstack == 0
6000: 26 26 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 && ((LIST)->aptr
6010: 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c 49 53 54 >= (long)&(LIST
6020: 29 2d 3e 72 65 67 61 72 67 5b 35 5d 29 29 20 5c )->regarg[5])) \
6030: 0a 20 20 20 7c 7c 20 28 28 54 59 50 45 5f 53 49 . || ((TYPE_SI
6040: 5a 45 29 20 3e 20 73 69 7a 65 6f 66 28 5f 5f 76 ZE) > sizeof(__v
6050: 61 77 6f 72 64 29 20 26 26 20 28 4c 49 53 54 29 aword) && (LIST)
6060: 2d 3e 61 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 ->aptr >= (long)
6070: 26 28 4c 49 53 54 29 2d 3e 72 65 67 61 72 67 5b &(LIST)->regarg[
6080: 34 5d 29 29 20 5c 0a 20 20 20 20 3f 20 28 28 4c 4])) \. ? ((L
6090: 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c IST)->onstack=1,
60a0: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 (LIST)->aptr =
60b0: 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 3a (LIST)->saptr) :
60c0: 20 30 29 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 0),..\. (LIST
60d0: 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 61 5f )->aptr += __va_
60e0: 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a argsize(TYPE_SIZ
60f0: 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 E),....\. (LIS
6100: 54 29 2d 3e 61 70 74 72 20 2d 20 28 28 54 59 50 T)->aptr - ((TYP
6110: 45 5f 53 49 5a 45 29 20 3c 20 73 69 7a 65 6f 66 E_SIZE) < sizeof
6120: 28 5f 5f 76 61 77 6f 72 64 29 09 09 09 5c 0a 09 (__vaword)...\..
6130: 09 20 20 20 3f 20 28 54 59 50 45 5f 53 49 5a 45 . ? (TYPE_SIZE
6140: 29 09 09 09 09 09 5c 0a 09 09 20 20 20 3a 20 5f ).....\... : _
6150: 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 _va_argsize(TYPE
6160: 5f 53 49 5a 45 29 09 09 09 09 5c 0a 09 09 20 20 _SIZE)....\...
6170: 29 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 ).......\. ).#e
6180: 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 ndif.#if defined
6190: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
61a0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
61b0: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
61c0: 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 __sparc64__)./*
61d0: 61 72 67 73 20 67 72 6f 77 20 75 70 20 2a 2f 0a args grow up */.
61e0: 2f 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 /* small structu
61f0: 72 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 res < 1 word are
6200: 20 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 adjusted depend
6210: 69 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 ing on compiler
6220: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
6230: 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 arg_leftadjusted
6240: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
6250: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
6260: 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2b ((LIST)->anum +
6270: 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 = __va_argsize(T
6280: 59 50 45 5f 53 49 5a 45 29 2f 73 69 7a 65 6f 66 YPE_SIZE)/sizeof
6290: 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 5c 0a 20 (__vaword),..\.
62a0: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
62b0: 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 = __va_argsize(T
62c0: 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 5c 0a YPE_SIZE),....\.
62d0: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
62e0: 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 - __va_argsize(T
62f0: 59 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a 20 YPE_SIZE)....\.
6300: 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f ).#define __va_
6310: 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 arg_rightadjuste
6320: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
6330: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
6340: 20 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 ((LIST)->anum
6350: 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 += __va_argsize(
6360: 54 59 50 45 5f 53 49 5a 45 29 2f 73 69 7a 65 6f TYPE_SIZE)/sizeo
6370: 66 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 5c 0a f(__vaword),..\.
6380: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
6390: 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 += __va_argsize(
63a0: 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 5c TYPE_SIZE),....\
63b0: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
63c0: 20 2d 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 - ((TYPE_SIZE)
63d0: 3c 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 < sizeof(__vawor
63e0: 64 29 09 09 09 5c 0a 09 09 20 20 20 3f 20 28 54 d)...\... ? (T
63f0: 59 50 45 5f 53 49 5a 45 29 09 09 09 09 09 5c 0a YPE_SIZE).....\.
6400: 09 09 20 20 20 3a 20 5f 5f 76 61 5f 61 72 67 73 .. : __va_args
6410: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 09 09 ize(TYPE_SIZE)..
6420: 09 09 5c 0a 09 09 20 20 29 09 09 09 09 09 09 09 ..\... ).......
6430: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
6440: 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f defined(__hppa_
6450: 5f 29 0a 2f 2a 20 61 72 67 73 20 67 72 6f 77 20 _)./* args grow
6460: 64 6f 77 6e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 down */.#define
6470: 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a __va_arg_leftadj
6480: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
6490: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
64a0: 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 \. ((LIST)->a
64b0: 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e 61 70 ptr = (LIST)->ap
64c0: 74 72 20 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a tr - __va_argsiz
64d0: 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 5c e(TYPE_SIZE),..\
64e0: 0a 20 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 . ((TYPE_SIZE)
64f0: 20 3e 20 34 20 26 26 20 28 28 4c 49 53 54 29 2d > 4 && ((LIST)-
6500: 3e 61 70 74 72 20 26 3d 20 2d 38 29 29 2c 09 09 >aptr &= -8)),..
6510: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
6520: 70 74 72 09 09 09 09 09 09 09 09 5c 0a 20 20 29 ptr........\. )
6530: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
6540: 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 g_rightadjusted(
6550: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
6560: 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 YPE_ALIGN) \.
6570: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 ((LIST)->aptr =
6580: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f (LIST)->aptr - _
6590: 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 _va_argsize(TYPE
65a0: 5f 53 49 5a 45 29 2c 09 09 5c 0a 20 20 20 28 28 _SIZE),..\. ((
65b0: 54 59 50 45 5f 53 49 5a 45 29 20 3e 20 34 20 26 TYPE_SIZE) > 4 &
65c0: 26 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 & ((LIST)->aptr
65d0: 26 3d 20 2d 38 29 29 2c 09 09 09 09 5c 0a 20 20 &= -8)),....\.
65e0: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 20 (LIST)->aptr +
65f0: 28 28 2d 28 54 59 50 45 5f 53 49 5a 45 29 29 20 ((-(TYPE_SIZE))
6600: 26 20 33 29 09 09 09 09 09 5c 0a 20 20 29 0a 23 & 3).....\. ).#
6610: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
6620: 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 d(__i386__) || d
6630: 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 5f 5f efined(__alpha__
6640: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 69 ) || defined(__i
6650: 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 a64__) || define
6660: 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 20 7c 7c 20 d(__ARMEL__) ||
6670: 28 28 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 ((defined(__mips
6680: 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 n32__) || define
6690: 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 29 20 26 d(__mips64__)) &
66a0: 26 20 64 65 66 69 6e 65 64 28 5f 4d 49 50 53 45 & defined(_MIPSE
66b0: 4c 29 29 0a 2f 2a 20 6c 69 74 74 6c 65 20 65 6e L))./* little en
66c0: 64 69 61 6e 20 2d 3e 20 73 6d 61 6c 6c 20 61 72 dian -> small ar
66d0: 67 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 gs < 1 word are
66e0: 61 64 6a 75 73 74 65 64 20 74 6f 20 74 68 65 20 adjusted to the
66f0: 6c 65 66 74 20 2a 2f 0a 23 64 65 66 69 6e 65 20 left */.#define
6700: 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 65 __va_arg_adjuste
6710: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
6720: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
6730: 20 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 __va_arg_lefta
6740: 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 djusted(LIST,TYP
6750: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
6760: 4e 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 N).#endif.#if de
6770: 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 fined(__m68k__)
6780: 7c 7c 20 28 28 64 65 66 69 6e 65 64 28 5f 5f 6d || ((defined(__m
6790: 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 ipsn32__) || def
67a0: 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 ined(__mips64__)
67b0: 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f 4d 49 ) && defined(_MI
67c0: 50 53 45 42 29 29 20 7c 7c 20 64 65 66 69 6e 65 PSEB)) || define
67d0: 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 7c 7c 20 d(__sparc__) ||
67e0: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
67f0: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
6800: 5f 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 28 64 65 __hppa__) || (de
6810: 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 26 fined(__arm__) &
6820: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 41 52 4d & !defined(__ARM
6830: 45 4c 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 EL__)) || define
6840: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 7c d(__powerpc__) |
6850: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 | defined(__powe
6860: 72 70 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 rpc64__) || defi
6870: 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c ned(__m88k__) ||
6880: 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 defined(__conve
6890: 78 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 x__) || defined(
68a0: 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 62 69 67 __s390__)./* big
68b0: 20 65 6e 64 69 61 6e 20 2d 3e 20 73 6d 61 6c 6c endian -> small
68c0: 20 61 72 67 73 20 3c 20 31 20 77 6f 72 64 20 61 args < 1 word a
68d0: 72 65 20 61 64 6a 75 73 74 65 64 20 74 6f 20 74 re adjusted to t
68e0: 68 65 20 72 69 67 68 74 20 2a 2f 0a 23 64 65 66 he right */.#def
68f0: 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a ine __va_arg_adj
6900: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
6910: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
6920: 20 20 5c 0a 20 20 5f 5f 76 61 5f 61 72 67 5f 72 \. __va_arg_r
6930: 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 ightadjusted(LIS
6940: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
6950: 5f 41 4c 49 47 4e 29 0a 23 65 6e 64 69 66 0a 23 _ALIGN).#endif.#
6960: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
6970: 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 s__) && !defined
6980: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 26 26 (__mipsn32__) &&
6990: 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 !defined(__mips
69a0: 36 34 5f 5f 29 0a 23 69 66 64 65 66 20 5f 4d 49 64__).#ifdef _MI
69b0: 50 53 45 42 0a 2f 2a 20 62 69 67 20 65 6e 64 69 PSEB./* big endi
69c0: 61 6e 20 2d 3e 20 73 6d 61 6c 6c 20 61 72 67 73 an -> small args
69d0: 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 61 64 < 1 word are ad
69e0: 6a 75 73 74 65 64 20 74 6f 20 74 68 65 20 72 69 justed to the ri
69f0: 67 68 74 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f ght */.#define _
6a00: 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 65 64 _va_arg_adjusted
6a10: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
6a20: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
6a30: 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 2b 2b ((LIST)->anum++
6a40: 2c 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 , __va_arg_right
6a50: 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 adjusted(LIST,TY
6a60: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 PE_SIZE,TYPE_ALI
6a70: 47 4e 29 29 0a 23 65 6c 73 65 20 2f 2a 20 5f 4d GN)).#else /* _M
6a80: 49 50 53 45 4c 20 2a 2f 0a 2f 2a 20 6c 69 74 74 IPSEL */./* litt
6a90: 6c 65 20 65 6e 64 69 61 6e 20 2d 3e 20 73 6d 61 le endian -> sma
6aa0: 6c 6c 20 61 72 67 73 20 3c 20 31 20 77 6f 72 64 ll args < 1 word
6ab0: 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 74 6f are adjusted to
6ac0: 20 74 68 65 20 6c 65 66 74 20 2a 2f 0a 23 64 65 the left */.#de
6ad0: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 61 64 fine __va_arg_ad
6ae0: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
6af0: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
6b00: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
6b10: 61 6e 75 6d 2b 2b 2c 20 5f 5f 76 61 5f 61 72 67 anum++, __va_arg
6b20: 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 _leftadjusted(LI
6b30: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
6b40: 45 5f 41 4c 49 47 4e 29 29 0a 23 65 6e 64 69 66 E_ALIGN)).#endif
6b50: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
6b60: 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a ned(__x86_64__).
6b70: 2f 2a 20 74 68 65 20 66 69 72 73 74 20 36 20 61 /* the first 6 a
6b80: 72 67 75 6d 65 6e 74 20 77 6f 72 64 73 20 61 72 rgument words ar
6b90: 65 20 70 61 73 73 65 64 20 69 6e 20 72 65 67 69 e passed in regi
6ba0: 73 74 65 72 73 20 2a 2f 0a 23 64 65 66 69 6e 65 sters */.#define
6bb0: 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 __va_arg_adjust
6bc0: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
6bd0: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
6be0: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 69 . ((LIST)->memi
6bf0: 61 72 67 70 74 72 20 2b 20 28 28 54 59 50 45 5f argptr + ((TYPE_
6c00: 53 49 5a 45 29 20 2b 20 73 69 7a 65 6f 66 28 5f SIZE) + sizeof(_
6c10: 5f 76 61 77 6f 72 64 29 2d 31 29 20 2f 20 73 69 _vaword)-1) / si
6c20: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3c zeof(__vaword) <
6c30: 3d 20 26 28 4c 49 53 54 29 2d 3e 69 61 72 67 5b = &(LIST)->iarg[
6c40: 36 5d 20 5c 0a 20 20 20 3f 20 28 28 4c 49 53 54 6] \. ? ((LIST
6c50: 29 2d 3e 6d 65 6d 69 61 72 67 70 74 72 20 2b 3d )->memiargptr +=
6c60: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 2b 20 ((TYPE_SIZE) +
6c70: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
6c80: 2d 31 29 20 2f 20 73 69 7a 65 6f 66 28 5f 5f 76 -1) / sizeof(__v
6c90: 61 77 6f 72 64 29 2c 20 5c 0a 20 20 20 20 20 20 aword), \.
6ca0: 28 4c 49 53 54 29 2d 3e 6d 65 6d 69 61 72 67 70 (LIST)->memiargp
6cb0: 74 72 20 2d 20 28 28 54 59 50 45 5f 53 49 5a 45 tr - ((TYPE_SIZE
6cc0: 29 20 2b 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 ) + sizeof(__vaw
6cd0: 6f 72 64 29 2d 31 29 20 2f 20 73 69 7a 65 6f 66 ord)-1) / sizeof
6ce0: 28 5f 5f 76 61 77 6f 72 64 29 20 5c 0a 20 20 20 (__vaword) \.
6cf0: 20 20 29 09 09 09 09 09 09 09 09 09 5c 0a 20 20 ).........\.
6d00: 20 3a 20 28 76 6f 69 64 2a 29 5f 5f 76 61 5f 61 : (void*)__va_a
6d10: 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 rg_leftadjusted(
6d20: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
6d30: 59 50 45 5f 41 4c 49 47 4e 29 09 09 5c 0a 20 20 YPE_ALIGN)..\.
6d40: 29 0a 23 65 6e 64 69 66 0a 23 64 65 66 69 6e 65 ).#endif.#define
6d50: 20 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 54 __va_arg(LIST,T
6d60: 59 50 45 29 20 20 5c 0a 20 20 2a 28 54 59 50 45 YPE) \. *(TYPE
6d70: 2a 29 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 *)__va_arg_adjus
6d80: 74 65 64 28 4c 49 53 54 2c 73 69 7a 65 6f 66 28 ted(LIST,sizeof(
6d90: 54 59 50 45 29 2c 5f 5f 56 41 5f 61 6c 69 67 6e TYPE),__VA_align
6da0: 6f 66 28 54 59 50 45 29 29 0a 0a 2f 2a 20 49 6e of(TYPE))../* In
6db0: 74 65 67 65 72 20 61 72 67 75 6d 65 6e 74 73 2e teger arguments.
6dc0: 20 2a 2f 0a 0a 23 64 65 66 69 6e 65 20 76 61 5f */..#define va_
6dd0: 61 72 67 5f 63 68 61 72 28 4c 49 53 54 29 09 5f arg_char(LIST)._
6de0: 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 63 68 61 _va_arg(LIST,cha
6df0: 72 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 r).#define va_ar
6e00: 67 5f 73 63 68 61 72 28 4c 49 53 54 29 09 5f 5f g_schar(LIST).__
6e10: 76 61 5f 61 72 67 28 4c 49 53 54 2c 73 69 67 6e va_arg(LIST,sign
6e20: 65 64 20 63 68 61 72 29 0a 23 64 65 66 69 6e 65 ed char).#define
6e30: 20 76 61 5f 61 72 67 5f 75 63 68 61 72 28 4c 49 va_arg_uchar(LI
6e40: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
6e50: 54 2c 75 6e 73 69 67 6e 65 64 20 63 68 61 72 29 T,unsigned char)
6e60: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
6e70: 73 68 6f 72 74 28 4c 49 53 54 29 09 5f 5f 76 61 short(LIST).__va
6e80: 5f 61 72 67 28 4c 49 53 54 2c 73 68 6f 72 74 29 _arg(LIST,short)
6e90: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
6ea0: 75 73 68 6f 72 74 28 4c 49 53 54 29 09 5f 5f 76 ushort(LIST).__v
6eb0: 61 5f 61 72 67 28 4c 49 53 54 2c 75 6e 73 69 67 a_arg(LIST,unsig
6ec0: 6e 65 64 20 73 68 6f 72 74 29 0a 23 64 65 66 69 ned short).#defi
6ed0: 6e 65 20 76 61 5f 61 72 67 5f 69 6e 74 28 4c 49 ne va_arg_int(LI
6ee0: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
6ef0: 54 2c 69 6e 74 29 0a 23 64 65 66 69 6e 65 20 76 T,int).#define v
6f00: 61 5f 61 72 67 5f 75 69 6e 74 28 4c 49 53 54 29 a_arg_uint(LIST)
6f10: 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 75 .__va_arg(LIST,u
6f20: 6e 73 69 67 6e 65 64 20 69 6e 74 29 0a 23 64 65 nsigned int).#de
6f30: 66 69 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 fine va_arg_long
6f40: 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 (LIST).__va_arg(
6f50: 4c 49 53 54 2c 6c 6f 6e 67 29 0a 23 64 65 66 69 LIST,long).#defi
6f60: 6e 65 20 76 61 5f 61 72 67 5f 75 6c 6f 6e 67 28 ne va_arg_ulong(
6f70: 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c LIST).__va_arg(L
6f80: 49 53 54 2c 75 6e 73 69 67 6e 65 64 20 6c 6f 6e IST,unsigned lon
6f90: 67 29 0a 0a 23 69 66 20 64 65 66 69 6e 65 64 28 g)..#if defined(
6fa0: 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 __mips64__) || d
6fb0: 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 efined(__sparc64
6fc0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
6fd0: 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 _alpha__) || def
6fe0: 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 ined(__powerpc64
6ff0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7000: 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 _ia64__) || defi
7010: 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a ned(__x86_64__).
7020: 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 20 61 /* `long long' a
7030: 6e 64 20 60 6c 6f 6e 67 27 20 61 72 65 20 69 64 nd `long' are id
7040: 65 6e 74 69 63 61 6c 2e 20 2a 2f 0a 23 64 65 66 entical. */.#def
7050: 69 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c ine va_arg_longl
7060: 6f 6e 67 09 09 76 61 5f 61 72 67 5f 6c 6f 6e 67 ong..va_arg_long
7070: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
7080: 75 6c 6f 6e 67 6c 6f 6e 67 09 76 61 5f 61 72 67 ulonglong.va_arg
7090: 5f 75 6c 6f 6e 67 0a 23 65 6c 69 66 20 64 65 66 _ulong.#elif def
70a0: 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f ined(__mipsn32__
70b0: 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 )./* `long long'
70c0: 20 66 69 74 73 20 69 6e 20 5f 5f 76 61 77 6f 72 fits in __vawor
70d0: 64 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 d. */.#define va
70e0: 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 _arg_longlong(LI
70f0: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
7100: 54 2c 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 64 65 T,long long).#de
7110: 66 69 6e 65 20 76 61 5f 61 72 67 5f 75 6c 6f 6e fine va_arg_ulon
7120: 67 6c 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 glong(LIST).__va
7130: 5f 61 72 67 28 4c 49 53 54 2c 75 6e 73 69 67 6e _arg(LIST,unsign
7140: 65 64 20 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 65 ed long long).#e
7150: 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 lif defined(__i3
7160: 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 86__) || defined
7170: 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 (__m68k__) || de
7180: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 fined(__mips__)
7190: 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 || (defined(__sp
71a0: 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e arc__) && !defin
71b0: 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 ed(__sparc64__))
71c0: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 || defined(__hp
71d0: 70 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 pa__) || defined
71e0: 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 64 65 66 (__arm__) || def
71f0: 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f ined(__powerpc__
7200: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d ) || defined(__m
7210: 38 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 88k__) || define
7220: 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c d(__convex__) ||
7230: 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f defined(__s390_
7240: 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 _)./* `long long
7250: 27 73 20 61 72 65 20 70 61 73 73 65 64 20 65 6d 's are passed em
7260: 62 65 64 64 65 64 20 6f 6e 20 74 68 65 20 61 72 bedded on the ar
7270: 67 20 73 74 61 63 6b 2e 20 2a 2f 0a 23 64 65 66 g stack. */.#def
7280: 69 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c ine va_arg_longl
7290: 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 ong(LIST).__va_a
72a0: 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 rg_longlong(LIST
72b0: 2c 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 64 65 66 ,long long).#def
72c0: 69 6e 65 20 76 61 5f 61 72 67 5f 75 6c 6f 6e 67 ine va_arg_ulong
72d0: 6c 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 5f long(LIST).__va_
72e0: 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 arg_longlong(LIS
72f0: 54 2c 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 T,unsigned long
7300: 6c 6f 6e 67 29 0a 23 69 66 20 64 65 66 69 6e 65 long).#if define
7310: 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 d(__i386__) || d
7320: 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 efined(__m68k__)
7330: 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 61 || (defined(__a
7340: 72 6d 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 rm__) && !define
7350: 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 29 20 7c 7c d(__ARMEL__)) ||
7360: 20 28 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 (defined(__powe
7370: 72 70 63 5f 5f 29 20 26 26 20 28 64 65 66 69 6e rpc__) && (defin
7380: 65 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 ed(_AIX) || (def
7390: 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 ined(__MACH__) &
73a0: 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c & defined(__APPL
73b0: 45 5f 5f 29 29 29 29 20 7c 7c 20 64 65 66 69 6e E__)))) || defin
73c0: 65 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 0a 2f ed(__convex__)./
73d0: 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 73 20 61 * `long long's a
73e0: 72 65 20 28 61 74 20 6d 6f 73 74 29 20 77 6f 72 re (at most) wor
73f0: 64 2d 61 6c 69 67 6e 65 64 2e 20 2a 2f 0a 23 64 d-aligned. */.#d
7400: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c efine __va_arg_l
7410: 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c 54 59 50 onglong(LIST,TYP
7420: 45 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 E).__va_arg(LIST
7430: 2c 54 59 50 45 29 0a 23 65 6e 64 69 66 0a 23 69 ,TYPE).#endif.#i
7440: 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 f defined(__mips
7450: 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 __) || (defined(
7460: 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 26 20 __powerpc__) &&
7470: 21 28 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 !(defined(_AIX)
7480: 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 || (defined(__MA
7490: 43 48 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 CH__) && defined
74a0: 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 29 20 7c (__APPLE__)))) |
74b0: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 38 6b | defined(__m88k
74c0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
74d0: 5f 41 52 4d 45 4c 5f 5f 29 0a 2f 2a 20 60 6c 6f _ARMEL__)./* `lo
74e0: 6e 67 20 6c 6f 6e 67 27 73 20 68 61 76 65 20 61 ng long's have a
74f0: 6c 69 67 6e 6d 65 6e 74 20 38 2e 20 2a 2f 0a 23 lignment 8. */.#
7500: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
7510: 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c 54 59 longlong(LIST,TY
7520: 50 45 29 09 09 09 09 09 5c 0a 20 20 28 28 4c 49 PE).....\. ((LI
7530: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 28 4c ST)->aptr = (((L
7540: 49 53 54 29 2d 3e 61 70 74 72 2b 5f 5f 56 41 5f IST)->aptr+__VA_
7550: 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 2d 31 29 alignof(TYPE)-1)
7560: 20 26 20 2d 28 6c 6f 6e 67 29 5f 5f 56 41 5f 61 & -(long)__VA_a
7570: 6c 69 67 6e 6f 66 28 54 59 50 45 29 29 2c 20 5c lignof(TYPE)), \
7580: 0a 20 20 20 5f 5f 76 61 5f 61 72 67 28 4c 49 53 . __va_arg(LIS
7590: 54 2c 54 59 50 45 29 29 0a 23 65 6e 64 69 66 0a T,TYPE)).#endif.
75a0: 23 69 66 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 #if (defined(__s
75b0: 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 parc__) && !defi
75c0: 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 ned(__sparc64__)
75d0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
75e0: 33 39 30 5f 5f 29 0a 2f 2a 20 57 69 74 68 69 6e 390__)./* Within
75f0: 20 74 68 65 20 61 72 67 20 73 74 61 63 6b 2c 20 the arg stack,
7600: 74 68 65 20 61 6c 69 67 6e 6d 65 6e 74 20 69 73 the alignment is
7610: 20 6f 6e 6c 79 20 34 2c 20 6e 6f 74 20 38 2e 20 only 4, not 8.
7620: 2a 2f 0a 2f 2a 20 42 65 77 61 72 65 20 61 67 61 */./* Beware aga
7630: 69 6e 73 74 20 75 6e 61 6c 69 67 6e 65 64 20 61 inst unaligned a
7640: 63 63 65 73 73 65 73 21 20 2a 2f 0a 23 64 65 66 ccesses! */.#def
7650: 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 6f 6e ine __va_arg_lon
7660: 67 6c 6f 6e 67 28 4c 49 53 54 2c 54 59 50 45 29 glong(LIST,TYPE)
7670: 09 09 09 09 09 5c 0a 20 20 28 28 4c 49 53 54 29 .....\. ((LIST)
7680: 2d 3e 74 6d 70 2e 5f 77 6f 72 64 73 5b 30 5d 20 ->tmp._words[0]
7690: 3d 20 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 28 = ((__vaword*)((
76a0: 4c 49 53 54 29 2d 3e 61 70 74 72 29 29 5b 30 5d LIST)->aptr))[0]
76b0: 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ,..\. (LIST)->
76c0: 74 6d 70 2e 5f 77 6f 72 64 73 5b 31 5d 20 3d 20 tmp._words[1] =
76d0: 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 28 4c 49 ((__vaword*)((LI
76e0: 53 54 29 2d 3e 61 70 74 72 29 29 5b 31 5d 2c 09 ST)->aptr))[1],.
76f0: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 .\. (LIST)->ap
7700: 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 54 59 50 tr += sizeof(TYP
7710: 45 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 54 59 E),.....\. (TY
7720: 50 45 29 28 28 4c 49 53 54 29 2d 3e 74 6d 70 2e PE)((LIST)->tmp.
7730: 5f 6c 6f 6e 67 6c 6f 6e 67 29 09 09 09 09 09 5c _longlong).....\
7740: 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 . ).#endif.#if
7750: 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f defined(__hppa__
7760: 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 )./* `long long'
7770: 73 20 68 61 76 65 20 61 6c 69 67 6e 6d 65 6e 74 s have alignment
7780: 20 38 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 8. */.#define _
7790: 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 _va_arg_longlong
77a0: 28 4c 49 53 54 2c 54 59 50 45 29 09 09 09 09 09 (LIST,TYPE).....
77b0: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 \. ((LIST)->apt
77c0: 72 20 3d 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 r = ((LIST)->apt
77d0: 72 20 26 20 2d 28 6c 6f 6e 67 29 5f 5f 56 41 5f r & -(long)__VA_
77e0: 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 29 2c 09 alignof(TYPE)),.
77f0: 09 5c 0a 20 20 20 5f 5f 76 61 5f 61 72 67 28 4c .\. __va_arg(L
7800: 49 53 54 2c 54 59 50 45 29 29 0a 23 65 6e 64 69 IST,TYPE)).#endi
7810: 66 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 46 6c 6f f.#endif../* Flo
7820: 61 74 69 6e 67 20 70 6f 69 6e 74 20 61 72 67 75 ating point argu
7830: 6d 65 6e 74 73 2e 20 2a 2f 0a 0a 23 69 66 20 64 ments. */..#if d
7840: 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 efined(__i386__)
7850: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 || defined(__m6
7860: 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 8k__) || defined
7870: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
7880: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
7890: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
78a0: 5f 5f 73 70 61 72 63 5f 5f 29 20 7c 7c 20 64 65 __sparc__) || de
78b0: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
78c0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
78d0: 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 28 64 65 66 alpha__) || (def
78e0: 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 26 26 ined(__arm__) &&
78f0: 20 21 64 65 66 69 6e 65 64 28 5f 5f 41 52 4d 45 !defined(__ARME
7900: 4c 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 L__)) || defined
7910: 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 7c 7c (__powerpc__) ||
7920: 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 defined(__power
7930: 70 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e pc64__) || defin
7940: 65 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c ed(__convex__) |
7950: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 | defined(__ia64
7960: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7970: 5f 78 38 36 5f 36 34 5f 5f 29 20 7c 7c 20 64 65 _x86_64__) || de
7980: 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a fined(__s390__).
7990: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 6c 69 #define __va_ali
79a0: 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 0a gn_double(LIST).
79b0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
79c0: 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 20 ed(__mips__) &&
79d0: 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e !defined(__mipsn
79e0: 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 32__) && !define
79f0: 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c d(__mips64__) ||
7a00: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 38 6b 5f defined(__m88k_
7a10: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
7a20: 41 52 4d 45 4c 5f 5f 29 0a 2f 2a 20 5f 5f 56 41 ARMEL__)./* __VA
7a30: 5f 61 6c 69 67 6e 6f 66 28 64 6f 75 62 6c 65 29 _alignof(double)
7a40: 20 3e 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f > sizeof(__vawo
7a50: 72 64 29 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f rd) */.#define _
7a60: 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 _va_align_double
7a70: 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 4c 49 53 (LIST) \. (LIS
7a80: 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 T)->aptr = ((LIS
7a90: 54 29 2d 3e 61 70 74 72 20 2b 20 73 69 7a 65 6f T)->aptr + sizeo
7aa0: 66 28 64 6f 75 62 6c 65 29 2d 31 29 20 26 20 2d f(double)-1) & -
7ab0: 28 6c 6f 6e 67 29 73 69 7a 65 6f 66 28 64 6f 75 (long)sizeof(dou
7ac0: 62 6c 65 29 2c 0a 23 65 6e 64 69 66 0a 23 69 66 ble),.#endif.#if
7ad0: 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f defined(__hppa_
7ae0: 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f _).#define __va_
7af0: 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 align_double(LIS
7b00: 54 29 20 20 5c 0a 20 20 28 4c 49 53 54 29 2d 3e T) \. (LIST)->
7b10: 61 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e 61 aptr = (LIST)->a
7b20: 70 74 72 20 26 20 2d 28 6c 6f 6e 67 29 73 69 7a ptr & -(long)siz
7b30: 65 6f 66 28 64 6f 75 62 6c 65 29 2c 0a 23 65 6e eof(double),.#en
7b40: 64 69 66 0a 0a 23 69 66 20 64 65 66 69 6e 65 64 dif..#if defined
7b50: 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 (__sparc__) && !
7b60: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
7b70: 34 5f 5f 29 0a 2f 2a 20 42 65 77 61 72 65 20 61 4__)./* Beware a
7b80: 67 61 69 6e 73 74 20 75 6e 61 6c 69 67 6e 65 64 gainst unaligned
7b90: 20 60 64 6f 75 62 6c 65 27 20 61 63 63 65 73 73 `double' access
7ba0: 65 73 21 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 es! */.#define v
7bb0: 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 a_arg_double(LIS
7bc0: 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c T) \. (__va_al
7bd0: 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 ign_double(LIST)
7be0: 09 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 ......\. (LIST
7bf0: 29 2d 3e 74 6d 70 2e 5f 77 6f 72 64 73 5b 30 5d )->tmp._words[0]
7c00: 20 3d 20 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 = ((__vaword*)(
7c10: 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 29 5b 30 (LIST)->aptr))[0
7c20: 5d 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d ],..\. (LIST)-
7c30: 3e 74 6d 70 2e 5f 77 6f 72 64 73 5b 31 5d 20 3d >tmp._words[1] =
7c40: 20 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 28 4c ((__vaword*)((L
7c50: 49 53 54 29 2d 3e 61 70 74 72 29 29 5b 31 5d 2c IST)->aptr))[1],
7c60: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
7c70: 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f ptr += sizeof(do
7c80: 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 uble),.....\.
7c90: 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 64 6f 75 (LIST)->tmp._dou
7ca0: 62 6c 65 09 09 09 09 09 09 09 5c 0a 20 20 29 0a ble.......\. ).
7cb0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
7cc0: 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 0a 2f 2a ed(__alpha__)./*
7cd0: 20 54 68 65 20 66 69 72 73 74 20 36 20 66 6c 6f The first 6 flo
7ce0: 61 74 69 6e 67 20 70 6f 69 6e 74 20 72 65 67 69 ating point regi
7cf0: 73 74 65 72 73 20 68 61 76 65 20 62 65 65 6e 20 sters have been
7d00: 73 74 6f 72 65 64 20 69 6e 20 61 6e 6f 74 68 65 stored in anothe
7d10: 72 20 70 6c 61 63 65 2e 20 2a 2f 0a 23 64 65 66 r place. */.#def
7d20: 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c ine va_arg_doubl
7d30: 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 28 e(LIST) \. (((
7d40: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
7d50: 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 20 3c izeof(double)) <
7d60: 3d 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 61 72 67 = (LIST)->memarg
7d70: 70 74 72 09 09 5c 0a 20 20 20 3f 20 2a 28 64 6f ptr..\. ? *(do
7d80: 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 uble*)((LIST)->a
7d90: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 ptr - sizeof(dou
7da0: 62 6c 65 29 20 2d 20 36 2a 73 69 7a 65 6f 66 28 ble) - 6*sizeof(
7db0: 64 6f 75 62 6c 65 29 29 09 5c 0a 20 20 20 3a 20 double)).\. :
7dc0: 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 *(double*)((LIST
7dd0: 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 )->aptr - sizeof
7de0: 28 64 6f 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 (double))....\.
7df0: 20 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 ).#define va_ar
7e00: 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c g_float(LIST) \
7e10: 0a 20 20 28 28 28 4c 49 53 54 29 2d 3e 61 70 74 . (((LIST)->apt
7e20: 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 r += sizeof(doub
7e30: 6c 65 29 29 20 3c 3d 20 28 4c 49 53 54 29 2d 3e le)) <= (LIST)->
7e40: 6d 65 6d 61 72 67 70 74 72 09 09 5c 0a 20 20 20 memargptr..\.
7e50: 3f 20 2f 2a 20 54 68 65 20 66 69 72 73 74 20 36 ? /* The first 6
7e60: 20 61 72 67 73 20 68 61 76 65 20 62 65 65 6e 20 args have been
7e70: 70 75 74 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 put into memory
7e80: 62 79 20 22 73 74 74 22 20 69 6e 73 74 72 75 63 by "stt" instruc
7e90: 74 69 6f 6e 73 20 2a 2f 5c 0a 20 20 20 20 20 2f tions */\. /
7ea0: 2a 20 28 73 65 65 20 76 61 63 61 6c 6c 2d 61 6c * (see vacall-al
7eb0: 70 68 61 2e 73 21 29 2e 20 54 68 65 72 65 66 6f pha.s!). Therefo
7ec0: 72 65 20 6c 6f 61 64 20 74 68 65 6d 20 61 73 20 re load them as
7ed0: 64 6f 75 62 6c 65 73 2e 20 2a 2f 09 5c 0a 20 20 doubles. */.\.
7ee0: 20 20 20 2f 2a 20 57 68 65 6e 20 76 69 65 77 65 /* When viewe
7ef0: 64 20 61 73 20 66 6c 6f 61 74 73 2c 20 74 68 65 d as floats, the
7f00: 20 76 61 6c 75 65 20 77 69 6c 6c 20 62 65 20 74 value will be t
7f10: 68 65 20 63 6f 72 72 65 63 74 20 6f 6e 65 2e 20 he correct one.
7f20: 2a 2f 09 5c 0a 20 20 20 20 20 28 66 6c 6f 61 74 */.\. (float
7f30: 29 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 )*(double*)((LIS
7f40: 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f T)->aptr - sizeo
7f50: 66 28 64 6f 75 62 6c 65 29 20 2d 20 36 2a 73 69 f(double) - 6*si
7f60: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 20 5c 0a zeof(double)) \.
7f70: 20 20 20 3a 20 2f 2a 20 54 68 65 73 65 20 61 72 : /* These ar
7f80: 67 73 20 68 61 76 65 20 62 65 65 6e 20 70 75 74 gs have been put
7f90: 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 62 79 20 into memory by
7fa0: 22 73 74 73 22 20 69 6e 73 74 72 75 63 74 69 6f "sts" instructio
7fb0: 6e 73 2c 20 2a 2f 09 5c 0a 20 20 20 20 20 2f 2a ns, */.\. /*
7fc0: 20 74 68 65 72 65 66 6f 72 65 20 6c 6f 61 64 20 therefore load
7fd0: 74 68 65 6d 20 61 73 20 66 6c 6f 61 74 73 2e 20 them as floats.
7fe0: 2a 2f 09 09 09 09 5c 0a 20 20 20 20 20 2a 28 66 */....\. *(f
7ff0: 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 loat*)((LIST)->a
8000: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 ptr - sizeof(dou
8010: 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 0a 23 ble))....\. ).#
8020: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
8030: 64 28 5f 5f 68 70 70 61 5f 5f 29 0a 2f 2a 20 54 d(__hppa__)./* T
8040: 68 65 20 66 69 72 73 74 20 34 20 66 6c 6f 61 74 he first 4 float
8050: 20 72 65 67 69 73 74 65 72 73 20 61 6e 64 20 74 registers and t
8060: 68 65 20 66 69 72 73 74 20 32 20 64 6f 75 62 6c he first 2 doubl
8070: 65 20 72 65 67 69 73 74 65 72 73 20 61 72 65 20 e registers are
8080: 73 74 6f 72 65 64 0a 20 2a 20 65 6c 73 65 77 68 stored. * elsewh
8090: 65 72 65 2e 0a 20 2a 2f 0a 23 69 66 20 31 20 2f ere.. */.#if 1 /
80a0: 2a 20 67 63 63 2d 32 2e 35 2e 32 20 70 61 73 73 * gcc-2.5.2 pass
80b0: 65 73 20 74 68 65 73 65 20 61 72 67 73 20 69 6e es these args in
80c0: 20 67 65 6e 65 72 61 6c 20 72 65 67 69 73 74 65 general registe
80d0: 72 73 21 20 41 20 62 75 67 2c 20 49 20 74 68 69 rs! A bug, I thi
80e0: 6e 6b 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 nk. */.#define v
80f0: 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 a_arg_float(LIST
8100: 29 20 20 5c 0a 20 20 28 2a 28 66 6c 6f 61 74 2a ) \. (*(float*
8110: 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d )((LIST)->aptr -
8120: 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 = sizeof(float))
8130: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 ).#define va_arg
8140: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c _double(LIST) \
8150: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 . (__va_align_d
8160: 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 ouble(LIST).....
8170: 09 5c 0a 20 20 20 2a 28 64 6f 75 62 6c 65 2a 29 .\. *(double*)
8180: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 3d ((LIST)->aptr -=
8190: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 sizeof(double))
81a0: 09 09 09 09 5c 0a 20 20 29 0a 23 65 6c 73 65 20 ....\. ).#else
81b0: 2f 2a 20 74 68 69 73 20 77 6f 75 6c 64 20 62 65 /* this would be
81c0: 20 63 6f 72 72 65 63 74 20 69 66 20 74 68 65 20 correct if the
81d0: 61 72 67 73 20 77 65 72 65 20 70 61 73 73 65 64 args were passed
81e0: 20 69 6e 20 66 6c 6f 61 74 20 72 65 67 69 73 74 in float regist
81f0: 65 72 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ers. */.#define
8200: 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 va_arg_float(LIS
8210: 54 29 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 29 T) \. (((LIST)
8220: 2d 3e 61 70 74 72 20 2d 3d 20 73 69 7a 65 6f 66 ->aptr -= sizeof
8230: 28 66 6c 6f 61 74 29 29 20 3e 3d 20 28 4c 49 53 (float)) >= (LIS
8240: 54 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 09 T)->memargptr...
8250: 5c 0a 20 20 20 3f 20 2f 2a 20 54 68 65 20 66 69 \. ? /* The fi
8260: 72 73 74 20 34 20 66 6c 6f 61 74 20 61 72 67 73 rst 4 float args
8270: 20 61 72 65 20 73 74 6f 72 65 64 20 73 65 70 61 are stored sepa
8280: 72 61 74 65 6c 79 2e 20 2a 2f 09 09 5c 0a 20 20 rately. */..\.
8290: 20 20 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 *(float*)((LI
82a0: 53 54 29 2d 3e 61 70 74 72 20 2b 20 28 4c 49 53 ST)->aptr + (LIS
82b0: 54 29 2d 3e 66 61 72 67 5f 6f 66 66 73 65 74 29 T)->farg_offset)
82c0: 09 09 09 5c 0a 20 20 20 3a 20 2a 28 66 6c 6f 61 ...\. : *(floa
82d0: 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 t*)((LIST)->aptr
82e0: 29 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 64 65 )......\. ).#de
82f0: 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 fine va_arg_doub
8300: 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f le(LIST) \. (_
8310: 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 _va_align_double
8320: 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 (LIST)......\.
8330: 20 28 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (((LIST)->aptr
8340: 2d 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 -= sizeof(double
8350: 29 29 20 3e 3d 20 28 4c 49 53 54 29 2d 3e 6d 65 )) >= (LIST)->me
8360: 6d 61 72 67 70 74 72 09 09 5c 0a 20 20 20 20 3f margptr..\. ?
8370: 20 2f 2a 20 54 68 65 20 66 69 72 73 74 20 32 20 /* The first 2
8380: 64 6f 75 62 6c 65 20 61 72 67 73 20 61 72 65 20 double args are
8390: 73 74 6f 72 65 64 20 73 65 70 61 72 61 74 65 6c stored separatel
83a0: 79 2e 20 2a 2f 09 09 5c 0a 20 20 20 20 20 20 2a y. */..\. *
83b0: 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 (double*)((LIST)
83c0: 2d 3e 61 70 74 72 20 2b 20 28 4c 49 53 54 29 2d ->aptr + (LIST)-
83d0: 3e 64 61 72 67 5f 6f 66 66 73 65 74 29 09 09 09 >darg_offset)...
83e0: 5c 0a 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 \. : *(double
83f0: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 *)((LIST)->aptr)
8400: 09 09 09 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e ......\. )).#en
8410: 64 69 66 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 dif.#endif.#if d
8420: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 efined(__mips__)
8430: 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d && !defined(__m
8440: 69 70 73 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 ipsn32__) && !de
8450: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
8460: 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 74 20 30 )./* The first 0
8470: 2c 31 2c 32 20 72 65 67 69 73 74 65 72 73 20 61 ,1,2 registers a
8480: 72 65 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 re stored elsewh
8490: 65 72 65 20 69 66 20 74 68 65 79 20 61 72 65 20 ere if they are
84a0: 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 0a 20 floating-point.
84b0: 2a 20 70 61 72 61 6d 65 74 65 72 73 2e 0a 20 2a * parameters.. *
84c0: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
84d0: 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a _float(LIST) \.
84e0: 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 ((LIST)->aptr
84f0: 2b 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 += sizeof(float)
8500: 2c 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 ,.....\. (LIST
8510: 29 2d 3e 61 6e 75 6d 2b 2b 2c 09 09 09 09 09 09 )->anum++,......
8520: 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 61 .\. ((LIST)->a
8530: 6e 75 6d 20 3d 3d 20 31 09 09 09 09 09 09 09 5c num == 1.......\
8540: 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e . ? ((LIST)->
8550: 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 46 4c flags |= __VA_FL
8560: 4f 41 54 5f 31 2c 20 28 4c 49 53 54 29 2d 3e 66 OAT_1, (LIST)->f
8570: 61 72 67 5b 30 5d 29 09 09 09 5c 0a 20 20 20 20 arg[0])...\.
8580: 3a 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 : ((LIST)->anum
8590: 3d 3d 20 32 20 26 26 20 28 28 4c 49 53 54 29 2d == 2 && ((LIST)-
85a0: 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 46 4c >flags & __VA_FL
85b0: 4f 41 54 5f 31 29 09 09 5c 0a 20 20 20 20 20 20 OAT_1)..\.
85c0: 20 3f 20 28 2f 2a 20 28 4c 49 53 54 29 2d 3e 66 ? (/* (LIST)->f
85d0: 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 46 4c 4f lags |= __VA_FLO
85e0: 41 54 5f 32 2c 20 2a 2f 20 28 4c 49 53 54 29 2d AT_2, */ (LIST)-
85f0: 3e 66 61 72 67 5b 31 5d 29 09 09 5c 0a 20 20 20 >farg[1])..\.
8600: 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a 29 28 : *(float*)(
8610: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 (LIST)->aptr - s
8620: 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 09 09 09 izeof(float))...
8630: 5c 0a 20 20 29 29 20 20 29 0a 23 64 65 66 69 6e \. )) ).#defin
8640: 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 e va_arg_double(
8650: 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 LIST) \. (__va
8660: 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 _align_double(LI
8670: 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 28 4c ST)......\. (L
8680: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
8690: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 zeof(double),...
86a0: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
86b0: 6e 75 6d 2b 2b 2c 09 09 09 09 09 09 09 5c 0a 20 num++,.......\.
86c0: 20 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 ((LIST)->anum
86d0: 3d 3d 20 31 09 09 09 09 09 09 09 5c 0a 20 20 20 == 1.......\.
86e0: 20 3f 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 ? ((LIST)->flag
86f0: 73 20 7c 3d 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f s |= __VA_FLOAT_
8700: 31 2c 20 28 4c 49 53 54 29 2d 3e 64 61 72 67 5b 1, (LIST)->darg[
8710: 30 5d 29 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 0])...\. : ((
8720: 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3d 3d 20 32 LIST)->anum == 2
8730: 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 && ((LIST)->fla
8740: 67 73 20 26 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f gs & __VA_FLOAT_
8750: 31 29 09 09 5c 0a 20 20 20 20 20 20 20 3f 20 28 1)..\. ? (
8760: 2f 2a 20 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 /* (LIST)->flags
8770: 20 7c 3d 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 32 |= __VA_FLOAT_2
8780: 2c 20 2a 2f 20 28 4c 49 53 54 29 2d 3e 64 61 72 , */ (LIST)->dar
8790: 67 5b 31 5d 29 09 09 5c 0a 20 20 20 20 20 20 20 g[1])..\.
87a0: 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 : *(double*)((LI
87b0: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
87c0: 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 09 5c 0a of(double))...\.
87d0: 20 20 29 29 20 20 29 0a 23 65 6e 64 69 66 0a 23 )) ).#endif.#
87e0: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
87f0: 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e sn32__) || defin
8800: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 2f ed(__mips64__)./
8810: 2a 20 54 68 65 20 66 69 72 73 74 20 30 2c 2e 2e * The first 0,..
8820: 2c 38 20 72 65 67 69 73 74 65 72 73 20 61 72 65 ,8 registers are
8830: 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 65 72 stored elsewher
8840: 65 20 69 66 20 74 68 65 79 20 61 72 65 20 66 6c e if they are fl
8850: 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 0a 20 2a 20 oating-point. *
8860: 70 61 72 61 6d 65 74 65 72 73 2e 0a 20 2a 2f 0a parameters.. */.
8870: 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 #define va_arg_f
8880: 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 loat(LIST) \.
8890: 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 (__va_align_doub
88a0: 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a le(LIST)......\.
88b0: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
88c0: 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 += sizeof(double
88d0: 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 2b 2b 28 ),.....\. (++(
88e0: 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3c 3d 20 38 LIST)->anum <= 8
88f0: 09 09 09 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 .......\. ? (
8900: 4c 49 53 54 29 2d 3e 66 61 72 67 5b 28 4c 49 53 LIST)->farg[(LIS
8910: 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 5d 09 09 09 T)->anum - 1]...
8920: 09 09 5c 0a 20 20 20 20 3a 20 2a 28 66 6c 6f 61 ..\. : *(floa
8930: 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 t*)((LIST)->aptr
8940: 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 - sizeof(double
8950: 29 29 09 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 ))....\. )).#de
8960: 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 fine va_arg_doub
8970: 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f le(LIST) \. (_
8980: 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 _va_align_double
8990: 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 (LIST)......\.
89a0: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d (LIST)->aptr +=
89b0: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c sizeof(double),
89c0: 09 09 09 09 09 5c 0a 20 20 20 28 2b 2b 28 4c 49 .....\. (++(LI
89d0: 53 54 29 2d 3e 61 6e 75 6d 20 3c 3d 20 38 09 09 ST)->anum <= 8..
89e0: 09 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 .....\. ? (LI
89f0: 53 54 29 2d 3e 64 61 72 67 5b 28 4c 49 53 54 29 ST)->darg[(LIST)
8a00: 2d 3e 61 6e 75 6d 20 2d 20 31 5d 09 09 09 09 09 ->anum - 1].....
8a10: 5c 0a 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 \. : *(double
8a20: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
8a30: 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 - sizeof(double)
8a40: 29 09 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 )....\. )).#end
8a50: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
8a60: 5f 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 54 _sparc64__)./* T
8a70: 68 65 20 66 69 72 73 74 20 30 2c 2e 2e 2c 31 36 he first 0,..,16
8a80: 20 72 65 67 69 73 74 65 72 73 20 61 72 65 20 73 registers are s
8a90: 74 6f 72 65 64 20 65 6c 73 65 77 68 65 72 65 20 tored elsewhere
8aa0: 69 66 20 74 68 65 79 20 61 72 65 20 66 6c 6f 61 if they are floa
8ab0: 74 69 6e 67 2d 70 6f 69 6e 74 0a 20 2a 20 70 61 ting-point. * pa
8ac0: 72 61 6d 65 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 rameters.. */.#d
8ad0: 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c 6f efine va_arg_flo
8ae0: 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f at(LIST) \. (_
8af0: 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 _va_align_double
8b00: 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 (LIST)......\.
8b10: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d (LIST)->aptr +=
8b20: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c sizeof(double),
8b30: 09 09 09 09 09 5c 0a 20 20 20 28 2b 2b 28 4c 49 .....\. (++(LI
8b40: 53 54 29 2d 3e 61 6e 75 6d 20 3c 3d 20 31 36 09 ST)->anum <= 16.
8b50: 09 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 .....\. ? (LI
8b60: 53 54 29 2d 3e 66 61 72 67 5b 28 4c 49 53 54 29 ST)->farg[(LIST)
8b70: 2d 3e 61 6e 75 6d 20 2d 20 31 5d 09 09 09 09 09 ->anum - 1].....
8b80: 5c 0a 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a \. : *(float*
8b90: 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d )((LIST)->aptr -
8ba0: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 sizeof(double))
8bb0: 09 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 ....\. )).#defi
8bc0: 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 ne va_arg_double
8bd0: 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 (LIST) \. (__v
8be0: 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c a_align_double(L
8bf0: 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 28 IST)......\. (
8c00: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
8c10: 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 izeof(double),..
8c20: 09 09 09 5c 0a 20 20 20 28 2b 2b 28 4c 49 53 54 ...\. (++(LIST
8c30: 29 2d 3e 61 6e 75 6d 20 3c 3d 20 31 36 09 09 09 )->anum <= 16...
8c40: 09 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 53 54 ...\. ? (LIST
8c50: 29 2d 3e 64 61 72 67 5b 28 4c 49 53 54 29 2d 3e )->darg[(LIST)->
8c60: 61 6e 75 6d 20 2d 20 31 5d 09 09 09 09 09 5c 0a anum - 1].....\.
8c70: 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 : *(double*)
8c80: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 ((LIST)->aptr -
8c90: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 sizeof(double)).
8ca0: 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 66 ...\. )).#endif
8cb0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 70 .#if defined(__p
8cc0: 6f 77 65 72 70 63 5f 5f 29 20 26 26 20 21 64 65 owerpc__) && !de
8cd0: 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 fined(__powerpc6
8ce0: 34 5f 5f 29 20 26 26 20 28 64 65 66 69 6e 65 64 4__) && (defined
8cf0: 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 69 6e (_AIX) || (defin
8d00: 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 ed(__MACH__) &&
8d10: 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f defined(__APPLE_
8d20: 5f 29 29 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 _)))./* The firs
8d30: 74 20 31 33 20 66 6c 6f 61 74 69 6e 67 2d 70 6f t 13 floating-po
8d40: 69 6e 74 20 61 72 67 73 20 68 61 76 65 20 62 65 int args have be
8d50: 65 6e 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 en stored elsewh
8d60: 65 72 65 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ere. */.#define
8d70: 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 va_arg_float(LIS
8d80: 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d T) \. ((LIST)-
8d90: 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 >aptr += sizeof(
8da0: 66 6c 6f 61 74 29 2c 09 09 09 09 09 5c 0a 20 20 float),.....\.
8db0: 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 ((LIST)->memfar
8dc0: 67 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e gptr < &(LIST)->
8dd0: 66 61 72 67 5b 31 33 5d 09 09 09 09 5c 0a 20 20 farg[13]....\.
8de0: 20 20 3f 20 28 66 6c 6f 61 74 29 20 2a 28 28 4c ? (float) *((L
8df0: 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 IST)->memfargptr
8e00: 2b 2b 29 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 ++).....\. :
8e10: 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 *(float*)((LIST)
8e20: 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 ->aptr - sizeof(
8e30: 66 6c 6f 61 74 29 29 09 09 09 09 5c 0a 20 20 29 float))....\. )
8e40: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 ).#define va_arg
8e50: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c _double(LIST) \
8e60: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 . (__va_align_d
8e70: 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 ouble(LIST).....
8e80: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 .\. (LIST)->ap
8e90: 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 tr += sizeof(dou
8ea0: 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 ble),.....\. (
8eb0: 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 (LIST)->memfargp
8ec0: 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 tr < &(LIST)->fa
8ed0: 72 67 5b 31 33 5d 09 09 09 09 5c 0a 20 20 20 20 rg[13]....\.
8ee0: 3f 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 ? *((LIST)->memf
8ef0: 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 09 5c argptr++)......\
8f00: 0a 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 2a . : *(double*
8f10: 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d )((LIST)->aptr -
8f20: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 sizeof(double))
8f30: 09 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 ....\. )).#endi
8f40: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
8f50: 70 6f 77 65 72 70 63 5f 5f 29 20 26 26 20 21 64 powerpc__) && !d
8f60: 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 efined(__powerpc
8f70: 36 34 5f 5f 29 20 26 26 20 21 28 64 65 66 69 6e 64__) && !(defin
8f80: 65 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 ed(_AIX) || (def
8f90: 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 ined(__MACH__) &
8fa0: 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c & defined(__APPL
8fb0: 45 5f 5f 29 29 29 0a 2f 2a 20 54 68 65 20 66 69 E__)))./* The fi
8fc0: 72 73 74 20 38 20 66 6c 6f 61 74 69 6e 67 2d 70 rst 8 floating-p
8fd0: 6f 69 6e 74 20 61 72 67 73 20 68 61 76 65 20 62 oint args have b
8fe0: 65 65 6e 20 73 74 6f 72 65 64 20 65 6c 73 65 77 een stored elsew
8ff0: 68 65 72 65 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 here. */.#define
9000: 20 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 va_arg_float(LI
9010: 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 ST) \. ((LIST)
9020: 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 ->memfargptr < &
9030: 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d 09 (LIST)->farg[8].
9040: 09 09 09 5c 0a 20 20 20 3f 20 28 66 6c 6f 61 74 ...\. ? (float
9050: 29 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 ) *((LIST)->memf
9060: 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 5c 0a argptr++).....\.
9070: 20 20 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 : ((LIST)->ap
9080: 74 72 20 3d 20 28 28 4c 49 53 54 29 2d 3e 6f 6e tr = ((LIST)->on
9090: 73 74 61 63 6b 20 3d 3d 20 30 20 20 20 20 20 20 stack == 0
90a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
90b0: 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 \.
90c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
90d0: 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 ? ((LIST)->onst
90e0: 61 63 6b 3d 31 2c 20 28 4c 49 53 54 29 2d 3e 73 ack=1, (LIST)->s
90f0: 61 70 74 72 29 20 20 20 20 20 20 20 20 20 20 20 aptr)
9100: 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 \.
9110: 20 20 20 20 20 20 20 20 20 20 20 3a 20 28 4c 49 : (LI
9120: 53 54 29 2d 3e 61 70 74 72 20 20 20 20 20 20 20 ST)->aptr
9130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9140: 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 \.
9150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9160: 20 20 20 20 29 2c 20 20 20 20 20 20 20 20 20 20 ),
9170: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9190: 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 28 4c \. (L
91a0: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
91b0: 7a 65 6f 66 28 66 6c 6f 61 74 29 2c 09 09 09 09 zeof(float),....
91c0: 09 5c 0a 20 20 20 20 20 20 2a 28 66 6c 6f 61 74 .\. *(float
91d0: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
91e0: 2d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 - sizeof(float))
91f0: 09 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 ....\. )).#defi
9200: 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 ne va_arg_double
9210: 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 (LIST) \. ((LI
9220: 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 ST)->memfargptr
9230: 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b < &(LIST)->farg[
9240: 38 5d 09 09 09 09 5c 0a 20 20 20 20 3f 20 2a 28 8]....\. ? *(
9250: 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 (LIST)->memfargp
9260: 74 72 2b 2b 29 09 09 09 09 09 09 5c 0a 20 20 20 tr++)......\.
9270: 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 : ((LIST)->aptr
9280: 20 3d 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 = ((LIST)->onst
9290: 61 63 6b 20 3d 3d 20 30 20 20 20 20 20 20 20 20 ack == 0
92a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
92b0: 20 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 \.
92c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3f 20 ?
92d0: 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b ((LIST)->onstack
92e0: 3d 31 2c 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 =1, (LIST)->sapt
92f0: 72 29 20 20 20 20 20 20 20 20 20 20 20 20 20 5c r) \
9300: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
9310: 20 20 20 20 20 20 20 20 3a 20 28 4c 49 53 54 29 : (LIST)
9320: 2d 3e 61 70 74 72 20 20 20 20 20 20 20 20 20 20 ->aptr
9330: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9340: 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 \.
9350: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9360: 20 29 2c 20 20 20 20 20 20 20 20 20 20 20 20 20 ),
9370: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9380: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9390: 20 20 20 5c 0a 20 20 20 20 20 20 20 5f 5f 76 61 \. __va
93a0: 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 _align_double(LI
93b0: 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 20 20 ST)......\.
93c0: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
93d0: 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 = sizeof(double)
93e0: 2c 09 09 09 09 09 5c 0a 20 20 20 20 20 20 20 2a ,.....\. *
93f0: 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 (double*)((LIST)
9400: 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 ->aptr - sizeof(
9410: 64 6f 75 62 6c 65 29 29 09 09 09 5c 0a 20 20 29 double))...\. )
9420: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
9430: 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 ined(__powerpc64
9440: 5f 5f 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 74 __)./* The first
9450: 20 31 33 20 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 13 floating-poi
9460: 6e 74 20 61 72 67 73 20 68 61 76 65 20 62 65 65 nt args have bee
9470: 6e 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 65 n stored elsewhe
9480: 72 65 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 re. */.#define v
9490: 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 a_arg_float(LIST
94a0: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
94b0: 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 5f aptr += sizeof(_
94c0: 5f 76 61 77 6f 72 64 29 2c 09 09 09 09 09 5c 0a _vaword),.....\.
94d0: 20 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 ((LIST)->memf
94e0: 61 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 29 argptr < &(LIST)
94f0: 2d 3e 66 61 72 67 5b 31 33 5d 09 09 09 09 5c 0a ->farg[13]....\.
9500: 20 20 20 20 3f 20 28 66 6c 6f 61 74 29 20 2a 28 ? (float) *(
9510: 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 (LIST)->memfargp
9520: 74 72 2b 2b 29 09 09 09 09 09 5c 0a 20 20 20 20 tr++).....\.
9530: 3a 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 : *(float*)((LIS
9540: 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f T)->aptr - sizeo
9550: 66 28 66 6c 6f 61 74 29 29 09 09 09 09 5c 0a 20 f(float))....\.
9560: 20 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 )).#define va_a
9570: 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 rg_double(LIST)
9580: 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e \. (__va_align
9590: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 _double(LIST)...
95a0: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
95b0: 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 aptr += sizeof(d
95c0: 6f 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 ouble),.....\.
95d0: 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 ((LIST)->memfar
95e0: 67 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e gptr < &(LIST)->
95f0: 66 61 72 67 5b 31 33 5d 09 09 09 09 5c 0a 20 20 farg[13]....\.
9600: 20 20 3f 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 ? *((LIST)->me
9610: 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 mfargptr++).....
9620: 09 5c 0a 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c .\. : *(doubl
9630: 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 e*)((LIST)->aptr
9640: 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 - sizeof(double
9650: 29 29 09 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e ))....\. )).#en
9660: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
9670: 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 54 68 65 __s390__)./* The
9680: 20 66 69 72 73 74 20 32 20 66 6c 6f 61 74 69 6e first 2 floatin
9690: 67 2d 70 6f 69 6e 74 20 61 72 67 73 20 68 61 76 g-point args hav
96a0: 65 20 62 65 65 6e 20 73 74 6f 72 65 64 20 65 6c e been stored el
96b0: 73 65 77 68 65 72 65 2e 20 2a 2f 0a 23 64 65 66 sewhere. */.#def
96c0: 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c 6f 61 74 ine va_arg_float
96d0: 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 (LIST) \. ((LI
96e0: 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 ST)->memfargptr
96f0: 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b < &(LIST)->farg[
9700: 32 5d 09 09 09 09 5c 0a 20 20 20 3f 20 28 4c 49 2]....\. ? (LI
9710: 53 54 29 2d 3e 6d 65 6d 64 61 72 67 70 74 72 2b ST)->memdargptr+
9720: 2b 2c 20 28 66 6c 6f 61 74 29 20 2a 28 28 4c 49 +, (float) *((LI
9730: 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b ST)->memfargptr+
9740: 2b 29 09 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 +)..\. : ((LIS
9750: 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 T)->aptr = ((LIS
9760: 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 T)->onstack == 0
9770: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9780: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a \.
9790: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
97a0: 20 20 20 20 20 20 20 3f 20 28 28 4c 49 53 54 29 ? ((LIST)
97b0: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
97c0: 53 54 29 2d 3e 73 61 70 74 72 29 20 20 20 20 20 ST)->saptr)
97d0: 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 \.
97e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
97f0: 20 3a 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 : (LIST)->aptr
9800: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9810: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9820: 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 \.
9830: 20 20 20 20 20 20 20 20 20 20 29 2c 20 20 20 20 ),
9840: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9850: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9860: 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 \.
9870: 20 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 (LIST)->aptr
9880: 20 2b 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 += sizeof(float
9890: 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 20 20 2a ),.....\. *
98a0: 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d (float*)((LIST)-
98b0: 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 66 >aptr - sizeof(f
98c0: 6c 6f 61 74 29 29 09 09 09 09 5c 0a 20 20 29 29 loat))....\. ))
98d0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
98e0: 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a double(LIST) \.
98f0: 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 64 61 ((LIST)->memda
9900: 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d rgptr < &(LIST)-
9910: 3e 64 61 72 67 5b 32 5d 09 09 09 09 5c 0a 20 20 >darg[2]....\.
9920: 20 20 3f 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 ? (LIST)->memf
9930: 61 72 67 70 74 72 2b 2b 2c 20 2a 28 28 4c 49 53 argptr++, *((LIS
9940: 54 29 2d 3e 6d 65 6d 64 61 72 67 70 74 72 2b 2b T)->memdargptr++
9950: 29 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 4c 49 )...\. : ((LI
9960: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 ST)->aptr = ((LI
9970: 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 ST)->onstack ==
9980: 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0
9990: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a \.
99a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
99b0: 20 20 20 20 20 20 20 3f 20 28 28 4c 49 53 54 29 ? ((LIST)
99c0: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
99d0: 53 54 29 2d 3e 73 61 70 74 72 29 20 20 20 20 20 ST)->saptr)
99e0: 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 \.
99f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9a00: 20 3a 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 : (LIST)->aptr
9a10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9a20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9a30: 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 \.
9a40: 20 20 20 20 20 20 20 20 20 20 29 2c 20 20 20 20 ),
9a50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9a60: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9a70: 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 \.
9a80: 20 20 20 20 20 5f 5f 76 61 5f 61 6c 69 67 6e 5f __va_align_
9a90: 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 double(LIST)....
9aa0: 09 09 5c 0a 20 20 20 20 20 20 20 28 4c 49 53 54 ..\. (LIST
9ab0: 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f )->aptr += sizeo
9ac0: 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 09 09 5c f(double),.....\
9ad0: 0a 20 20 20 20 20 20 20 2a 28 64 6f 75 62 6c 65 . *(double
9ae0: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
9af0: 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 - sizeof(double)
9b00: 29 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 )...\. )).#endi
9b10: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
9b20: 69 61 36 34 5f 5f 29 0a 2f 2a 20 54 68 65 20 66 ia64__)./* The f
9b30: 69 72 73 74 20 38 20 66 6c 6f 61 74 69 6e 67 2d irst 8 floating-
9b40: 70 6f 69 6e 74 20 61 72 67 73 20 68 61 76 65 20 point args have
9b50: 62 65 65 6e 20 73 74 6f 72 65 64 20 65 6c 73 65 been stored else
9b60: 77 68 65 72 65 2e 20 2a 2f 0a 23 64 65 66 69 6e where. */.#defin
9b70: 65 20 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c e va_arg_float(L
9b80: 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 IST) \. ((LIST
9b90: 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f )->aptr += sizeo
9ba0: 66 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 09 09 f(__vaword),....
9bb0: 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 6d .\. ((LIST)->m
9bc0: 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 emfargptr < &(LI
9bd0: 53 54 29 2d 3e 66 61 72 67 5b 38 5d 09 09 09 09 ST)->farg[8]....
9be0: 5c 0a 20 20 20 20 3f 20 28 66 6c 6f 61 74 29 20 \. ? (float)
9bf0: 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 *((LIST)->memfar
9c00: 67 70 74 72 2b 2b 29 09 09 09 09 09 5c 0a 20 20 gptr++).....\.
9c10: 20 20 3a 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c : *(float*)((L
9c20: 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a IST)->aptr - siz
9c30: 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 09 09 eof(__vaword))..
9c40: 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e 65 20 .\. )).#define
9c50: 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 va_arg_double(LI
9c60: 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 ST) \. (__va_a
9c70: 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 lign_double(LIST
9c80: 29 09 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 )......\. (LIS
9c90: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 T)->aptr += size
9ca0: 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 09 09 of(double),.....
9cb0: 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 \. ((LIST)->me
9cc0: 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 53 mfargptr < &(LIS
9cd0: 54 29 2d 3e 66 61 72 67 5b 38 5d 09 09 09 09 5c T)->farg[8]....\
9ce0: 0a 20 20 20 20 3f 20 2a 28 28 4c 49 53 54 29 2d . ? *((LIST)-
9cf0: 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 >memfargptr++)..
9d00: 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 64 6f ....\. : *(do
9d10: 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 uble*)((LIST)->a
9d20: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 ptr - sizeof(dou
9d30: 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 0a ble))....\. )).
9d40: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
9d50: 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a 2f ed(__x86_64__)./
9d60: 2a 20 54 68 65 20 66 69 72 73 74 20 38 20 66 6c * The first 8 fl
9d70: 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 67 oating-point arg
9d80: 73 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f 72 s have been stor
9d90: 65 64 20 65 6c 73 65 77 68 65 72 65 2e 20 2a 2f ed elsewhere. */
9da0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
9db0: 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 float(LIST) \.
9dc0: 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 ((LIST)->memfar
9dd0: 67 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e gptr < &(LIST)->
9de0: 66 61 72 67 5b 38 5d 09 09 09 09 5c 0a 20 20 20 farg[8]....\.
9df0: 3f 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 ? ((LIST)->memfa
9e00: 72 67 70 74 72 2b 2b 2c 09 09 09 09 09 09 5c 0a rgptr++,......\.
9e10: 20 20 20 20 20 20 2a 28 66 6c 6f 61 74 2a 29 28 *(float*)(
9e20: 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 (LIST)->memfargp
9e30: 74 72 20 2d 20 31 29 09 09 09 09 09 5c 0a 20 20 tr - 1).....\.
9e40: 20 20 20 29 09 09 09 09 09 09 09 09 09 5c 0a 20 ).........\.
9e50: 20 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 : ((LIST)->apt
9e60: 72 20 2b 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 r += sizeof(__va
9e70: 77 6f 72 64 29 2c 09 09 09 09 09 5c 0a 20 20 20 word),.....\.
9e80: 20 20 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 *(float*)((LI
9e90: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
9ea0: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 09 09 09 of(__vaword))...
9eb0: 5c 0a 20 20 29 20 20 29 0a 23 64 65 66 69 6e 65 \. ) ).#define
9ec0: 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c va_arg_double(L
9ed0: 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 IST) \. ((LIST
9ee0: 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 )->memfargptr <
9ef0: 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d &(LIST)->farg[8]
9f00: 09 09 09 09 5c 0a 20 20 20 3f 20 2a 28 4c 49 53 ....\. ? *(LIS
9f10: 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b T)->memfargptr++
9f20: 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 28 28 4c ......\. : ((L
9f30: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
9f40: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 2c 09 zeof(__vaword),.
9f50: 09 09 09 09 5c 0a 20 20 20 20 20 20 2a 28 64 6f ....\. *(do
9f60: 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 uble*)((LIST)->a
9f70: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 5f 5f 76 ptr - sizeof(__v
9f80: 61 77 6f 72 64 29 29 09 09 09 5c 0a 20 20 29 20 aword))...\. )
9f90: 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 ).#endif.#ifnde
9fa0: 66 20 76 61 5f 61 72 67 5f 66 6c 6f 61 74 0a 23 f va_arg_float.#
9fb0: 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c define va_arg_fl
9fc0: 6f 61 74 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 oat(LIST).__va_a
9fd0: 72 67 28 4c 49 53 54 2c 66 6c 6f 61 74 29 0a 23 rg(LIST,float).#
9fe0: 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 76 61 endif.#ifndef va
9ff0: 5f 61 72 67 5f 64 6f 75 62 6c 65 0a 23 64 65 66 _arg_double.#def
a000: 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c ine va_arg_doubl
a010: 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f e(LIST) \. (__
a020: 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 va_align_double(
a030: 4c 49 53 54 29 20 5f 5f 76 61 5f 61 72 67 28 4c LIST) __va_arg(L
a040: 49 53 54 2c 64 6f 75 62 6c 65 29 29 0a 23 65 6e IST,double)).#en
a050: 64 69 66 0a 0a 2f 2a 20 50 6f 69 6e 74 65 72 20 dif../* Pointer
a060: 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 23 64 arguments. */.#d
a070: 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 70 74 72 efine va_arg_ptr
a080: 28 4c 49 53 54 2c 54 59 50 45 29 09 5f 5f 76 61 (LIST,TYPE).__va
a090: 5f 61 72 67 28 4c 49 53 54 2c 54 59 50 45 29 0a _arg(LIST,TYPE).
a0a0: 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 20 61 72 ./* Structure ar
a0b0: 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 23 64 65 66 guments. */.#def
a0c0: 69 6e 65 20 76 61 5f 61 72 67 5f 73 74 72 75 63 ine va_arg_struc
a0d0: 74 28 4c 49 53 54 2c 54 59 50 45 29 20 20 5c 0a t(LIST,TYPE) \.
a0e0: 20 20 2a 28 54 59 50 45 2a 29 5f 5f 76 61 5f 61 *(TYPE*)__va_a
a0f0: 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 73 rg_struct(LIST,s
a100: 69 7a 65 6f 66 28 54 59 50 45 29 2c 5f 5f 56 41 izeof(TYPE),__VA
a110: 5f 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 29 0a _alignof(TYPE)).
a120: 2f 2a 20 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 /* _va_arg_struc
a130: 74 28 29 20 69 73 20 6c 69 6b 65 20 76 61 5f 61 t() is like va_a
a140: 72 67 5f 73 74 72 75 63 74 28 29 2c 20 65 78 63 rg_struct(), exc
a150: 65 70 74 20 74 68 61 74 20 79 6f 75 20 70 61 73 ept that you pas
a160: 73 20 74 68 65 20 74 79 70 65 27 73 0a 20 2a 20 s the type's. *
a170: 73 69 7a 65 20 61 6e 64 20 61 6c 69 67 6e 6d 65 size and alignme
a180: 6e 74 20 69 6e 73 74 65 61 64 20 6f 66 20 74 68 nt instead of th
a190: 65 20 74 79 70 65 20 61 6e 64 20 67 65 74 20 74 e type and get t
a1a0: 68 65 20 76 61 6c 75 65 27 73 20 61 64 64 72 65 he value's addre
a1b0: 73 73 20 69 6e 73 74 65 61 64 0a 20 2a 20 6f 66 ss instead. * of
a1c0: 20 74 68 65 20 76 61 6c 75 65 20 69 74 73 65 6c the value itsel
a1d0: 66 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f f.. */.#define _
a1e0: 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 va_arg_struct(LI
a1f0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
a200: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 76 E_ALIGN) \. (v
a210: 6f 69 64 2a 29 5f 5f 76 61 5f 61 72 67 5f 73 74 oid*)__va_arg_st
a220: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
a230: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 0a IZE,TYPE_ALIGN).
a240: 2f 2a 20 53 74 72 75 63 74 75 72 65 20 61 72 67 /* Structure arg
a250: 75 6d 65 6e 74 20 61 6c 69 67 6e 6d 65 6e 74 2e ument alignment.
a260: 20 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 */.#if defined(
a270: 5f 5f 69 33 38 36 5f 5f 29 20 26 26 20 64 65 66 __i386__) && def
a280: 69 6e 65 64 28 5f 4d 53 43 5f 56 45 52 29 0a 2f ined(_MSC_VER)./
a290: 2a 20 49 6e 20 4d 53 56 43 2c 20 64 6f 75 62 6c * In MSVC, doubl
a2a0: 65 73 20 69 6e 73 69 64 65 20 73 74 72 75 63 74 es inside struct
a2b0: 75 72 65 73 20 68 61 76 65 20 61 6c 69 67 6e 6d ures have alignm
a2c0: 65 6e 74 20 38 2c 20 69 2e 65 2e 0a 20 2a 20 5f ent 8, i.e.. * _
a2d0: 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 64 6f 75 62 _VA_alignof(doub
a2e0: 6c 65 29 20 3d 20 38 2c 20 62 75 74 20 64 6f 75 le) = 8, but dou
a2f0: 62 6c 65 73 20 28 61 6e 64 20 61 6c 73 6f 20 73 bles (and also s
a300: 74 72 75 63 74 75 72 65 73 20 63 6f 6e 74 61 69 tructures contai
a310: 6e 69 6e 67 0a 20 2a 20 64 6f 75 62 6c 65 73 29 ning. * doubles)
a320: 20 61 72 65 20 70 61 73 73 65 64 20 6f 6e 20 74 are passed on t
a330: 68 65 20 73 74 61 63 6b 20 77 69 74 68 20 61 6c he stack with al
a340: 69 67 6e 6d 65 6e 74 20 34 2e 20 4c 6f 6f 6b 73 ignment 4. Looks
a350: 20 72 65 61 6c 6c 79 20 77 65 69 72 64 2e 0a 20 really weird..
a360: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
a370: 73 74 72 75 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 struct_alignment
a380: 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a (TYPE_ALIGN) \.
a390: 20 20 28 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 ((TYPE_ALIGN)
a3a0: 3c 3d 20 34 20 3f 20 28 54 59 50 45 5f 41 4c 49 <= 4 ? (TYPE_ALI
a3b0: 47 4e 29 20 3a 20 34 29 0a 23 65 6c 73 65 0a 23 GN) : 4).#else.#
a3c0: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 72 75 define __va_stru
a3d0: 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 28 54 59 50 ct_alignment(TYP
a3e0: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 54 E_ALIGN) \. (T
a3f0: 59 50 45 5f 41 4c 49 47 4e 29 0a 23 65 6e 64 69 YPE_ALIGN).#endi
a400: 66 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 f.#define __va_a
a410: 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 lign_struct(LIST
a420: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
a430: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 4c 49 53 ALIGN) \. (LIS
a440: 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 T)->aptr = ((LIS
a450: 54 29 2d 3e 61 70 74 72 20 2b 20 5f 5f 76 61 5f T)->aptr + __va_
a460: 73 74 72 75 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 struct_alignment
a470: 28 54 59 50 45 5f 41 4c 49 47 4e 29 2d 31 29 20 (TYPE_ALIGN)-1)
a480: 26 20 2d 28 6c 6f 6e 67 29 5f 5f 76 61 5f 73 74 & -(long)__va_st
a490: 72 75 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 28 54 ruct_alignment(T
a4a0: 59 50 45 5f 41 4c 49 47 4e 29 2c 0a 23 69 66 20 YPE_ALIGN),.#if
a4b0: 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f defined(__i386__
a4c0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d ) || defined(__m
a4d0: 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 68k__) || define
a4e0: 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 d(__alpha__) ||
a4f0: 64 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 defined(__arm__)
a500: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f || defined(__po
a510: 77 65 72 70 63 36 34 5f 5f 29 20 7c 7c 20 64 65 werpc64__) || de
a520: 66 69 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 fined(__m88k__)
a530: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e || defined(__con
a540: 76 65 78 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 vex__) || define
a550: 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 20 7c 7c d(__x86_64__) ||
a560: 20 28 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 (defined(__ia64
a570: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
a580: 5f 47 4e 55 43 5f 5f 29 20 26 26 20 28 5f 5f 47 _GNUC__) && (__G
a590: 4e 55 43 5f 5f 20 3e 3d 20 33 29 29 0a 23 64 65 NUC__ >= 3)).#de
a5a0: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 fine __va_arg_st
a5b0: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
a5c0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 IZE,TYPE_ALIGN)
a5d0: 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e \. (__va_align
a5e0: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
a5f0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
a600: 4e 29 09 09 09 09 5c 0a 20 20 20 5f 5f 76 61 5f N)....\. __va_
a610: 61 72 67 5f 61 64 6a 75 73 74 65 64 28 4c 49 53 arg_adjusted(LIS
a620: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
a630: 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 29 _ALIGN)....\. )
a640: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
a650: 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 ned(__mips__) &&
a660: 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 !defined(__mips
a670: 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 6e n32__) && !defin
a680: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 2f ed(__mips64__)./
a690: 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 * small structur
a6a0: 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 es < 1 word are
a6b0: 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 69 adjusted dependi
a6c0: 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a ng on compiler *
a6d0: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
a6e0: 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 rg_struct(LIST,T
a6f0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
a700: 49 47 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f IGN) \. (__va_
a710: 61 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 align_struct(LIS
a720: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
a730: 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 20 _ALIGN)....\.
a740: 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 ((LIST)->flags &
a750: 20 5f 5f 56 41 5f 53 47 49 43 43 5f 53 54 52 55 __VA_SGICC_STRU
a760: 43 54 5f 41 52 47 53 09 09 09 09 5c 0a 20 20 20 CT_ARGS....\.
a770: 20 3f 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 63 ? /* SGI MIPS c
a780: 63 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 c passes small s
a790: 74 72 75 63 74 75 72 65 73 20 6c 65 66 74 2d 61 tructures left-a
a7a0: 64 6a 75 73 74 65 64 2c 20 61 6c 74 68 6f 75 67 djusted, althoug
a7b0: 68 20 62 69 67 2d 65 6e 64 69 61 6e 21 20 2a 2f h big-endian! */
a7c0: 5c 0a 20 20 20 20 20 20 5f 5f 76 61 5f 61 72 67 \. __va_arg
a7d0: 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 _leftadjusted(LI
a7e0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
a7f0: 45 5f 41 4c 49 47 4e 29 09 09 09 5c 0a 20 20 20 E_ALIGN)...\.
a800: 20 3a 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 67 : /* SGI MIPS g
a810: 63 63 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 cc passes small
a820: 73 74 72 75 63 74 75 72 65 73 20 77 69 74 68 69 structures withi
a830: 6e 20 74 68 65 20 66 69 72 73 74 20 66 6f 75 72 n the first four
a840: 20 77 6f 72 64 73 20 6c 65 66 74 2d 09 20 20 20 words left-.
a850: 5c 0a 20 20 20 20 20 20 20 2a 20 61 64 6a 75 73 \. * adjus
a860: 74 65 64 2c 20 66 6f 72 20 63 6f 6d 70 61 74 69 ted, for compati
a870: 62 69 6c 69 74 79 20 77 69 74 68 20 63 63 2e 20 bility with cc.
a880: 42 75 74 20 73 74 72 75 63 74 75 72 65 73 20 69 But structures i
a890: 6e 20 6d 65 6d 6f 72 79 20 61 72 65 20 70 61 73 n memory are pas
a8a0: 73 65 64 20 20 5c 0a 20 20 20 20 20 20 20 2a 20 sed \. *
a8b0: 72 69 67 68 74 2d 61 64 6a 75 73 74 65 64 21 21 right-adjusted!!
a8c0: 20 53 65 65 20 67 63 63 2d 32 2e 36 2e 33 2f 63 See gcc-2.6.3/c
a8d0: 6f 6e 66 69 67 2f 6d 69 70 73 2f 6d 69 70 73 2e onfig/mips/mips.
a8e0: 63 3a 66 75 6e 63 74 69 6f 6e 5f 61 72 67 28 29 c:function_arg()
a8f0: 2e 09 20 20 20 5c 0a 20 20 20 20 20 20 20 2a 2f .. \. */
a900: 09 09 09 09 09 09 09 09 09 20 20 20 5c 0a 20 20 ......... \.
a910: 20 20 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 ((LIST)->apt
a920: 72 20 3c 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 61 r < (LIST)->mema
a930: 72 67 70 74 72 09 09 09 09 09 5c 0a 20 20 20 20 rgptr.....\.
a940: 20 20 20 3f 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 ? __va_arg_le
a950: 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c ftadjusted(LIST,
a960: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
a970: 4c 49 47 4e 29 09 09 5c 0a 20 20 20 20 20 20 20 LIGN)..\.
a980: 3a 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 : __va_arg_right
a990: 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 adjusted(LIST,TY
a9a0: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 PE_SIZE,TYPE_ALI
a9b0: 47 4e 29 09 09 5c 0a 20 20 29 29 20 20 29 0a 23 GN)..\. )) ).#
a9c0: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
a9d0: 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c d(__mipsn32__) |
a9e0: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 | defined(__mips
a9f0: 36 34 5f 5f 29 0a 2f 2a 20 73 6d 61 6c 6c 20 73 64__)./* small s
aa00: 74 72 75 63 74 75 72 65 73 20 3c 20 31 20 77 6f tructures < 1 wo
aa10: 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 rd are adjusted
aa20: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d depending on com
aa30: 70 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 piler */.#define
aa40: 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 __va_arg_struct
aa50: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
aa60: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
aa70: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 (__va_align_str
aa80: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 uct(LIST,TYPE_SI
aa90: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
aaa0: 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e ..\. ((LIST)->
aab0: 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 53 47 49 flags & __VA_SGI
aac0: 43 43 5f 53 54 52 55 43 54 5f 41 52 47 53 09 09 CC_STRUCT_ARGS..
aad0: 09 09 5c 0a 20 20 20 20 3f 20 2f 2a 20 53 47 49 ..\. ? /* SGI
aae0: 20 4d 49 50 53 20 63 63 20 70 61 73 73 65 73 20 MIPS cc passes
aaf0: 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 small structures
ab00: 20 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 2c 20 left-adjusted,
ab10: 61 6c 74 68 6f 75 67 68 20 62 69 67 2d 65 6e 64 although big-end
ab20: 69 61 6e 21 20 2a 2f 5c 0a 20 20 20 20 20 20 5f ian! */\. _
ab30: 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 _va_arg_leftadju
ab40: 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 sted(LIST,TYPE_S
ab50: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 IZE,TYPE_ALIGN).
ab60: 09 09 5c 0a 20 20 20 20 3a 20 2f 2a 20 53 47 49 ..\. : /* SGI
ab70: 20 4d 49 50 53 20 67 63 63 20 70 61 73 73 65 73 MIPS gcc passes
ab80: 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 small structure
ab90: 73 20 72 69 67 68 74 2d 61 64 6a 75 73 74 65 64 s right-adjusted
aba0: 2e 20 2a 2f 09 5c 0a 20 20 20 20 20 20 5f 5f 76 . */.\. __v
abb0: 61 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 a_arg_rightadjus
abc0: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
abd0: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
abe0: 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a 23 .\. )).#endif.#
abf0: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 if defined(__pow
ac00: 65 72 70 63 5f 5f 29 20 26 26 20 21 64 65 66 69 erpc__) && !defi
ac10: 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f ned(__powerpc64_
ac20: 5f 29 20 26 26 20 28 64 65 66 69 6e 65 64 28 5f _) && (defined(_
ac30: 41 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 AIX) || (defined
ac40: 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 (__MACH__) && de
ac50: 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 fined(__APPLE__)
ac60: 29 29 0a 2f 2a 20 73 6d 61 6c 6c 20 73 74 72 75 ))./* small stru
ac70: 63 74 75 72 65 73 20 3c 20 31 20 77 6f 72 64 20 ctures < 1 word
ac80: 61 72 65 20 61 64 6a 75 73 74 65 64 20 64 65 70 are adjusted dep
ac90: 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c ending on compil
aca0: 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f er */.#define __
acb0: 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 va_arg_struct(LI
acc0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
acd0: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 5f E_ALIGN) \. (_
ace0: 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 75 63 74 _va_align_struct
acf0: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
ad00: 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 09 5c TYPE_ALIGN)....\
ad10: 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 . ((LIST)->fla
ad20: 67 73 20 26 20 5f 5f 56 41 5f 41 49 58 43 43 5f gs & __VA_AIXCC_
ad30: 53 54 52 55 43 54 5f 41 52 47 53 09 09 09 09 5c STRUCT_ARGS....\
ad40: 0a 20 20 20 20 3f 20 2f 2a 20 41 49 58 20 63 63 . ? /* AIX cc
ad50: 20 61 6e 64 20 78 6c 63 20 70 61 73 73 20 73 6d and xlc pass sm
ad60: 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 6c all structures l
ad70: 65 66 74 2d 61 64 6a 75 73 74 65 64 2c 20 61 6c eft-adjusted, al
ad80: 74 68 6f 75 67 68 20 62 69 67 2d 65 6e 64 69 61 though big-endia
ad90: 6e 21 20 2a 2f 5c 0a 20 20 20 20 20 20 5f 5f 76 n! */\. __v
ada0: 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 a_arg_leftadjust
adb0: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
adc0: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 E,TYPE_ALIGN)...
add0: 5c 0a 20 20 20 20 3a 20 2f 2a 20 67 63 63 20 70 \. : /* gcc p
ade0: 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 74 72 75 asses small stru
adf0: 63 74 75 72 65 73 20 72 69 67 68 74 2d 61 64 6a ctures right-adj
ae00: 75 73 74 65 64 2e 20 2a 2f 09 09 09 5c 0a 20 20 usted. */...\.
ae10: 20 20 20 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 __va_arg_rig
ae20: 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c htadjusted(LIST,
ae30: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
ae40: 4c 49 47 4e 29 09 09 09 5c 0a 20 20 29 29 0a 23 LIGN)...\. )).#
ae50: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
ae60: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 d(__powerpc__) &
ae70: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 & !defined(__pow
ae80: 65 72 70 63 36 34 5f 5f 29 20 26 26 20 21 28 64 erpc64__) && !(d
ae90: 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c 20 efined(_AIX) ||
aea0: 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 5f (defined(__MACH_
aeb0: 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f 5f _) && defined(__
aec0: 41 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a 20 53 74 APPLE__)))./* St
aed0: 72 75 63 74 75 72 65 73 20 61 72 65 20 70 61 73 ructures are pas
aee0: 73 65 64 20 61 73 20 70 6f 69 6e 74 65 72 73 20 sed as pointers
aef0: 74 6f 20 63 61 6c 6c 65 72 2d 6d 61 64 65 20 6c to caller-made l
af00: 6f 63 61 6c 20 63 6f 70 69 65 73 2e 20 2a 2f 0a ocal copies. */.
af10: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 #define __va_arg
af20: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
af30: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
af40: 4e 29 20 20 5c 0a 20 20 76 61 5f 61 72 67 5f 70 N) \. va_arg_p
af50: 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a 29 0a 23 tr(LIST,void*).#
af60: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
af70: 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 d(__sparc__) &&
af80: 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 !defined(__sparc
af90: 36 34 5f 5f 29 0a 2f 2a 20 53 74 72 75 63 74 75 64__)./* Structu
afa0: 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 61 res are passed a
afb0: 73 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 61 s pointers to ca
afc0: 6c 6c 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c 20 ller-made local
afd0: 63 6f 70 69 65 73 2e 20 2a 2f 0a 23 64 65 66 69 copies. */.#defi
afe0: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 ne __va_arg_stru
aff0: 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ct(LIST,TYPE_SIZ
b000: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
b010: 0a 20 20 76 61 5f 61 72 67 5f 70 74 72 28 4c 49 . va_arg_ptr(LI
b020: 53 54 2c 76 6f 69 64 2a 29 0a 23 65 6e 64 69 66 ST,void*).#endif
b030: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 .#if defined(__s
b040: 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 53 6d 61 parc64__)./* Sma
b050: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 61 72 ll structures ar
b060: 65 20 70 61 73 73 65 64 20 6c 65 66 74 2d 61 64 e passed left-ad
b070: 6a 75 73 74 65 64 2c 20 61 6c 74 68 6f 75 67 68 justed, although
b080: 20 62 69 67 2d 65 6e 64 69 61 6e 21 20 2a 2f 0a big-endian! */.
b090: 2f 2a 20 42 69 67 20 73 74 72 75 63 74 75 72 65 /* Big structure
b0a0: 73 20 61 72 65 20 70 61 73 73 65 64 20 61 73 20 s are passed as
b0b0: 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 61 6c 6c pointers to call
b0c0: 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c 20 63 6f er-made local co
b0d0: 70 69 65 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 pies. */.#define
b0e0: 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 __va_arg_struct
b0f0: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
b100: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
b110: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3c 3d ((TYPE_SIZE) <=
b120: 20 31 36 09 09 09 09 09 09 09 5c 0a 20 20 20 3f 16.......\. ?
b130: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 (__va_align_str
b140: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 uct(LIST,TYPE_SI
b150: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
b160: 09 5c 0a 20 20 20 20 20 20 5f 5f 76 61 5f 61 72 .\. __va_ar
b170: 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c g_leftadjusted(L
b180: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
b190: 50 45 5f 41 4c 49 47 4e 29 29 09 09 09 5c 0a 20 PE_ALIGN))...\.
b1a0: 20 20 3a 20 76 61 5f 61 72 67 5f 70 74 72 28 4c : va_arg_ptr(L
b1b0: 49 53 54 2c 76 6f 69 64 2a 29 09 09 09 09 09 09 IST,void*)......
b1c0: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
b1d0: 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f defined(__s390_
b1e0: 5f 29 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 73 _)./* Structures
b1f0: 20 3c 3d 20 38 20 62 79 74 65 73 20 61 72 65 20 <= 8 bytes are
b200: 70 61 73 73 65 64 20 61 73 20 65 6d 62 65 64 64 passed as embedd
b210: 65 64 20 63 6f 70 69 65 73 20 6f 6e 20 74 68 65 ed copies on the
b220: 20 61 72 67 20 73 74 61 63 6b 2e 0a 20 2a 20 42 arg stack.. * B
b230: 69 67 20 73 74 72 75 63 74 75 72 65 73 20 61 72 ig structures ar
b240: 65 20 70 61 73 73 65 64 20 61 73 20 70 6f 69 6e e passed as poin
b250: 74 65 72 73 20 74 6f 20 63 61 6c 6c 65 72 2d 6d ters to caller-m
b260: 61 64 65 20 6c 6f 63 61 6c 20 63 6f 70 69 65 73 ade local copies
b270: 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f .. */.#define __
b280: 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 va_arg_struct(LI
b290: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
b2a0: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 E_ALIGN) \. ((
b2b0: 54 59 50 45 5f 53 49 5a 45 29 20 21 3d 20 31 20 TYPE_SIZE) != 1
b2c0: 26 26 20 28 54 59 50 45 5f 53 49 5a 45 29 20 21 && (TYPE_SIZE) !
b2d0: 3d 20 32 20 26 26 20 28 54 59 50 45 5f 53 49 5a = 2 && (TYPE_SIZ
b2e0: 45 29 20 21 3d 20 34 20 26 26 20 28 54 59 50 45 E) != 4 && (TYPE
b2f0: 5f 53 49 5a 45 29 20 21 3d 20 38 20 5c 0a 20 20 _SIZE) != 8 \.
b300: 20 3f 20 76 61 5f 61 72 67 5f 70 74 72 28 4c 49 ? va_arg_ptr(LI
b310: 53 54 2c 76 6f 69 64 2a 29 09 09 09 09 09 09 5c ST,void*)......\
b320: 0a 20 20 20 3a 20 28 76 6f 69 64 2a 29 5f 5f 76 . : (void*)__v
b330: 61 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 a_arg_rightadjus
b340: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
b350: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
b360: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
b370: 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f defined(__hppa_
b380: 5f 29 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 73 _)./* Structures
b390: 20 3c 3d 20 38 20 62 79 74 65 73 20 61 72 65 20 <= 8 bytes are
b3a0: 70 61 73 73 65 64 20 61 73 20 65 6d 62 65 64 64 passed as embedd
b3b0: 65 64 20 63 6f 70 69 65 73 20 6f 6e 20 74 68 65 ed copies on the
b3c0: 20 61 72 67 20 73 74 61 63 6b 2e 0a 20 2a 20 42 arg stack.. * B
b3d0: 69 67 20 73 74 72 75 63 74 75 72 65 73 20 61 72 ig structures ar
b3e0: 65 20 70 61 73 73 65 64 20 61 73 20 70 6f 69 6e e passed as poin
b3f0: 74 65 72 73 20 74 6f 20 63 61 6c 6c 65 72 2d 6d ters to caller-m
b400: 61 64 65 20 6c 6f 63 61 6c 20 63 6f 70 69 65 73 ade local copies
b410: 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f .. */.#define __
b420: 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 va_arg_struct(LI
b430: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
b440: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 E_ALIGN) \. ((
b450: 54 59 50 45 5f 53 49 5a 45 29 20 3e 20 38 09 09 TYPE_SIZE) > 8..
b460: 09 09 09 09 09 5c 0a 20 20 20 3f 20 76 61 5f 61 .....\. ? va_a
b470: 72 67 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 rg_ptr(LIST,void
b480: 2a 29 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 2f *)......\. : /
b490: 2a 20 46 49 58 4d 45 3a 20 67 63 63 2d 32 2e 36 * FIXME: gcc-2.6
b4a0: 2e 33 20 70 61 73 73 65 73 20 73 74 72 75 63 74 .3 passes struct
b4b0: 75 72 65 73 20 3c 3d 20 34 20 62 79 74 65 73 20 ures <= 4 bytes
b4c0: 69 6e 20 6d 65 6d 6f 72 79 20 6c 65 66 74 2d 61 in memory left-a
b4d0: 64 6a 75 73 74 65 64 21 20 3f 3f 20 2a 2f 5c 0a djusted! ?? */\.
b4e0: 20 20 20 20 20 28 76 6f 69 64 2a 29 5f 5f 76 61 (void*)__va
b4f0: 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 _arg_rightadjust
b500: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
b510: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 5c E,TYPE_ALIGN)..\
b520: 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 . ).#endif.#if
b530: 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f defined(__ia64__
b540: 29 20 26 26 20 28 21 64 65 66 69 6e 65 64 28 5f ) && (!defined(_
b550: 5f 47 4e 55 43 5f 5f 29 20 7c 7c 20 28 5f 5f 47 _GNUC__) || (__G
b560: 4e 55 43 5f 5f 20 3c 20 33 29 29 0a 2f 2a 20 54 NUC__ < 3))./* T
b570: 79 70 65 73 20 6c 61 72 67 65 72 20 74 68 61 6e ypes larger than
b580: 20 61 20 77 6f 72 64 20 68 61 76 65 20 32 2d 77 a word have 2-w
b590: 6f 72 64 20 61 6c 69 67 6e 6d 65 6e 74 2e 20 2a ord alignment. *
b5a0: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
b5b0: 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 rg_struct(LIST,T
b5c0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
b5d0: 49 47 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f IGN) \. (__va_
b5e0: 61 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 align_struct(LIS
b5f0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
b600: 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 20 _ALIGN)....\.
b610: 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3e 20 73 ((TYPE_SIZE) > s
b620: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 izeof(__vaword)
b630: 26 26 20 28 28 28 5f 5f 76 61 77 6f 72 64 2a 29 && (((__vaword*)
b640: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 (LIST)->aptr - (
b650: 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 26 20 LIST)->saptr) &
b660: 31 29 20 3f 20 28 4c 49 53 54 29 2d 3e 61 70 74 1) ? (LIST)->apt
b670: 72 20 2b 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 r += sizeof(__va
b680: 77 6f 72 64 29 20 3a 20 30 29 2c 20 5c 0a 20 20 word) : 0), \.
b690: 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 __va_arg_adjust
b6a0: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
b6b0: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 E,TYPE_ALIGN)...
b6c0: 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 0a 0a .\. ).#endif...
b6d0: 2f 2a 0a 20 2a 20 44 65 66 69 6e 69 74 69 6f 6e /*. * Definition
b6e0: 20 6f 66 20 74 68 65 20 76 61 5f 72 65 74 75 72 of the va_retur
b6f0: 6e 5f 78 78 78 20 6d 61 63 72 6f 73 2e 0a 20 2a n_xxx macros.. *
b700: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 /.#define __va_r
b710: 65 74 75 72 6e 28 4c 49 53 54 2c 52 45 54 54 59 eturn(LIST,RETTY
b720: 50 45 29 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 PE) \. (((LIST
b730: 29 2d 3e 72 74 79 70 65 20 3d 3d 20 28 52 45 54 )->rtype == (RET
b740: 54 59 50 45 29 29 20 7c 7c 20 5f 5f 76 61 5f 65 TYPE)) || __va_e
b750: 72 72 6f 72 31 28 28 4c 49 53 54 29 2d 3e 72 74 rror1((LIST)->rt
b760: 79 70 65 2c 52 45 54 54 59 50 45 29 29 0a 23 64 ype,RETTYPE)).#d
b770: 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f efine va_return_
b780: 76 6f 69 64 28 4c 49 53 54 29 20 20 5c 0a 20 20 void(LIST) \.
b790: 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 __va_return(LIST
b7a0: 2c 5f 5f 56 41 76 6f 69 64 29 0a 23 64 65 66 69 ,__VAvoid).#defi
b7b0: 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 63 68 61 ne va_return_cha
b7c0: 72 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 r(LIST,VAL) \.
b7d0: 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 (__va_return(LI
b7e0: 53 54 2c 5f 5f 56 41 63 68 61 72 29 2c 20 28 4c ST,__VAchar), (L
b7f0: 49 53 54 29 2d 3e 74 6d 70 2e 5f 63 68 61 72 20 IST)->tmp._char
b800: 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 = (VAL)).#define
b810: 20 76 61 5f 72 65 74 75 72 6e 5f 73 63 68 61 72 va_return_schar
b820: 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 (LIST,VAL) \.
b830: 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 (__va_return(LIS
b840: 54 2c 5f 5f 56 41 73 63 68 61 72 29 2c 20 28 4c T,__VAschar), (L
b850: 49 53 54 29 2d 3e 74 6d 70 2e 5f 73 63 68 61 72 IST)->tmp._schar
b860: 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e = (VAL)).#defin
b870: 65 20 76 61 5f 72 65 74 75 72 6e 5f 75 63 68 61 e va_return_ucha
b880: 72 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 r(LIST,VAL) \.
b890: 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 (__va_return(LI
b8a0: 53 54 2c 5f 5f 56 41 75 63 68 61 72 29 2c 20 28 ST,__VAuchar), (
b8b0: 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 75 63 68 61 LIST)->tmp._ucha
b8c0: 72 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 r = (VAL)).#defi
b8d0: 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 73 68 6f ne va_return_sho
b8e0: 72 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a rt(LIST,VAL) \.
b8f0: 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c (__va_return(L
b900: 49 53 54 2c 5f 5f 56 41 73 68 6f 72 74 29 2c 20 IST,__VAshort),
b910: 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 73 68 6f (LIST)->tmp._sho
b920: 72 74 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 rt = (VAL)).#def
b930: 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 75 73 ine va_return_us
b940: 68 6f 72 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 hort(LIST,VAL)
b950: 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e \. (__va_return
b960: 28 4c 49 53 54 2c 5f 5f 56 41 75 73 68 6f 72 74 (LIST,__VAushort
b970: 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f ), (LIST)->tmp._
b980: 75 73 68 6f 72 74 20 3d 20 28 56 41 4c 29 29 0a ushort = (VAL)).
b990: 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 #define va_retur
b9a0: 6e 5f 69 6e 74 28 4c 49 53 54 2c 56 41 4c 29 20 n_int(LIST,VAL)
b9b0: 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 \. (__va_retur
b9c0: 6e 28 4c 49 53 54 2c 5f 5f 56 41 69 6e 74 29 2c n(LIST,__VAint),
b9d0: 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 69 6e (LIST)->tmp._in
b9e0: 74 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 t = (VAL)).#defi
b9f0: 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 75 69 6e ne va_return_uin
ba00: 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 t(LIST,VAL) \.
ba10: 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 (__va_return(LI
ba20: 53 54 2c 5f 5f 56 41 75 69 6e 74 29 2c 20 28 4c ST,__VAuint), (L
ba30: 49 53 54 29 2d 3e 74 6d 70 2e 5f 75 69 6e 74 20 IST)->tmp._uint
ba40: 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 = (VAL)).#define
ba50: 20 76 61 5f 72 65 74 75 72 6e 5f 6c 6f 6e 67 28 va_return_long(
ba60: 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 LIST,VAL) \. (
ba70: 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 __va_return(LIST
ba80: 2c 5f 5f 56 41 6c 6f 6e 67 29 2c 20 28 4c 49 53 ,__VAlong), (LIS
ba90: 54 29 2d 3e 74 6d 70 2e 5f 6c 6f 6e 67 20 3d 20 T)->tmp._long =
baa0: 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 (VAL)).#define v
bab0: 61 5f 72 65 74 75 72 6e 5f 75 6c 6f 6e 67 28 4c a_return_ulong(L
bac0: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
bad0: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
bae0: 5f 5f 56 41 75 6c 6f 6e 67 29 2c 20 28 4c 49 53 __VAulong), (LIS
baf0: 54 29 2d 3e 74 6d 70 2e 5f 75 6c 6f 6e 67 20 3d T)->tmp._ulong =
bb00: 20 28 56 41 4c 29 29 0a 23 69 66 20 64 65 66 69 (VAL)).#if defi
bb10: 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 ned(__mips64__)
bb20: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 || defined(__spa
bb30: 72 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e rc64__) || defin
bb40: 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c ed(__alpha__) ||
bb50: 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 defined(__power
bb60: 70 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e pc64__) || defin
bb70: 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 ed(__ia64__) ||
bb80: 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 defined(__x86_64
bb90: 5f 5f 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 __).#define va_r
bba0: 65 74 75 72 6e 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c eturn_longlong(L
bbb0: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
bbc0: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
bbd0: 5f 5f 56 41 6c 6f 6e 67 6c 6f 6e 67 29 2c 20 28 __VAlonglong), (
bbe0: 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 6c 6f 6e 67 LIST)->tmp._long
bbf0: 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e = (VAL)).#defin
bc00: 65 20 76 61 5f 72 65 74 75 72 6e 5f 75 6c 6f 6e e va_return_ulon
bc10: 67 6c 6f 6e 67 28 4c 49 53 54 2c 56 41 4c 29 20 glong(LIST,VAL)
bc20: 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 \. (__va_retur
bc30: 6e 28 4c 49 53 54 2c 5f 5f 56 41 75 6c 6f 6e 67 n(LIST,__VAulong
bc40: 6c 6f 6e 67 29 2c 20 28 4c 49 53 54 29 2d 3e 74 long), (LIST)->t
bc50: 6d 70 2e 5f 75 6c 6f 6e 67 20 3d 20 28 56 41 4c mp._ulong = (VAL
bc60: 29 29 0a 23 65 6c 73 65 0a 23 64 65 66 69 6e 65 )).#else.#define
bc70: 20 76 61 5f 72 65 74 75 72 6e 5f 6c 6f 6e 67 6c va_return_longl
bc80: 6f 6e 67 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c ong(LIST,VAL) \
bc90: 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 . (__va_return(
bca0: 4c 49 53 54 2c 5f 5f 56 41 6c 6f 6e 67 6c 6f 6e LIST,__VAlonglon
bcb0: 67 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e g), (LIST)->tmp.
bcc0: 5f 6c 6f 6e 67 6c 6f 6e 67 20 3d 20 28 56 41 4c _longlong = (VAL
bcd0: 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 )).#define va_re
bce0: 74 75 72 6e 5f 75 6c 6f 6e 67 6c 6f 6e 67 28 4c turn_ulonglong(L
bcf0: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
bd00: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
bd10: 5f 5f 56 41 75 6c 6f 6e 67 6c 6f 6e 67 29 2c 20 __VAulonglong),
bd20: 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 75 6c 6f (LIST)->tmp._ulo
bd30: 6e 67 6c 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a nglong = (VAL)).
bd40: 23 65 6e 64 69 66 0a 23 64 65 66 69 6e 65 20 76 #endif.#define v
bd50: 61 5f 72 65 74 75 72 6e 5f 66 6c 6f 61 74 28 4c a_return_float(L
bd60: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
bd70: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
bd80: 5f 5f 56 41 66 6c 6f 61 74 29 2c 20 28 4c 49 53 __VAfloat), (LIS
bd90: 54 29 2d 3e 74 6d 70 2e 5f 66 6c 6f 61 74 20 3d T)->tmp._float =
bda0: 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 (VAL)).#define
bdb0: 76 61 5f 72 65 74 75 72 6e 5f 64 6f 75 62 6c 65 va_return_double
bdc0: 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 (LIST,VAL) \.
bdd0: 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 (__va_return(LIS
bde0: 54 2c 5f 5f 56 41 64 6f 75 62 6c 65 29 2c 20 28 T,__VAdouble), (
bdf0: 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 64 6f 75 62 LIST)->tmp._doub
be00: 6c 65 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 le = (VAL)).#def
be10: 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 70 74 ine va_return_pt
be20: 72 28 4c 49 53 54 2c 54 59 50 45 2c 56 41 4c 29 r(LIST,TYPE,VAL)
be30: 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 \. (__va_retu
be40: 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 76 6f 69 64 rn(LIST,__VAvoid
be50: 70 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e p), (LIST)->tmp.
be60: 5f 70 74 72 20 3d 20 28 76 6f 69 64 2a 29 28 54 _ptr = (void*)(T
be70: 59 50 45 29 28 56 41 4c 29 29 0a 23 64 65 66 69 YPE)(VAL)).#defi
be80: 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 73 74 72 ne va_return_str
be90: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 2c 56 41 uct(LIST,TYPE,VA
bea0: 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 L) \. (__va_re
beb0: 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 73 74 turn(LIST,__VAst
bec0: 72 75 63 74 29 2c 20 2a 28 54 59 50 45 2a 29 28 ruct), *(TYPE*)(
bed0: 28 4c 49 53 54 29 2d 3e 72 61 64 64 72 29 20 3d (LIST)->raddr) =
bee0: 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 (VAL)).#define
bef0: 5f 76 61 5f 72 65 74 75 72 6e 5f 73 74 72 75 63 _va_return_struc
bf00: 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 t(LIST,TYPE_SIZE
bf10: 2c 54 59 50 45 5f 41 4c 49 47 4e 2c 56 41 4c 5f ,TYPE_ALIGN,VAL_
bf20: 41 44 44 52 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ADDR) \. (__va
bf30: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
bf40: 41 73 74 72 75 63 74 29 2c 09 09 09 09 09 5c 0a Astruct),.....\.
bf50: 20 20 20 5f 5f 73 74 72 75 63 74 63 70 79 28 28 __structcpy((
bf60: 76 6f 69 64 2a 29 28 28 4c 49 53 54 29 2d 3e 72 void*)((LIST)->r
bf70: 61 64 64 72 29 2c 56 41 4c 5f 41 44 44 52 2c 54 addr),VAL_ADDR,T
bf80: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
bf90: 49 47 4e 29 09 5c 0a 20 20 29 0a 0a 0a 2f 2a 20 IGN).\. ).../*
bfa0: 44 65 74 65 72 6d 69 6e 65 20 77 68 65 74 68 65 Determine whethe
bfb0: 72 20 61 20 73 74 72 75 63 74 20 74 79 70 65 20 r a struct type
bfc0: 69 73 20 77 6f 72 64 2d 73 70 6c 69 74 74 61 62 is word-splittab
bfd0: 6c 65 2c 20 69 2e 65 2e 20 77 68 65 74 68 65 72 le, i.e. whether
bfe0: 20 65 61 63 68 20 6f 66 0a 20 2a 20 69 74 73 20 each of. * its
bff0: 63 6f 6d 70 6f 6e 65 6e 74 73 20 66 69 74 20 69 components fit i
c000: 6e 74 6f 20 61 20 72 65 67 69 73 74 65 72 2e 0a nto a register..
c010: 20 2a 20 54 68 65 20 65 6e 74 69 72 65 20 63 6f * The entire co
c020: 6d 70 75 74 61 74 69 6f 6e 20 69 73 20 64 6f 6e mputation is don
c030: 65 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d e at compile tim
c040: 65 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 e.. */.#define v
c050: 61 5f 77 6f 72 64 5f 73 70 6c 69 74 74 61 62 6c a_word_splittabl
c060: 65 5f 31 28 73 6c 6f 74 31 29 20 20 5c 0a 20 20 e_1(slot1) \.
c070: 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c (__va_offset1(sl
c080: 6f 74 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 ot1)/sizeof(__va
c090: 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f word) == (__va_o
c0a0: 66 66 73 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 ffset1(slot1)+si
c0b0: 7a 65 6f 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 zeof(slot1)-1)/s
c0c0: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 izeof(__vaword))
c0d0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 77 6f 72 64 .#define va_word
c0e0: 5f 73 70 6c 69 74 74 61 62 6c 65 5f 32 28 73 6c _splittable_2(sl
c0f0: 6f 74 31 2c 73 6c 6f 74 32 29 20 20 5c 0a 20 20 ot1,slot2) \.
c100: 28 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 ((__va_offset1(s
c110: 6c 6f 74 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 lot1)/sizeof(__v
c120: 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f aword) == (__va_
c130: 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 29 2b 73 offset1(slot1)+s
c140: 69 7a 65 6f 66 28 73 6c 6f 74 31 29 2d 31 29 2f izeof(slot1)-1)/
c150: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
c160: 29 20 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f ) \. && (__va_
c170: 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c offset2(slot1,sl
c180: 6f 74 32 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 ot2)/sizeof(__va
c190: 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f word) == (__va_o
c1a0: 66 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f ffset2(slot1,slo
c1b0: 74 32 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 32 t2)+sizeof(slot2
c1c0: 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 )-1)/sizeof(__va
c1d0: 77 6f 72 64 29 29 20 5c 0a 20 20 29 0a 23 64 65 word)) \. ).#de
c1e0: 66 69 6e 65 20 76 61 5f 77 6f 72 64 5f 73 70 6c fine va_word_spl
c1f0: 69 74 74 61 62 6c 65 5f 33 28 73 6c 6f 74 31 2c ittable_3(slot1,
c200: 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 20 20 5c 0a slot2,slot3) \.
c210: 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 ((__va_offset1
c220: 28 73 6c 6f 74 31 29 2f 73 69 7a 65 6f 66 28 5f (slot1)/sizeof(_
c230: 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 _vaword) == (__v
c240: 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 29 a_offset1(slot1)
c250: 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 31 29 2d 31 +sizeof(slot1)-1
c260: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
c270: 64 29 29 20 5c 0a 20 20 20 26 26 20 28 5f 5f 76 d)) \. && (__v
c280: 61 5f 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 2c a_offset2(slot1,
c290: 73 6c 6f 74 32 29 2f 73 69 7a 65 6f 66 28 5f 5f slot2)/sizeof(__
c2a0: 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 vaword) == (__va
c2b0: 5f 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 _offset2(slot1,s
c2c0: 6c 6f 74 32 29 2b 73 69 7a 65 6f 66 28 73 6c 6f lot2)+sizeof(slo
c2d0: 74 32 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f t2)-1)/sizeof(__
c2e0: 76 61 77 6f 72 64 29 29 20 5c 0a 20 20 20 26 26 vaword)) \. &&
c2f0: 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 33 28 73 (__va_offset3(s
c300: 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 lot1,slot2,slot3
c310: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
c320: 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 d) == (__va_offs
c330: 65 74 33 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c et3(slot1,slot2,
c340: 73 6c 6f 74 33 29 2b 73 69 7a 65 6f 66 28 73 6c slot3)+sizeof(sl
c350: 6f 74 33 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f ot3)-1)/sizeof(_
c360: 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 20 29 0a _vaword)) \. ).
c370: 23 64 65 66 69 6e 65 20 76 61 5f 77 6f 72 64 5f #define va_word_
c380: 73 70 6c 69 74 74 61 62 6c 65 5f 34 28 73 6c 6f splittable_4(slo
c390: 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 2c 73 t1,slot2,slot3,s
c3a0: 6c 6f 74 34 29 20 20 5c 0a 20 20 28 28 5f 5f 76 lot4) \. ((__v
c3b0: 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 29 a_offset1(slot1)
c3c0: 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 /sizeof(__vaword
c3d0: 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 ) == (__va_offse
c3e0: 74 31 28 73 6c 6f 74 31 29 2b 73 69 7a 65 6f 66 t1(slot1)+sizeof
c3f0: 28 73 6c 6f 74 31 29 2d 31 29 2f 73 69 7a 65 6f (slot1)-1)/sizeo
c400: 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 f(__vaword)) \.
c410: 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 66 73 65 && (__va_offse
c420: 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 2f t2(slot1,slot2)/
c430: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
c440: 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 == (__va_offset
c450: 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 2b 73 2(slot1,slot2)+s
c460: 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2d 31 29 2f izeof(slot2)-1)/
c470: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
c480: 29 20 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f ) \. && (__va_
c490: 6f 66 66 73 65 74 33 28 73 6c 6f 74 31 2c 73 6c offset3(slot1,sl
c4a0: 6f 74 32 2c 73 6c 6f 74 33 29 2f 73 69 7a 65 6f ot2,slot3)/sizeo
c4b0: 66 28 5f 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 f(__vaword) == (
c4c0: 5f 5f 76 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f __va_offset3(slo
c4d0: 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 2b t1,slot2,slot3)+
c4e0: 73 69 7a 65 6f 66 28 73 6c 6f 74 33 29 2d 31 29 sizeof(slot3)-1)
c4f0: 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 /sizeof(__vaword
c500: 29 29 20 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 )) \. && (__va
c510: 5f 6f 66 66 73 65 74 34 28 73 6c 6f 74 31 2c 73 _offset4(slot1,s
c520: 6c 6f 74 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 34 lot2,slot3,slot4
c530: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
c540: 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 d) == (__va_offs
c550: 65 74 34 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c et4(slot1,slot2,
c560: 73 6c 6f 74 33 2c 73 6c 6f 74 34 29 2b 73 69 7a slot3,slot4)+siz
c570: 65 6f 66 28 73 6c 6f 74 34 29 2d 31 29 2f 73 69 eof(slot4)-1)/si
c580: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 zeof(__vaword))
c590: 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f \. ).#define __
c5a0: 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 va_offset1(slot1
c5b0: 29 20 20 5c 0a 20 20 30 0a 23 64 65 66 69 6e 65 ) \. 0.#define
c5c0: 20 5f 5f 76 61 5f 6f 66 66 73 65 74 32 28 73 6c __va_offset2(sl
c5d0: 6f 74 31 2c 73 6c 6f 74 32 29 20 20 5c 0a 20 20 ot1,slot2) \.
c5e0: 28 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 ((__va_offset1(s
c5f0: 6c 6f 74 31 29 2b 73 69 7a 65 6f 66 28 73 6c 6f lot1)+sizeof(slo
c600: 74 31 29 2b 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 t1)+__VA_alignof
c610: 28 73 6c 6f 74 32 29 2d 31 29 20 26 20 2d 28 6c (slot2)-1) & -(l
c620: 6f 6e 67 29 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 ong)__VA_alignof
c630: 28 73 6c 6f 74 32 29 29 0a 23 64 65 66 69 6e 65 (slot2)).#define
c640: 20 5f 5f 76 61 5f 6f 66 66 73 65 74 33 28 73 6c __va_offset3(sl
c650: 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 ot1,slot2,slot3)
c660: 20 20 5c 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 \. ((__va_off
c670: 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 set2(slot1,slot2
c680: 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2b )+sizeof(slot2)+
c690: 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 73 6c 6f __VA_alignof(slo
c6a0: 74 33 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 t3)-1) & -(long)
c6b0: 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 73 6c 6f __VA_alignof(slo
c6c0: 74 33 29 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 t3)).#define __v
c6d0: 61 5f 6f 66 66 73 65 74 34 28 73 6c 6f 74 31 2c a_offset4(slot1,
c6e0: 73 6c 6f 74 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 slot2,slot3,slot
c6f0: 34 29 20 20 5c 0a 20 20 28 28 5f 5f 76 61 5f 6f 4) \. ((__va_o
c700: 66 66 73 65 74 33 28 73 6c 6f 74 31 2c 73 6c 6f ffset3(slot1,slo
c710: 74 32 2c 73 6c 6f 74 33 29 2b 73 69 7a 65 6f 66 t2,slot3)+sizeof
c720: 28 73 6c 6f 74 33 29 2b 5f 5f 56 41 5f 61 6c 69 (slot3)+__VA_ali
c730: 67 6e 6f 66 28 73 6c 6f 74 34 29 2d 31 29 20 26 gnof(slot4)-1) &
c740: 20 2d 28 6c 6f 6e 67 29 5f 5f 56 41 5f 61 6c 69 -(long)__VA_ali
c750: 67 6e 6f 66 28 73 6c 6f 74 34 29 29 0a 0a 0a 2f gnof(slot4)).../
c760: 2a 0a 20 2a 20 4d 69 73 63 65 6c 6c 61 6e 65 6f *. * Miscellaneo
c770: 75 73 20 64 65 63 6c 61 72 61 74 69 6f 6e 73 2e us declarations.
c780: 0a 20 2a 2f 0a 23 69 66 64 65 66 20 5f 5f 63 70 . */.#ifdef __cp
c790: 6c 75 73 70 6c 75 73 0a 65 78 74 65 72 6e 20 22 lusplus.extern "
c7a0: 43 22 20 76 6f 69 64 20 5f 5f 76 61 63 61 6c 6c C" void __vacall
c7b0: 5f 72 20 28 29 3b 20 2f 2a 20 74 68 65 20 72 65 _r (); /* the re
c7c0: 74 75 72 6e 20 74 79 70 65 20 69 73 20 76 61 72 turn type is var
c7d0: 69 61 62 6c 65 2c 20 6e 6f 74 20 76 6f 69 64 21 iable, not void!
c7e0: 20 2a 2f 0a 23 65 6c 73 65 0a 65 78 74 65 72 6e */.#else.extern
c7f0: 20 76 6f 69 64 20 5f 5f 76 61 63 61 6c 6c 5f 72 void __vacall_r
c800: 20 28 29 3b 20 2f 2a 20 74 68 65 20 72 65 74 75 (); /* the retu
c810: 72 6e 20 74 79 70 65 20 69 73 20 76 61 72 69 61 rn type is varia
c820: 62 6c 65 2c 20 6e 6f 74 20 76 6f 69 64 21 20 2a ble, not void! *
c830: 2f 0a 23 65 6e 64 69 66 0a 65 78 74 65 72 6e 20 /.#endif.extern
c840: 69 6e 74 20 5f 5f 76 61 5f 65 72 72 6f 72 31 20 int __va_error1
c850: 28 65 6e 75 6d 20 5f 5f 56 41 74 79 70 65 2c 20 (enum __VAtype,
c860: 65 6e 75 6d 20 5f 5f 56 41 74 79 70 65 29 3b 0a enum __VAtype);.
c870: 65 78 74 65 72 6e 20 69 6e 74 20 5f 5f 76 61 5f extern int __va_
c880: 65 72 72 6f 72 32 20 28 75 6e 73 69 67 6e 65 64 error2 (unsigned
c890: 20 69 6e 74 29 3b 0a 65 78 74 65 72 6e 20 76 6f int);.extern vo
c8a0: 69 64 20 5f 5f 73 74 72 75 63 74 63 70 79 20 28 id __structcpy (
c8b0: 76 6f 69 64 2a 20 64 65 73 74 2c 20 63 6f 6e 73 void* dest, cons
c8c0: 74 20 76 6f 69 64 2a 20 73 72 63 2c 20 75 6e 73 t void* src, uns
c8d0: 69 67 6e 65 64 20 6c 6f 6e 67 20 73 69 7a 65 2c igned long size,
c8e0: 20 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 61 unsigned long a
c8f0: 6c 69 67 6e 6d 65 6e 74 29 3b 0a 74 79 70 65 64 lignment);.typed
c900: 65 66 20 75 6e 69 6f 6e 20 7b 20 5f 5f 76 61 77 ef union { __vaw
c910: 6f 72 64 20 72 6f 6f 6d 5b 5f 5f 56 41 5f 41 4c ord room[__VA_AL
c920: 49 53 54 5f 57 4f 52 44 53 5d 3b 20 64 6f 75 62 IST_WORDS]; doub
c930: 6c 65 20 61 6c 69 67 6e 3b 20 7d 20 5f 5f 76 61 le align; } __va
c940: 5f 73 74 72 75 63 74 5f 62 75 66 66 65 72 5f 74 _struct_buffer_t
c950: 3b 0a 65 78 74 65 72 6e 20 5f 5f 76 61 5f 73 74 ;.extern __va_st
c960: 72 75 63 74 5f 62 75 66 66 65 72 5f 74 20 5f 5f ruct_buffer_t __
c970: 76 61 5f 73 74 72 75 63 74 5f 62 75 66 66 65 72 va_struct_buffer
c980: 3b 0a 0a 0a 23 65 6e 64 69 66 20 2f 2a 20 5f 56 ;...#endif /* _V
c990: 41 43 41 4c 4c 5f 52 5f 48 20 2a 2f 0a ACALL_R_H */.