0000: 23 69 66 6e 64 65 66 20 5f 56 41 43 41 4c 4c 5f #ifndef _VACALL_
0010: 48 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 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 48 0a efine _VACALL_H.
0050: 0a 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 ./*. * Copyright
0060: 20 31 39 39 35 2d 32 30 30 36 20 42 72 75 6e 6f 1995-2006 Bruno
0070: 20 48 61 69 62 6c 65 2c 20 3c 62 72 75 6e 6f 40 Haible, <bruno@
0080: 63 6c 69 73 70 2e 6f 72 67 3e 0a 20 2a 0a 20 2a clisp.org>. *. *
0090: 20 54 68 69 73 20 69 73 20 66 72 65 65 20 73 6f This is free so
00a0: 66 74 77 61 72 65 20 64 69 73 74 72 69 62 75 74 ftware distribut
00b0: 65 64 20 75 6e 64 65 72 20 74 68 65 20 47 4e 55 ed under the GNU
00c0: 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 General Public
00d0: 4c 69 63 65 6e 63 65 0a 20 2a 20 64 65 73 63 72 Licence. * descr
00e0: 69 62 65 64 20 69 6e 20 74 68 65 20 66 69 6c 65 ibed in the file
00f0: 20 43 4f 50 59 49 4e 47 2e 20 43 6f 6e 74 61 63 COPYING. Contac
0100: 74 20 74 68 65 20 61 75 74 68 6f 72 20 69 66 20 t the author if
0110: 79 6f 75 20 64 6f 6e 27 74 20 68 61 76 65 20 74 you don't have t
0120: 68 69 73 0a 20 2a 20 6f 72 20 63 61 6e 27 74 20 his. * or can't
0130: 6c 69 76 65 20 77 69 74 68 20 69 74 2e 20 54 68 live with it. Th
0140: 65 72 65 20 69 73 20 41 42 53 4f 4c 55 54 45 4c ere is ABSOLUTEL
0150: 59 20 4e 4f 20 57 41 52 52 41 4e 54 59 2c 20 65 Y NO WARRANTY, e
0160: 78 70 6c 69 63 69 74 20 6f 72 20 69 6d 70 6c 69 xplicit or impli
0170: 65 64 2c 0a 20 2a 20 6f 6e 20 74 68 69 73 20 73 ed,. * on this s
0180: 6f 66 74 77 61 72 65 2e 0a 20 2a 2f 0a 0a 23 69 oftware.. */..#i
0190: 66 20 21 64 65 66 69 6e 65 64 28 4c 49 42 46 46 f !defined(LIBFF
01a0: 43 41 4c 4c 5f 56 45 52 53 49 4f 4e 29 0a 23 20 CALL_VERSION).#
01b0: 64 65 66 69 6e 65 20 4c 49 42 46 46 43 41 4c 4c define LIBFFCALL
01c0: 5f 56 45 52 53 49 4f 4e 20 30 78 30 31 30 42 0a _VERSION 0x010B.
01d0: 23 65 6e 64 69 66 0a 0a 2f 2a 20 54 68 65 73 65 #endif../* These
01e0: 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 61 72 65 definitions are
01f0: 20 61 64 6a 75 73 74 65 64 20 62 79 20 60 63 6f adjusted by `co
0200: 6e 66 69 67 75 72 65 27 20 61 75 74 6f 6d 61 74 nfigure' automat
0210: 69 63 61 6c 6c 79 2e 20 2a 2f 0a 0a 2f 2a 20 43 ically. */../* C
0220: 50 55 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f PU */.#ifndef __
0230: 69 33 38 36 5f 5f 0a 23 64 65 66 69 6e 65 20 5f i386__.#define _
0240: 5f 69 33 38 36 5f 5f 20 31 0a 23 65 6e 64 69 66 _i386__ 1.#endif
0250: 0a 23 69 66 6e 64 65 66 20 5f 5f 6d 36 38 6b 5f .#ifndef __m68k_
0260: 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 36 38 6b 5f _.#undef __m68k_
0270: 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 _.#endif.#ifndef
0280: 20 5f 5f 6d 69 70 73 5f 5f 0a 23 75 6e 64 65 66 __mips__.#undef
0290: 20 5f 5f 6d 69 70 73 5f 5f 0a 23 65 6e 64 69 66 __mips__.#endif
02a0: 0a 23 69 66 6e 64 65 66 20 5f 5f 6d 69 70 73 6e .#ifndef __mipsn
02b0: 33 32 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 69 32__.#undef __mi
02c0: 70 73 6e 33 32 5f 5f 0a 23 65 6e 64 69 66 0a 23 psn32__.#endif.#
02d0: 69 66 6e 64 65 66 20 5f 5f 6d 69 70 73 36 34 5f ifndef __mips64_
02e0: 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 69 70 73 36 _.#undef __mips6
02f0: 34 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 4__.#endif.#ifnd
0300: 65 66 20 5f 5f 73 70 61 72 63 5f 5f 0a 23 75 6e ef __sparc__.#un
0310: 64 65 66 20 5f 5f 73 70 61 72 63 5f 5f 0a 23 65 def __sparc__.#e
0320: 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 73 ndif.#ifndef __s
0330: 70 61 72 63 36 34 5f 5f 0a 23 75 6e 64 65 66 20 parc64__.#undef
0340: 5f 5f 73 70 61 72 63 36 34 5f 5f 0a 23 65 6e 64 __sparc64__.#end
0350: 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 61 6c 70 if.#ifndef __alp
0360: 68 61 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 61 6c ha__.#undef __al
0370: 70 68 61 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 pha__.#endif.#if
0380: 6e 64 65 66 20 5f 5f 68 70 70 61 5f 5f 0a 23 75 ndef __hppa__.#u
0390: 6e 64 65 66 20 5f 5f 68 70 70 61 5f 5f 0a 23 65 ndef __hppa__.#e
03a0: 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 61 ndif.#ifndef __a
03b0: 72 6d 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 61 72 rm__.#undef __ar
03c0: 6d 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 m__.#endif.#ifnd
03d0: 65 66 20 5f 5f 70 6f 77 65 72 70 63 5f 5f 0a 23 ef __powerpc__.#
03e0: 75 6e 64 65 66 20 5f 5f 70 6f 77 65 72 70 63 5f undef __powerpc_
03f0: 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 _.#endif.#ifndef
0400: 20 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 0a 23 __powerpc64__.#
0410: 75 6e 64 65 66 20 5f 5f 70 6f 77 65 72 70 63 36 undef __powerpc6
0420: 34 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 4__.#endif.#ifnd
0430: 65 66 20 5f 5f 73 33 39 30 5f 5f 0a 23 75 6e 64 ef __s390__.#und
0440: 65 66 20 5f 5f 73 33 39 30 5f 5f 0a 23 65 6e 64 ef __s390__.#end
0450: 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 6d 38 38 if.#ifndef __m88
0460: 6b 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 38 38 k__.#undef __m88
0470: 6b 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 k__.#endif.#ifnd
0480: 65 66 20 5f 5f 63 6f 6e 76 65 78 5f 5f 0a 23 75 ef __convex__.#u
0490: 6e 64 65 66 20 5f 5f 63 6f 6e 76 65 78 5f 5f 0a ndef __convex__.
04a0: 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f #endif.#ifndef _
04b0: 5f 69 61 36 34 5f 5f 0a 23 75 6e 64 65 66 20 5f _ia64__.#undef _
04c0: 5f 69 61 36 34 5f 5f 0a 23 65 6e 64 69 66 0a 23 _ia64__.#endif.#
04d0: 69 66 6e 64 65 66 20 5f 5f 78 38 36 5f 36 34 5f ifndef __x86_64_
04e0: 5f 0a 23 75 6e 64 65 66 20 5f 5f 78 38 36 5f 36 _.#undef __x86_6
04f0: 34 5f 5f 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 43 4__.#endif../* C
0500: 61 6c 6c 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f alling conventio
0510: 6e 20 2a 2f 0a 2f 2a 20 44 65 66 69 6e 65 20 69 n */./* Define i
0520: 66 20 75 73 69 6e 67 20 70 63 63 20 6e 6f 6e 2d f using pcc non-
0530: 72 65 65 6e 74 72 61 6e 74 20 73 74 72 75 63 74 reentrant struct
0540: 20 72 65 74 75 72 6e 20 63 6f 6e 76 65 6e 74 69 return conventi
0550: 6f 6e 20 2a 2f 0a 23 75 6e 64 65 66 20 5f 5f 50 on */.#undef __P
0560: 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e CC_STRUCT_RETURN
0570: 5f 5f 0a 2f 2a 20 44 65 66 69 6e 65 20 69 66 20 __./* Define if
0580: 73 6d 61 6c 6c 20 73 74 72 75 63 74 73 20 61 72 small structs ar
0590: 65 20 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 e returned in re
05a0: 67 69 73 74 65 72 73 20 2a 2f 0a 23 64 65 66 69 gisters */.#defi
05b0: 6e 65 20 5f 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 ne __SMALL_STRUC
05c0: 54 5f 52 45 54 55 52 4e 5f 5f 20 31 0a 2f 2a 20 T_RETURN__ 1./*
05d0: 44 65 66 69 6e 65 20 69 66 20 66 6c 6f 61 74 69 Define if floati
05e0: 6e 67 2d 70 6f 69 6e 74 20 72 65 73 75 6c 74 73 ng-point results
05f0: 20 61 72 65 20 72 65 74 75 72 6e 65 64 20 69 6e are returned in
0600: 20 74 68 65 20 69 6e 74 65 67 65 72 20 72 65 67 the integer reg
0610: 69 73 74 65 72 73 20 2a 2f 0a 23 75 6e 64 65 66 isters */.#undef
0620: 20 5f 5f 49 52 45 47 5f 46 4c 4f 41 54 5f 52 45 __IREG_FLOAT_RE
0630: 54 55 52 4e 5f 5f 0a 0a 2f 2a 20 41 43 5f 54 59 TURN__../* AC_TY
0640: 50 45 5f 4c 4f 4e 47 5f 4c 4f 4e 47 20 2a 2f 0a PE_LONG_LONG */.
0650: 2f 2a 20 44 65 66 69 6e 65 20 69 66 20 79 6f 75 /* Define if you
0660: 72 20 63 6f 6d 70 69 6c 65 72 20 73 75 70 70 6f r compiler suppo
0670: 72 74 73 20 74 68 65 20 27 6c 6f 6e 67 20 6c 6f rts the 'long lo
0680: 6e 67 27 20 74 79 70 65 2e 20 2a 2f 0a 23 69 66 ng' type. */.#if
0690: 6e 64 65 66 20 48 41 56 45 5f 4c 4f 4e 47 5f 4c ndef HAVE_LONG_L
06a0: 4f 4e 47 5f 49 4e 54 0a 23 75 6e 64 65 66 20 48 ONG_INT.#undef H
06b0: 41 56 45 5f 4c 4f 4e 47 5f 4c 4f 4e 47 5f 49 4e AVE_LONG_LONG_IN
06c0: 54 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 41 43 5f T.#endif../* AC_
06d0: 43 5f 43 48 41 52 5f 55 4e 53 49 47 4e 45 44 20 C_CHAR_UNSIGNED
06e0: 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 43 48 41 */.#ifndef __CHA
06f0: 52 5f 55 4e 53 49 47 4e 45 44 5f 5f 0a 23 75 6e R_UNSIGNED__.#un
0700: 64 65 66 20 5f 5f 43 48 41 52 5f 55 4e 53 49 47 def __CHAR_UNSIG
0710: 4e 45 44 5f 5f 0a 23 65 6e 64 69 66 0a 0a 2f 2a NED__.#endif../*
0720: 20 45 6e 64 20 6f 66 20 64 65 66 69 6e 69 74 69 End of definiti
0730: 6f 6e 73 20 61 64 6a 75 73 74 65 64 20 62 79 20 ons adjusted by
0740: 60 63 6f 6e 66 69 67 75 72 65 27 2e 20 2a 2f 0a `configure'. */.
0750: 0a 0a 2f 2a 20 4d 61 78 20 23 20 77 6f 72 64 73 ../* Max # words
0760: 20 69 6e 20 61 72 67 75 6d 65 6e 74 2d 6c 69 73 in argument-lis
0770: 74 20 61 6e 64 20 74 65 6d 70 6f 72 61 72 79 20 t and temporary
0780: 73 74 72 75 63 74 75 72 65 20 73 74 6f 72 61 67 structure storag
0790: 65 2e 0a 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f e.. */.#ifndef _
07a0: 5f 56 41 5f 41 4c 49 53 54 5f 57 4f 52 44 53 0a _VA_ALIST_WORDS.
07b0: 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f 41 4c 49 #define __VA_ALI
07c0: 53 54 5f 57 4f 52 44 53 20 20 32 35 36 0a 23 65 ST_WORDS 256.#e
07d0: 6e 64 69 66 0a 0a 2f 2a 20 44 65 74 65 72 6d 69 ndif../* Determi
07e0: 6e 65 20 74 68 65 20 61 6c 69 67 6e 6d 65 6e 74 ne the alignment
07f0: 20 6f 66 20 61 20 74 79 70 65 20 61 74 20 63 6f of a type at co
0800: 6d 70 69 6c 65 20 74 69 6d 65 2e 0a 20 2a 2f 0a mpile time.. */.
0810: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 47 4e #if defined(__GN
0820: 55 43 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f UC__).#define __
0830: 56 41 5f 61 6c 69 67 6e 6f 66 20 5f 5f 61 6c 69 VA_alignof __ali
0840: 67 6e 6f 66 5f 5f 0a 23 65 6c 73 65 0a 23 69 66 gnof__.#else.#if
0850: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f defined(__mips_
0860: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
0870: 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 mipsn32__) || de
0880: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
0890: 29 20 2f 2a 20 53 47 49 20 63 6f 6d 70 69 6c 65 ) /* SGI compile
08a0: 72 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 56 r */.#define __V
08b0: 41 5f 61 6c 69 67 6e 6f 66 20 5f 5f 62 75 69 6c A_alignof __buil
08c0: 74 69 6e 5f 61 6c 69 67 6e 6f 66 0a 23 65 6c 73 tin_alignof.#els
08d0: 65 0a 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f 6f e.#define __VA_o
08e0: 66 66 73 65 74 6f 66 28 74 79 70 65 2c 69 64 65 ffsetof(type,ide
08f0: 6e 74 29 20 20 28 28 75 6e 73 69 67 6e 65 64 20 nt) ((unsigned
0900: 6c 6f 6e 67 29 26 28 28 28 74 79 70 65 2a 29 30 long)&(((type*)0
0910: 29 2d 3e 69 64 65 6e 74 29 29 0a 23 64 65 66 69 )->ident)).#defi
0920: 6e 65 20 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 ne __VA_alignof(
0930: 74 79 70 65 29 20 20 5f 5f 56 41 5f 6f 66 66 73 type) __VA_offs
0940: 65 74 6f 66 28 73 74 72 75 63 74 20 7b 20 63 68 etof(struct { ch
0950: 61 72 20 5f 5f 73 6c 6f 74 31 3b 20 74 79 70 65 ar __slot1; type
0960: 20 5f 5f 73 6c 6f 74 32 3b 20 7d 2c 20 5f 5f 73 __slot2; }, __s
0970: 6c 6f 74 32 29 0a 23 65 6e 64 69 66 0a 23 65 6e lot2).#endif.#en
0980: 64 69 66 0a 0a 2f 2a 20 43 20 62 75 69 6c 74 69 dif../* C builti
0990: 6e 20 74 79 70 65 73 2e 0a 20 2a 2f 0a 23 69 66 n types.. */.#if
09a0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e defined(__mipsn
09b0: 33 32 5f 5f 29 0a 74 79 70 65 64 65 66 20 6c 6f 32__).typedef lo
09c0: 6e 67 20 6c 6f 6e 67 20 5f 5f 76 61 77 6f 72 64 ng long __vaword
09d0: 3b 0a 23 65 6c 73 65 0a 74 79 70 65 64 65 66 20 ;.#else.typedef
09e0: 6c 6f 6e 67 20 5f 5f 76 61 77 6f 72 64 3b 0a 23 long __vaword;.#
09f0: 65 6e 64 69 66 0a 0a 65 6e 75 6d 20 5f 5f 56 41 endif..enum __VA
0a00: 74 79 70 65 0a 7b 0a 20 20 5f 5f 56 41 76 6f 69 type.{. __VAvoi
0a10: 64 2c 0a 20 20 5f 5f 56 41 63 68 61 72 2c 0a 20 d,. __VAchar,.
0a20: 20 5f 5f 56 41 73 63 68 61 72 2c 0a 20 20 5f 5f __VAschar,. __
0a30: 56 41 75 63 68 61 72 2c 0a 20 20 5f 5f 56 41 73 VAuchar,. __VAs
0a40: 68 6f 72 74 2c 0a 20 20 5f 5f 56 41 75 73 68 6f hort,. __VAusho
0a50: 72 74 2c 0a 20 20 5f 5f 56 41 69 6e 74 2c 0a 20 rt,. __VAint,.
0a60: 20 5f 5f 56 41 75 69 6e 74 2c 0a 20 20 5f 5f 56 __VAuint,. __V
0a70: 41 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 41 75 6c 6f Along,. __VAulo
0a80: 6e 67 2c 0a 20 20 5f 5f 56 41 6c 6f 6e 67 6c 6f ng,. __VAlonglo
0a90: 6e 67 2c 0a 20 20 5f 5f 56 41 75 6c 6f 6e 67 6c ng,. __VAulongl
0aa0: 6f 6e 67 2c 0a 20 20 5f 5f 56 41 66 6c 6f 61 74 ong,. __VAfloat
0ab0: 2c 0a 20 20 5f 5f 56 41 64 6f 75 62 6c 65 2c 0a ,. __VAdouble,.
0ac0: 20 20 5f 5f 56 41 76 6f 69 64 70 2c 0a 20 20 5f __VAvoidp,. _
0ad0: 5f 56 41 73 74 72 75 63 74 0a 7d 3b 0a 0a 65 6e _VAstruct.};..en
0ae0: 75 6d 20 5f 5f 56 41 5f 61 6c 69 73 74 5f 66 6c um __VA_alist_fl
0af0: 61 67 73 0a 7b 0a 0a 20 20 2f 2a 20 68 6f 77 20 ags.{.. /* how
0b00: 74 6f 20 72 65 74 75 72 6e 20 73 74 72 75 63 74 to return struct
0b10: 73 20 2a 2f 0a 20 20 2f 2a 20 54 68 65 72 65 20 s */. /* There
0b20: 61 72 65 20 62 61 73 69 63 61 6c 6c 79 20 33 20 are basically 3
0b30: 77 61 79 73 20 74 6f 20 72 65 74 75 72 6e 20 73 ways to return s
0b40: 74 72 75 63 74 73 3a 0a 20 20 20 2a 20 61 2e 20 tructs:. * a.
0b50: 54 68 65 20 63 61 6c 6c 65 64 20 66 75 6e 63 74 The called funct
0b60: 69 6f 6e 20 72 65 74 75 72 6e 73 20 61 20 70 6f ion returns a po
0b70: 69 6e 74 65 72 20 74 6f 20 73 74 61 74 69 63 20 inter to static
0b80: 64 61 74 61 2e 20 4e 6f 74 20 72 65 65 6e 74 72 data. Not reentr
0b90: 61 6e 74 2e 0a 20 20 20 2a 20 62 2e 20 54 68 65 ant.. * b. The
0ba0: 20 63 61 6c 6c 65 72 20 70 61 73 73 65 73 20 74 caller passes t
0bb0: 68 65 20 72 65 74 75 72 6e 20 73 74 72 75 63 74 he return struct
0bc0: 75 72 65 20 61 64 64 72 65 73 73 20 69 6e 20 61 ure address in a
0bd0: 20 64 65 64 69 63 61 74 65 64 20 72 65 67 69 73 dedicated regis
0be0: 74 65 72 0a 20 20 20 2a 20 20 20 20 6f 72 20 61 ter. * or a
0bf0: 73 20 61 20 66 69 72 73 74 20 28 6f 72 20 6c 61 s a first (or la
0c00: 73 74 29 2c 20 69 6e 76 69 73 69 62 6c 65 20 61 st), invisible a
0c10: 72 67 75 6d 65 6e 74 2e 20 54 68 65 20 63 61 6c rgument. The cal
0c20: 6c 65 64 20 66 75 6e 63 74 69 6f 6e 20 73 74 6f led function sto
0c30: 72 65 73 0a 20 20 20 2a 20 20 20 20 69 74 73 20 res. * its
0c40: 72 65 73 75 6c 74 20 74 68 65 72 65 2e 0a 20 20 result there..
0c50: 20 2a 20 63 2e 20 4c 69 6b 65 20 62 2c 20 61 6e * c. Like b, an
0c60: 64 20 74 68 65 20 63 61 6c 6c 65 64 20 66 75 6e d the called fun
0c70: 63 74 69 6f 6e 20 61 6c 73 6f 20 72 65 74 75 72 ction also retur
0c80: 6e 73 20 74 68 65 20 72 65 74 75 72 6e 20 73 74 ns the return st
0c90: 72 75 63 74 75 72 65 0a 20 20 20 2a 20 20 20 20 ructure. *
0ca0: 61 64 64 72 65 73 73 20 69 6e 20 74 68 65 20 72 address in the r
0cb0: 65 74 75 72 6e 20 76 61 6c 75 65 20 72 65 67 69 eturn value regi
0cc0: 73 74 65 72 2e 20 28 54 68 69 73 20 69 73 20 6e ster. (This is n
0cd0: 6f 74 20 76 65 72 79 20 64 69 73 74 69 6e 67 75 ot very distingu
0ce0: 69 73 68 61 62 6c 65 0a 20 20 20 2a 20 20 20 20 ishable. *
0cf0: 66 72 6f 6d 20 62 2e 29 0a 20 20 20 2a 20 49 6e from b.). * In
0d00: 64 65 70 65 6e 64 65 6e 74 6c 79 20 6f 66 20 74 dependently of t
0d10: 68 69 73 2c 0a 20 20 20 2a 20 72 2e 20 73 6d 61 his,. * r. sma
0d20: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 28 3c ll structures (<
0d30: 3d 20 34 20 6f 72 20 3c 3d 20 38 20 62 79 74 65 = 4 or <= 8 byte
0d40: 73 29 20 6d 61 79 20 62 65 20 72 65 74 75 72 6e s) may be return
0d50: 65 64 20 69 6e 20 74 68 65 20 72 65 74 75 72 6e ed in the return
0d60: 0a 20 20 20 2a 20 20 20 20 76 61 6c 75 65 20 72 . * value r
0d70: 65 67 69 73 74 65 72 28 73 29 2c 20 6f 72 0a 20 egister(s), or.
0d80: 20 20 2a 20 6d 2e 20 65 76 65 6e 20 73 6d 61 6c * m. even smal
0d90: 6c 20 73 74 72 75 63 74 75 72 65 73 20 61 72 65 l structures are
0da0: 20 70 61 73 73 65 64 20 69 6e 20 6d 65 6d 6f 72 passed in memor
0db0: 79 2e 0a 20 20 20 2a 2f 0a 20 20 2f 2a 20 67 63 y.. */. /* gc
0dc0: 63 2d 32 2e 36 2e 33 20 65 6d 70 6c 6f 79 73 20 c-2.6.3 employs
0dd0: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 74 the following st
0de0: 72 61 74 65 67 79 3a 0a 20 20 20 2a 20 20 20 2d rategy:. * -
0df0: 20 49 66 20 50 43 43 5f 53 54 41 54 49 43 5f 53 If PCC_STATIC_S
0e00: 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 73 20 TRUCT_RETURN is
0e10: 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 6d defined in the m
0e20: 61 63 68 69 6e 65 20 64 65 73 63 72 69 70 74 69 achine descripti
0e30: 6f 6e 0a 20 20 20 2a 20 20 20 20 20 69 74 20 75 on. * it u
0e40: 73 65 73 20 6d 65 74 68 6f 64 20 61 2c 20 65 6c ses method a, el
0e50: 73 65 20 6d 65 74 68 6f 64 20 63 2e 0a 20 20 20 se method c..
0e60: 2a 20 20 20 2d 20 49 66 20 66 6c 61 67 5f 70 63 * - If flag_pc
0e70: 63 5f 73 74 72 75 63 74 5f 72 65 74 75 72 6e 20 c_struct_return
0e80: 69 73 20 73 65 74 20 28 65 69 74 68 65 72 20 62 is set (either b
0e90: 79 20 2d 66 70 63 63 2d 73 74 72 75 63 74 2d 72 y -fpcc-struct-r
0ea0: 65 74 75 72 6e 20 6f 72 20 69 66 0a 20 20 20 2a eturn or if. *
0eb0: 20 20 20 20 20 44 45 46 41 55 4c 54 5f 50 43 43 DEFAULT_PCC
0ec0: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 _STRUCT_RETURN i
0ed0: 73 20 64 65 66 69 6e 65 64 20 74 6f 20 31 20 69 s defined to 1 i
0ee0: 6e 20 74 68 65 20 6d 61 63 68 69 6e 65 20 64 65 n the machine de
0ef0: 73 63 72 69 70 74 69 6f 6e 29 0a 20 20 20 2a 20 scription). *
0f00: 20 20 20 20 69 74 20 75 73 65 73 20 6d 65 74 68 it uses meth
0f10: 6f 64 20 6d 2c 20 65 6c 73 65 20 28 65 69 74 68 od m, else (eith
0f20: 65 72 20 62 79 20 2d 66 72 65 67 2d 73 74 72 75 er by -freg-stru
0f30: 63 74 2d 72 65 74 75 72 6e 20 6f 72 20 69 66 0a ct-return or if.
0f40: 20 20 20 2a 20 20 20 20 20 44 45 46 41 55 4c 54 * DEFAULT
0f50: 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 _PCC_STRUCT_RETU
0f60: 52 4e 20 69 73 20 64 65 66 69 6e 65 64 20 74 6f RN is defined to
0f70: 20 30 20 69 6e 20 74 68 65 20 6d 61 63 68 69 6e 0 in the machin
0f80: 65 20 64 65 73 63 72 69 70 74 69 6f 6e 29 0a 20 e description).
0f90: 20 20 2a 20 20 20 20 20 6d 65 74 68 6f 64 20 72 * method r
0fa0: 2e 0a 20 20 20 2a 2f 0a 20 20 5f 5f 56 41 5f 50 .. */. __VA_P
0fb0: 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e CC_STRUCT_RETURN
0fc0: 09 3d 20 31 3c 3c 30 2c 09 2f 2a 20 61 3a 20 6e .= 1<<0,./* a: n
0fd0: 65 65 64 20 74 6f 20 63 6f 70 79 20 74 68 65 20 eed to copy the
0fe0: 73 74 72 75 63 74 20 2a 2f 0a 20 20 5f 5f 56 41 struct */. __VA
0ff0: 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 _SMALL_STRUCT_RE
1000: 54 55 52 4e 09 3d 20 31 3c 3c 31 2c 09 2f 2a 20 TURN.= 1<<1,./*
1010: 72 3a 20 73 70 65 63 69 61 6c 20 63 61 73 65 20 r: special case
1020: 66 6f 72 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 for small struct
1030: 73 20 2a 2f 0a 20 20 5f 5f 56 41 5f 47 43 43 5f s */. __VA_GCC_
1040: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 STRUCT_RETURN.=
1050: 31 3c 3c 32 2c 09 2f 2a 20 63 6f 6e 73 69 64 65 1<<2,./* conside
1060: 72 20 38 20 62 79 74 65 20 73 74 72 75 63 74 73 r 8 byte structs
1070: 20 61 73 20 73 6d 61 6c 6c 20 2a 2f 0a 23 69 66 as small */.#if
1080: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
1090: 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 __) && !defined(
10a0: 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a 20 20 5f __sparc64__). _
10b0: 5f 56 41 5f 53 55 4e 43 43 5f 53 54 52 55 43 54 _VA_SUNCC_STRUCT
10c0: 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 33 2c 0a _RETURN.= 1<<3,.
10d0: 20 20 5f 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f __VA_SUNPROCC_
10e0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 STRUCT_RETURN.=
10f0: 31 3c 3c 34 2c 0a 23 65 6c 73 65 0a 20 20 5f 5f 1<<4,.#else. __
1100: 56 41 5f 53 55 4e 43 43 5f 53 54 52 55 43 54 5f VA_SUNCC_STRUCT_
1110: 52 45 54 55 52 4e 09 3d 20 30 2c 0a 20 20 5f 5f RETURN.= 0,. __
1120: 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 54 52 55 VA_SUNPROCC_STRU
1130: 43 54 5f 52 45 54 55 52 4e 09 3d 20 30 2c 0a 23 CT_RETURN.= 0,.#
1140: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
1150: 64 28 5f 5f 69 33 38 36 5f 5f 29 0a 20 20 5f 5f d(__i386__). __
1160: 56 41 5f 4e 45 58 54 47 43 43 5f 53 54 52 55 43 VA_NEXTGCC_STRUC
1170: 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 33 2c T_RETURN.= 1<<3,
1180: 0a 20 20 5f 5f 56 41 5f 4d 53 56 43 5f 53 54 52 . __VA_MSVC_STR
1190: 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c UCT_RETURN.= 1<<
11a0: 34 2c 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 4,.#endif.#if de
11b0: 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a fined(__hppa__).
11c0: 20 20 5f 5f 56 41 5f 4f 4c 44 47 43 43 5f 53 54 __VA_OLDGCC_ST
11d0: 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c RUCT_RETURN.= 1<
11e0: 3c 33 2c 0a 23 65 6e 64 69 66 0a 20 20 2f 2a 20 <3,.#endif. /*
11f0: 74 68 65 20 64 65 66 61 75 6c 74 20 77 61 79 20 the default way
1200: 74 6f 20 72 65 74 75 72 6e 20 73 74 72 75 63 74 to return struct
1210: 73 20 2a 2f 0a 20 20 2f 2a 20 54 68 69 73 20 63 s */. /* This c
1220: 68 6f 69 63 65 20 68 65 72 65 20 69 73 20 62 61 hoice here is ba
1230: 73 65 64 20 6f 6e 20 74 68 65 20 61 73 73 75 6d sed on the assum
1240: 70 74 69 6f 6e 20 74 68 61 74 20 74 68 65 20 66 ption that the f
1250: 75 6e 63 74 69 6f 6e 20 79 6f 75 20 61 72 65 0a unction you are.
1260: 20 20 20 2a 20 67 6f 69 6e 67 20 74 6f 20 63 61 * going to ca
1270: 6c 6c 20 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 ll has been comp
1280: 69 6c 65 64 20 77 69 74 68 20 74 68 65 20 73 61 iled with the sa
1290: 6d 65 20 63 6f 6d 70 69 6c 65 72 20 79 6f 75 20 me compiler you
12a0: 61 72 65 20 75 73 69 6e 67 20 74 6f 0a 20 20 20 are using to.
12b0: 2a 20 69 6e 63 6c 75 64 65 20 74 68 69 73 20 66 * include this f
12c0: 69 6c 65 2e 0a 20 20 20 2a 20 49 66 20 79 6f 75 ile.. * If you
12d0: 20 77 61 6e 74 20 74 6f 20 63 61 6c 6c 20 66 75 want to call fu
12e0: 6e 63 74 69 6f 6e 73 20 77 69 74 68 20 61 6e 6f nctions with ano
12f0: 74 68 65 72 20 73 74 72 75 63 74 20 72 65 74 75 ther struct retu
1300: 72 6e 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e rning convention
1310: 2c 0a 20 20 20 2a 20 6a 75 73 74 20 20 23 64 65 ,. * just #de
1320: 66 69 6e 65 20 5f 5f 56 41 5f 53 54 52 55 43 54 fine __VA_STRUCT
1330: 5f 52 45 54 55 52 4e 20 2e 2e 2e 0a 20 20 20 2a _RETURN .... *
1340: 20 62 65 66 6f 72 65 20 6f 72 20 61 66 74 65 72 before or after
1350: 20 23 69 6e 63 6c 75 64 69 6e 67 20 3c 76 61 63 #including <vac
1360: 61 6c 6c 2e 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 all.h>.. */.#i
1370: 66 6e 64 65 66 20 5f 5f 56 41 5f 53 54 52 55 43 fndef __VA_STRUC
1380: 54 5f 52 45 54 55 52 4e 0a 20 20 5f 5f 56 41 5f T_RETURN. __VA_
1390: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 09 3d STRUCT_RETURN..=
13a0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 .#if defined(__s
13b0: 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 parc__) && !defi
13c0: 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 ned(__sparc64__)
13d0: 20 26 26 20 64 65 66 69 6e 65 64 28 73 75 6e 29 && defined(sun)
13e0: 20 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 53 55 && defined(__SU
13f0: 4e 50 52 4f 5f 43 29 20 2f 2a 20 53 55 4e 57 73 NPRO_C) /* SUNWs
1400: 70 72 6f 20 63 63 20 2a 2f 0a 09 09 09 09 20 20 pro cc */.....
1410: 5f 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 54 __VA_SUNPROCC_ST
1420: 52 55 43 54 5f 52 45 54 55 52 4e 2c 0a 23 65 6c RUCT_RETURN,.#el
1430: 73 65 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f se.#if defined(_
1440: 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 _PCC_STRUCT_RETU
1450: 52 4e 5f 5f 29 20 2f 2a 20 64 65 66 69 6e 65 64 RN__) /* defined
1460: 20 74 68 72 6f 75 67 68 20 63 6f 6e 66 69 67 75 through configu
1470: 72 65 2c 20 73 65 65 20 61 62 6f 76 65 20 2a 2f re, see above */
1480: 0a 09 09 09 09 20 20 5f 5f 56 41 5f 50 43 43 5f ..... __VA_PCC_
1490: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 0a 23 STRUCT_RETURN,.#
14a0: 65 6c 73 65 0a 23 69 66 20 64 65 66 69 6e 65 64 else.#if defined
14b0: 28 5f 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f (__SMALL_STRUCT_
14c0: 52 45 54 55 52 4e 5f 5f 29 20 7c 7c 20 64 65 66 RETURN__) || def
14d0: 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f ined(__mipsn32__
14e0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d ) || defined(__m
14f0: 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 ips64__) || defi
1500: 6e 65 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 2f 2a ned(__ARMEL__)/*
1510: 20 64 65 66 69 6e 65 64 20 74 68 72 6f 75 67 68 defined through
1520: 20 63 6f 6e 66 69 67 75 72 65 2c 20 73 65 65 20 configure, see
1530: 61 62 6f 76 65 20 2a 2f 0a 09 09 09 09 20 20 5f above */..... _
1540: 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 _VA_SMALL_STRUCT
1550: 5f 52 45 54 55 52 4e 20 7c 0a 23 65 6e 64 69 66 _RETURN |.#endif
1560: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 47 .#if defined(__G
1570: 4e 55 43 5f 5f 29 0a 09 09 09 09 20 20 5f 5f 56 NUC__)..... __V
1580: 41 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 A_GCC_STRUCT_RET
1590: 55 52 4e 20 7c 0a 23 65 6e 64 69 66 0a 23 69 66 URN |.#endif.#if
15a0: 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f defined(__i386_
15b0: 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 4e 65 _) && defined(Ne
15c0: 58 54 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f XT) && defined(_
15d0: 5f 47 4e 55 43 5f 5f 29 20 2f 2a 20 4e 65 58 54 _GNUC__) /* NeXT
15e0: 20 67 63 63 2d 32 2e 35 2e 38 20 2a 2f 0a 09 09 gcc-2.5.8 */...
15f0: 09 09 20 20 5f 5f 56 41 5f 4e 45 58 54 47 43 43 .. __VA_NEXTGCC
1600: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 7c _STRUCT_RETURN |
1610: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
1620: 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 26 26 ned(__i386__) &&
1630: 20 64 65 66 69 6e 65 64 28 5f 4d 53 43 5f 56 45 defined(_MSC_VE
1640: 52 29 20 2f 2a 20 4d 53 56 43 20 34 2e 30 20 2a R) /* MSVC 4.0 *
1650: 2f 0a 09 09 09 09 20 20 5f 5f 56 41 5f 4d 53 56 /..... __VA_MSV
1660: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 C_STRUCT_RETURN
1670: 7c 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 |.#endif.#if def
1680: 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 20 26 ined(__hppa__) &
1690: 26 20 64 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 & defined(__GNUC
16a0: 5f 5f 29 20 26 26 20 28 5f 5f 47 4e 55 43 5f 5f __) && (__GNUC__
16b0: 20 3c 20 33 29 20 26 26 20 28 5f 5f 47 4e 55 43 < 3) && (__GNUC
16c0: 5f 4d 49 4e 4f 52 5f 5f 20 3c 20 37 29 0a 09 09 _MINOR__ < 7)...
16d0: 09 09 20 20 5f 5f 56 41 5f 4f 4c 44 47 43 43 5f .. __VA_OLDGCC_
16e0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 0a STRUCT_RETURN |.
16f0: 23 65 6e 64 69 66 0a 20 20 09 09 09 09 20 20 30 #endif. .... 0
1700: 2c 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a ,.#endif.#endif.
1710: 23 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 68 6f 77 #endif.. /* how
1720: 20 74 6f 20 72 65 74 75 72 6e 20 66 6c 6f 61 74 to return float
1730: 73 20 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 s */.#if defined
1740: 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 (__m68k__) || (d
1750: 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f efined(__sparc__
1760: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
1770: 73 70 61 72 63 36 34 5f 5f 29 29 0a 20 20 5f 5f sparc64__)). __
1780: 56 41 5f 53 55 4e 43 43 5f 46 4c 4f 41 54 5f 52 VA_SUNCC_FLOAT_R
1790: 45 54 55 52 4e 09 3d 20 31 3c 3c 35 2c 0a 23 65 ETURN.= 1<<5,.#e
17a0: 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 ndif.#if defined
17b0: 28 5f 5f 6d 36 38 6b 5f 5f 29 0a 20 20 5f 5f 56 (__m68k__). __V
17c0: 41 5f 46 52 45 47 5f 46 4c 4f 41 54 5f 52 45 54 A_FREG_FLOAT_RET
17d0: 55 52 4e 09 3d 20 31 3c 3c 36 2c 0a 23 65 6e 64 URN.= 1<<6,.#end
17e0: 69 66 0a 20 20 2f 2a 20 74 68 65 20 64 65 66 61 if. /* the defa
17f0: 75 6c 74 20 77 61 79 20 74 6f 20 72 65 74 75 72 ult way to retur
1800: 6e 20 66 6c 6f 61 74 73 20 2a 2f 0a 20 20 2f 2a n floats */. /*
1810: 20 54 68 69 73 20 63 68 6f 69 63 65 20 68 65 72 This choice her
1820: 65 20 69 73 20 62 61 73 65 64 20 6f 6e 20 74 68 e is based on th
1830: 65 20 61 73 73 75 6d 70 74 69 6f 6e 20 74 68 61 e assumption tha
1840: 74 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 79 t the function y
1850: 6f 75 20 61 72 65 0a 20 20 20 2a 20 67 6f 69 6e ou are. * goin
1860: 67 20 74 6f 20 63 61 6c 6c 20 68 61 73 20 62 65 g to call has be
1870: 65 6e 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 en compiled with
1880: 20 74 68 65 20 73 61 6d 65 20 63 6f 6d 70 69 6c the same compil
1890: 65 72 20 79 6f 75 20 61 72 65 20 75 73 69 6e 67 er you are using
18a0: 20 74 6f 0a 20 20 20 2a 20 69 6e 63 6c 75 64 65 to. * include
18b0: 20 74 68 69 73 20 66 69 6c 65 2e 0a 20 20 20 2a this file.. *
18c0: 20 49 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 If you want to
18d0: 63 61 6c 6c 20 66 75 6e 63 74 69 6f 6e 73 20 77 call functions w
18e0: 69 74 68 20 61 6e 6f 74 68 65 72 20 66 6c 6f 61 ith another floa
18f0: 74 20 72 65 74 75 72 6e 69 6e 67 20 63 6f 6e 76 t returning conv
1900: 65 6e 74 69 6f 6e 2c 0a 20 20 20 2a 20 6a 75 73 ention,. * jus
1910: 74 20 20 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f t #define __VA_
1920: 46 4c 4f 41 54 5f 52 45 54 55 52 4e 20 2e 2e 2e FLOAT_RETURN ...
1930: 0a 20 20 20 2a 20 62 65 66 6f 72 65 20 6f 72 20 . * before or
1940: 61 66 74 65 72 20 23 69 6e 63 6c 75 64 69 6e 67 after #including
1950: 20 3c 76 61 63 61 6c 6c 2e 68 3e 2e 0a 20 20 20 <vacall.h>..
1960: 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 56 41 5f */.#ifndef __VA_
1970: 46 4c 4f 41 54 5f 52 45 54 55 52 4e 0a 23 69 66 FLOAT_RETURN.#if
1980: 20 28 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b (defined(__m68k
1990: 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 __) || (defined(
19a0: 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 64 __sparc__) && !d
19b0: 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 efined(__sparc64
19c0: 5f 5f 29 29 29 20 26 26 20 21 64 65 66 69 6e 65 __))) && !define
19d0: 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 26 26 20 64 d(__GNUC__) && d
19e0: 65 66 69 6e 65 64 28 73 75 6e 29 20 26 26 20 21 efined(sun) && !
19f0: 64 65 66 69 6e 65 64 28 5f 5f 53 55 4e 50 52 4f defined(__SUNPRO
1a00: 5f 43 29 20 20 2f 2a 20 73 75 6e 20 63 63 20 2a _C) /* sun cc *
1a10: 2f 0a 20 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 /. __VA_FLOAT_R
1a20: 45 54 55 52 4e 09 09 3d 20 5f 5f 56 41 5f 53 55 ETURN..= __VA_SU
1a30: 4e 43 43 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e NCC_FLOAT_RETURN
1a40: 2c 0a 23 65 6c 69 66 20 28 64 65 66 69 6e 65 64 ,.#elif (defined
1a50: 28 5f 5f 6d 36 38 6b 5f 5f 29 20 26 26 20 21 64 (__m68k__) && !d
1a60: 65 66 69 6e 65 64 28 5f 5f 49 52 45 47 5f 46 4c efined(__IREG_FL
1a70: 4f 41 54 5f 52 45 54 55 52 4e 5f 5f 29 29 0a 20 OAT_RETURN__)).
1a80: 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 45 54 55 __VA_FLOAT_RETU
1a90: 52 4e 09 09 3d 20 5f 5f 56 41 5f 46 52 45 47 5f RN..= __VA_FREG_
1aa0: 46 4c 4f 41 54 5f 52 45 54 55 52 4e 2c 0a 23 65 FLOAT_RETURN,.#e
1ab0: 6c 73 65 0a 20 20 5f 5f 56 41 5f 46 4c 4f 41 54 lse. __VA_FLOAT
1ac0: 5f 52 45 54 55 52 4e 09 09 3d 20 30 2c 0a 23 65 _RETURN..= 0,.#e
1ad0: 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0a 20 20 2f ndif.#endif.. /
1ae0: 2a 20 68 6f 77 20 74 6f 20 70 61 73 73 20 73 74 * how to pass st
1af0: 72 75 63 74 73 20 2a 2f 0a 23 69 66 20 64 65 66 ructs */.#if def
1b00: 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 7c ined(__mips__) |
1b10: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 | defined(__mips
1b20: 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 n32__) || define
1b30: 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 20 d(__mips64__).
1b40: 5f 5f 56 41 5f 53 47 49 43 43 5f 53 54 52 55 43 __VA_SGICC_STRUC
1b50: 54 5f 41 52 47 53 09 3d 20 31 3c 3c 37 2c 0a 23 T_ARGS.= 1<<7,.#
1b60: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
1b70: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 d(__powerpc__) &
1b80: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 & !defined(__pow
1b90: 65 72 70 63 36 34 5f 5f 29 0a 20 20 5f 5f 56 41 erpc64__). __VA
1ba0: 5f 41 49 58 43 43 5f 53 54 52 55 43 54 5f 41 52 _AIXCC_STRUCT_AR
1bb0: 47 53 09 3d 20 31 3c 3c 37 2c 0a 23 65 6e 64 69 GS.= 1<<7,.#endi
1bc0: 66 0a 20 20 2f 2a 20 74 68 65 20 64 65 66 61 75 f. /* the defau
1bd0: 6c 74 20 77 61 79 20 74 6f 20 70 61 73 73 20 66 lt way to pass f
1be0: 6c 6f 61 74 73 20 2a 2f 0a 20 20 2f 2a 20 54 68 loats */. /* Th
1bf0: 69 73 20 63 68 6f 69 63 65 20 68 65 72 65 20 69 is choice here i
1c00: 73 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 61 s based on the a
1c10: 73 73 75 6d 70 74 69 6f 6e 20 74 68 61 74 20 74 ssumption that t
1c20: 68 65 20 66 75 6e 63 74 69 6f 6e 20 79 6f 75 20 he function you
1c30: 61 72 65 0a 20 20 20 2a 20 67 6f 69 6e 67 20 74 are. * going t
1c40: 6f 20 63 61 6c 6c 20 68 61 73 20 62 65 65 6e 20 o call has been
1c50: 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 74 68 compiled with th
1c60: 65 20 73 61 6d 65 20 63 6f 6d 70 69 6c 65 72 20 e same compiler
1c70: 79 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 6f you are using to
1c80: 0a 20 20 20 2a 20 69 6e 63 6c 75 64 65 20 74 68 . * include th
1c90: 69 73 20 66 69 6c 65 2e 0a 20 20 20 2a 20 49 66 is file.. * If
1ca0: 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 61 6c you want to cal
1cb0: 6c 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 74 68 l functions with
1cc0: 20 61 6e 6f 74 68 65 72 20 66 6c 6f 61 74 20 70 another float p
1cd0: 61 73 73 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f assing conventio
1ce0: 6e 2c 0a 20 20 20 2a 20 6a 75 73 74 20 20 23 64 n,. * just #d
1cf0: 65 66 69 6e 65 20 5f 5f 56 41 5f 53 54 52 55 43 efine __VA_STRUC
1d00: 54 5f 41 52 47 53 20 2e 2e 2e 0a 20 20 20 2a 20 T_ARGS .... *
1d10: 62 65 66 6f 72 65 20 6f 72 20 61 66 74 65 72 20 before or after
1d20: 23 69 6e 63 6c 75 64 69 6e 67 20 3c 76 61 63 61 #including <vaca
1d30: 6c 6c 2e 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 ll.h>.. */.#if
1d40: 6e 64 65 66 20 5f 5f 56 41 5f 53 54 52 55 43 54 ndef __VA_STRUCT
1d50: 5f 41 52 47 53 0a 23 69 66 20 28 64 65 66 69 6e _ARGS.#if (defin
1d60: 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 ed(__mips__) ||
1d70: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 defined(__mipsn3
1d80: 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 2__) || defined(
1d90: 5f 5f 6d 69 70 73 36 34 5f 5f 29 29 20 26 26 20 __mips64__)) &&
1da0: 21 64 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f !defined(__GNUC_
1db0: 5f 29 20 2f 2a 20 53 47 49 20 6d 69 70 73 20 63 _) /* SGI mips c
1dc0: 63 20 2a 2f 0a 20 20 5f 5f 56 41 5f 53 54 52 55 c */. __VA_STRU
1dd0: 43 54 5f 41 52 47 53 09 09 3d 20 5f 5f 56 41 5f CT_ARGS..= __VA_
1de0: 53 47 49 43 43 5f 53 54 52 55 43 54 5f 41 52 47 SGICC_STRUCT_ARG
1df0: 53 2c 0a 23 65 6c 73 65 0a 23 69 66 20 64 65 66 S,.#else.#if def
1e00: 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f ined(__powerpc__
1e10: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
1e20: 70 6f 77 65 72 70 63 36 34 5f 5f 29 20 26 26 20 powerpc64__) &&
1e30: 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 26 26 defined(_AIX) &&
1e40: 20 21 64 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 !defined(__GNUC
1e50: 5f 5f 29 20 2f 2a 20 41 49 58 20 63 63 2c 20 78 __) /* AIX cc, x
1e60: 6c 63 20 2a 2f 0a 20 20 5f 5f 56 41 5f 53 54 52 lc */. __VA_STR
1e70: 55 43 54 5f 41 52 47 53 09 09 3d 20 5f 5f 56 41 UCT_ARGS..= __VA
1e80: 5f 41 49 58 43 43 5f 53 54 52 55 43 54 5f 41 52 _AIXCC_STRUCT_AR
1e90: 47 53 2c 0a 23 65 6c 73 65 0a 20 20 5f 5f 56 41 GS,.#else. __VA
1ea0: 5f 53 54 52 55 43 54 5f 41 52 47 53 09 09 3d 20 _STRUCT_ARGS..=
1eb0: 30 2c 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0,.#endif.#endif
1ec0: 0a 23 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 68 6f .#endif.. /* ho
1ed0: 77 20 74 6f 20 70 61 73 73 20 66 6c 6f 61 74 73 w to pass floats
1ee0: 20 2a 2f 0a 20 20 2f 2a 20 41 4e 53 49 20 43 20 */. /* ANSI C
1ef0: 63 6f 6d 70 69 6c 65 72 73 20 61 6e 64 20 47 4e compilers and GN
1f00: 55 20 67 63 63 20 70 61 73 73 20 66 6c 6f 61 74 U gcc pass float
1f10: 73 20 61 73 20 66 6c 6f 61 74 73 2e 0a 20 20 20 s as floats..
1f20: 2a 20 4b 26 52 20 43 20 63 6f 6d 70 69 6c 65 72 * K&R C compiler
1f30: 73 20 70 61 73 73 20 66 6c 6f 61 74 73 20 61 73 s pass floats as
1f40: 20 64 6f 75 62 6c 65 73 2e 20 57 65 20 64 6f 6e doubles. We don
1f50: 27 74 20 73 75 70 70 6f 72 74 20 74 68 65 6d 20 't support them
1f60: 61 6e 79 20 6d 6f 72 65 2e 0a 20 20 20 2a 2f 0a any more.. */.
1f70: 20 20 5f 5f 56 41 5f 41 4e 53 49 5f 46 4c 4f 41 __VA_ANSI_FLOA
1f80: 54 5f 41 52 47 53 09 09 3d 20 30 2c 20 20 20 20 T_ARGS..= 0,
1f90: 2f 2a 20 70 61 73 73 20 66 6c 6f 61 74 73 20 61 /* pass floats a
1fa0: 73 20 66 6c 6f 61 74 73 20 2a 2f 0a 0a 20 20 2f s floats */.. /
1fb0: 2a 20 68 6f 77 20 74 6f 20 70 61 73 73 20 61 6e * how to pass an
1fc0: 64 20 72 65 74 75 72 6e 20 73 6d 61 6c 6c 20 69 d return small i
1fd0: 6e 74 65 67 65 72 20 61 72 67 75 6d 65 6e 74 73 nteger arguments
1fe0: 20 2a 2f 0a 20 20 5f 5f 56 41 5f 41 4e 53 49 5f */. __VA_ANSI_
1ff0: 49 4e 54 45 47 45 52 53 09 09 3d 20 30 2c 20 2f INTEGERS..= 0, /
2000: 2a 20 6e 6f 20 70 72 6f 6d 6f 74 69 6f 6e 73 20 * no promotions
2010: 2a 2f 0a 20 20 5f 5f 56 41 5f 54 52 41 44 49 54 */. __VA_TRADIT
2020: 49 4f 4e 41 4c 5f 49 4e 54 45 47 45 52 53 09 3d IONAL_INTEGERS.=
2030: 20 30 2c 20 2f 2a 20 70 72 6f 6d 6f 74 65 20 5b 0, /* promote [
2040: 75 5d 63 68 61 72 2c 20 5b 75 5d 73 68 6f 72 74 u]char, [u]short
2050: 20 74 6f 20 5b 75 5d 69 6e 74 20 2a 2f 0a 20 20 to [u]int */.
2060: 2f 2a 20 46 6f 72 74 75 6e 61 74 65 6c 79 20 74 /* Fortunately t
2070: 68 65 73 65 20 74 77 6f 20 6d 65 74 68 6f 64 73 hese two methods
2080: 20 61 72 65 20 63 6f 6d 70 61 74 69 62 6c 65 2e are compatible.
2090: 20 4f 75 72 20 6d 61 63 72 6f 73 20 77 6f 72 6b Our macros work
20a0: 20 77 69 74 68 20 62 6f 74 68 2e 20 2a 2f 0a 0a with both. */..
20b0: 20 20 2f 2a 20 73 74 61 63 6b 20 63 6c 65 61 6e /* stack clean
20c0: 75 70 20 70 6f 6c 69 63 79 20 2a 2f 0a 20 20 5f up policy */. _
20d0: 5f 56 41 5f 43 44 45 43 4c 5f 43 4c 45 41 4e 55 _VA_CDECL_CLEANU
20e0: 50 09 09 3d 20 30 2c 20 2f 2a 20 63 61 6c 6c 65 P..= 0, /* calle
20f0: 72 20 70 6f 70 73 20 61 72 67 73 20 61 66 74 65 r pops args afte
2100: 72 20 72 65 74 75 72 6e 20 2a 2f 0a 20 20 5f 5f r return */. __
2110: 56 41 5f 53 54 44 43 41 4c 4c 5f 43 4c 45 41 4e VA_STDCALL_CLEAN
2120: 55 50 09 09 3d 20 31 3c 3c 39 2c 20 2f 2a 20 63 UP..= 1<<9, /* c
2130: 61 6c 6c 65 65 20 70 6f 70 73 20 61 72 67 73 20 allee pops args
2140: 62 65 66 6f 72 65 20 72 65 74 75 72 6e 20 2a 2f before return */
2150: 0a 09 09 09 09 20 20 20 20 20 2f 2a 20 63 75 72 ..... /* cur
2160: 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 73 75 70 70 rently only supp
2170: 6f 72 74 65 64 20 6f 6e 20 5f 5f 69 33 38 36 5f orted on __i386_
2180: 5f 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 56 _ */.#ifndef __V
2190: 41 5f 43 4c 45 41 4e 55 50 0a 20 20 5f 5f 56 41 A_CLEANUP. __VA
21a0: 5f 43 4c 45 41 4e 55 50 09 09 09 3d 20 5f 5f 56 _CLEANUP...= __V
21b0: 41 5f 43 44 45 43 4c 5f 43 4c 45 41 4e 55 50 2c A_CDECL_CLEANUP,
21c0: 0a 23 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 54 68 .#endif.. /* Th
21d0: 65 73 65 20 61 72 65 20 66 6f 72 20 69 6e 74 65 ese are for inte
21e0: 72 6e 61 6c 20 75 73 65 20 6f 6e 6c 79 20 2a 2f rnal use only */
21f0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 .#if defined(__i
2200: 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 386__) || define
2210: 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 d(__m68k__) || d
2220: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 efined(__mipsn32
2230: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
2240: 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 _mips64__) || de
2250: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
2260: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
2270: 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 alpha__) || defi
2280: 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 ned(__arm__) ||
2290: 28 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 (defined(__power
22a0: 70 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 pc__) && !define
22b0: 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 d(__powerpc64__)
22c0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 ) || defined(__c
22d0: 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 64 65 66 69 onvex__) || defi
22e0: 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 7c 7c ned(__ia64__) ||
22f0: 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 defined(__x86_6
2300: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
2310: 5f 5f 73 33 39 30 5f 5f 29 0a 20 20 5f 5f 56 41 __s390__). __VA
2320: 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 43 54 _REGISTER_STRUCT
2330: 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 31 30 2c _RETURN.= 1<<10,
2340: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
2350: 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 ned(__mips__) &&
2360: 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 !defined(__mips
2370: 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 6e n32__) && !defin
2380: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 ed(__mips64__).
2390: 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 31 09 09 09 __VA_FLOAT_1...
23a0: 3d 20 31 3c 3c 31 31 2c 0a 20 20 5f 5f 56 41 5f = 1<<11,. __VA_
23b0: 46 4c 4f 41 54 5f 32 09 09 09 3d 20 31 3c 3c 31 FLOAT_2...= 1<<1
23c0: 32 2c 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 2,.#endif.#if de
23d0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f fined(__mipsn32_
23e0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
23f0: 6d 69 70 73 36 34 5f 5f 29 0a 20 20 5f 5f 56 41 mips64__). __VA
2400: 5f 52 45 47 49 53 54 45 52 5f 46 4c 4f 41 54 53 _REGISTER_FLOATS
2410: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 TRUCT_RETURN.= 1
2420: 3c 3c 31 33 2c 0a 20 20 5f 5f 56 41 5f 52 45 47 <<13,. __VA_REG
2430: 49 53 54 45 52 5f 44 4f 55 42 4c 45 53 54 52 55 ISTER_DOUBLESTRU
2440: 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 31 CT_RETURN.= 1<<1
2450: 34 2c 0a 23 65 6e 64 69 66 0a 0a 20 20 5f 5f 56 4,.#endif.. __V
2460: 41 5f 66 6c 61 67 5f 66 6f 72 5f 62 72 6f 6b 65 A_flag_for_broke
2470: 6e 5f 63 6f 6d 70 69 6c 65 72 73 5f 74 68 61 74 n_compilers_that
2480: 5f 64 6f 6e 74 5f 6c 69 6b 65 5f 74 72 61 69 6c _dont_like_trail
2490: 69 6e 67 5f 63 6f 6d 6d 61 73 0a 7d 3b 0a 0a 2f ing_commas.};../
24a0: 2a 0a 20 2a 20 44 65 66 69 6e 69 74 69 6f 6e 20 *. * Definition
24b0: 6f 66 20 74 68 65 20 60 76 61 5f 61 6c 69 73 74 of the `va_alist
24c0: 27 20 74 79 70 65 2e 0a 20 2a 2f 0a 74 79 70 65 ' type.. */.type
24d0: 64 65 66 20 73 74 72 75 63 74 0a 7b 0a 20 20 2f def struct.{. /
24e0: 2a 20 73 6f 6d 65 20 76 61 5f 2e 2e 2e 20 6d 61 * some va_... ma
24f0: 63 72 6f 73 20 6e 65 65 64 20 74 68 65 73 65 20 cros need these
2500: 66 6c 61 67 73 20 2a 2f 0a 20 20 69 6e 74 20 20 flags */. int
2510: 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 3b flags;
2520: 0a 20 20 2f 2a 20 63 75 72 72 65 6e 74 20 70 6f . /* current po
2530: 69 6e 74 65 72 20 69 6e 74 6f 20 74 68 65 20 61 inter into the a
2540: 72 67 75 6d 65 6e 74 20 61 72 72 61 79 20 2a 2f rgument array */
2550: 0a 20 20 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 . unsigned long
2560: 20 20 61 70 74 72 3b 0a 20 20 2f 2a 20 73 74 72 aptr;. /* str
2570: 75 63 74 75 72 65 20 72 65 74 75 72 6e 20 70 6f ucture return po
2580: 69 6e 74 65 72 2c 20 72 65 74 75 72 6e 20 74 79 inter, return ty
2590: 70 65 2c 20 72 65 74 75 72 6e 20 74 79 70 65 20 pe, return type
25a0: 73 69 7a 65 20 2a 2f 0a 20 20 76 6f 69 64 2a 20 size */. void*
25b0: 20 20 20 20 20 20 20 20 20 72 61 64 64 72 3b 0a raddr;.
25c0: 20 20 65 6e 75 6d 20 5f 5f 56 41 74 79 70 65 20 enum __VAtype
25d0: 20 72 74 79 70 65 3b 0a 20 20 75 6e 73 69 67 6e rtype;. unsign
25e0: 65 64 20 6c 6f 6e 67 20 20 72 73 69 7a 65 3b 0a ed long rsize;.
25f0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 #if defined(__i3
2600: 38 36 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 86__) || (define
2610: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 d(__powerpc__) &
2620: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 & !defined(__pow
2630: 65 72 70 63 36 34 5f 5f 29 20 26 26 20 64 65 66 erpc64__) && def
2640: 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 ined(__MACH__) &
2650: 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c & defined(__APPL
2660: 45 5f 5f 29 29 0a 20 20 2f 2a 20 46 69 6c 6c 65 E__)). /* Fille
2670: 72 20 77 6f 72 64 2c 20 6e 65 65 64 65 64 20 69 r word, needed i
2680: 66 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f 66 f the numbers of
2690: 20 77 6f 72 64 73 20 75 70 20 74 6f 20 6e 6f 77 words up to now
26a0: 20 69 6e 20 74 68 69 73 20 73 74 72 75 63 74 75 in this structu
26b0: 72 65 20 2a 2f 0a 20 20 2f 2a 20 69 73 20 6f 64 re */. /* is od
26c0: 64 20 28 62 65 63 61 75 73 65 20 6f 6e 20 4d 53 d (because on MS
26d0: 56 43 2c 20 61 6c 69 67 6e 6f 66 28 64 6f 75 62 VC, alignof(doub
26e0: 6c 65 29 20 3d 20 38 2c 20 6e 6f 72 6d 61 6c 6c le) = 8, normall
26f0: 79 20 3d 20 34 3b 20 73 69 6d 69 6c 61 72 6c 79 y = 4; similarly
2700: 2c 20 20 2a 2f 0a 20 20 2f 2a 20 6f 6e 20 4d 61 , */. /* on Ma
2710: 63 4f 53 20 58 2c 20 74 68 65 20 41 70 70 6c 65 cOS X, the Apple
2720: 20 63 6f 6d 70 69 6c 65 72 20 68 61 73 20 61 6c compiler has al
2730: 69 67 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3d 20 ignof(double) =
2740: 38 20 77 68 65 72 65 61 73 20 74 68 65 20 20 20 8 whereas the
2750: 20 20 20 2a 2f 0a 20 20 2f 2a 20 73 74 61 6e 64 */. /* stand
2760: 61 72 64 20 47 43 43 20 68 61 73 20 61 6c 69 67 ard GCC has alig
2770: 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3d 20 34 2e nof(double) = 4.
2780: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2790: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
27a0: 20 20 20 2a 2f 0a 20 20 5f 5f 76 61 77 6f 72 64 */. __vaword
27b0: 20 20 20 20 20 20 20 66 69 6c 6c 65 72 31 3b 0a filler1;.
27c0: 23 65 6e 64 69 66 0a 20 20 2f 2a 20 74 65 6d 70 #endif. /* temp
27d0: 6f 72 61 72 79 20 73 74 6f 72 61 67 65 20 66 6f orary storage fo
27e0: 72 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 2a r return value *
27f0: 2f 0a 20 20 75 6e 69 6f 6e 20 7b 0a 20 20 20 20 /. union {.
2800: 63 68 61 72 20 20 20 20 20 20 20 20 20 20 20 20 char
2810: 20 20 20 20 5f 63 68 61 72 3b 0a 20 20 20 20 73 _char;. s
2820: 69 67 6e 65 64 20 63 68 61 72 20 20 20 20 20 20 igned char
2830: 20 20 20 5f 73 63 68 61 72 3b 0a 20 20 20 20 75 _schar;. u
2840: 6e 73 69 67 6e 65 64 20 63 68 61 72 20 20 20 20 nsigned char
2850: 20 20 20 5f 75 63 68 61 72 3b 0a 20 20 20 20 73 _uchar;. s
2860: 68 6f 72 74 20 20 20 20 20 20 20 20 20 20 20 20 hort
2870: 20 20 20 5f 73 68 6f 72 74 3b 0a 20 20 20 20 75 _short;. u
2880: 6e 73 69 67 6e 65 64 20 73 68 6f 72 74 20 20 20 nsigned short
2890: 20 20 20 5f 75 73 68 6f 72 74 3b 0a 20 20 20 20 _ushort;.
28a0: 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 20 int
28b0: 20 20 20 20 5f 69 6e 74 3b 0a 20 20 20 20 75 6e _int;. un
28c0: 73 69 67 6e 65 64 20 69 6e 74 20 20 20 20 20 20 signed int
28d0: 20 20 5f 75 69 6e 74 3b 0a 20 20 20 20 6c 6f 6e _uint;. lon
28e0: 67 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 g
28f0: 20 5f 6c 6f 6e 67 3b 0a 20 20 20 20 75 6e 73 69 _long;. unsi
2900: 67 6e 65 64 20 6c 6f 6e 67 20 20 20 20 20 20 20 gned long
2910: 5f 75 6c 6f 6e 67 3b 0a 23 69 66 20 21 28 64 65 _ulong;.#if !(de
2920: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
2930: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 ) || defined(__a
2940: 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e lpha__) || defin
2950: 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f ed(__powerpc64__
2960: 29 29 20 26 26 20 64 65 66 69 6e 65 64 28 48 41 )) && defined(HA
2970: 56 45 5f 4c 4f 4e 47 5f 4c 4f 4e 47 5f 49 4e 54 VE_LONG_LONG_INT
2980: 29 0a 20 20 20 20 6c 6f 6e 67 20 6c 6f 6e 67 20 ). long long
2990: 20 20 20 20 20 20 20 20 20 20 5f 6c 6f 6e 67 6c _longl
29a0: 6f 6e 67 3b 0a 20 20 20 20 75 6e 73 69 67 6e 65 ong;. unsigne
29b0: 64 20 6c 6f 6e 67 20 6c 6f 6e 67 20 20 5f 75 6c d long long _ul
29c0: 6f 6e 67 6c 6f 6e 67 3b 0a 23 65 6e 64 69 66 0a onglong;.#endif.
29d0: 20 20 20 20 66 6c 6f 61 74 20 20 20 20 20 20 20 float
29e0: 20 20 20 20 20 20 20 20 5f 66 6c 6f 61 74 3b 0a _float;.
29f0: 20 20 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 double
2a00: 20 20 20 20 20 20 20 20 5f 64 6f 75 62 6c 65 3b _double;
2a10: 0a 20 20 20 20 76 6f 69 64 2a 20 20 20 20 20 20 . void*
2a20: 20 20 20 20 20 20 20 20 20 5f 70 74 72 3b 0a 20 _ptr;.
2a30: 20 20 20 5f 5f 76 61 77 6f 72 64 20 20 20 20 20 __vaword
2a40: 20 20 20 20 20 20 20 5f 77 6f 72 64 73 5b 32 5d _words[2]
2a50: 3b 0a 20 20 7d 20 20 20 20 20 20 20 20 20 20 20 ;. }
2a60: 20 20 20 74 6d 70 3b 0a 23 69 66 20 64 65 66 69 tmp;.#if defi
2a70: 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c ned(__i386__) ||
2a80: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f defined(__m68k_
2a90: 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f _) || (defined(_
2aa0: 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 _sparc__) && !de
2ab0: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
2ac0: 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f _)) || defined(_
2ad0: 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 64 65 66 69 _hppa__) || defi
2ae0: 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c ned(__m88k__) ||
2af0: 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f defined(__ia64_
2b00: 5f 29 0a 20 20 76 6f 69 64 2a 20 20 20 20 20 20 _). void*
2b10: 20 20 20 20 73 74 72 75 63 74 72 61 64 64 72 3b structraddr;
2b20: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
2b30: 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 7c 7c ned(__mips__) ||
2b40: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e defined(__mipsn
2b50: 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 32__) || defined
2b60: 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 (__mips64__) ||
2b70: 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 5f defined(__alpha_
2b80: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
2b90: 68 70 70 61 5f 5f 29 0a 20 20 6c 6f 6e 67 20 20 hppa__). long
2ba0: 20 20 20 20 20 20 20 20 20 6d 65 6d 61 72 67 70 memargp
2bb0: 74 72 3b 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 tr;.#endif.#if d
2bc0: 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 efined(__hppa__)
2bd0: 0a 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 20 . long
2be0: 20 20 66 61 72 67 5f 6f 66 66 73 65 74 3b 0a 20 farg_offset;.
2bf0: 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 20 20 20 long
2c00: 64 61 72 67 5f 6f 66 66 73 65 74 3b 0a 20 20 66 darg_offset;. f
2c10: 6c 6f 61 74 20 20 20 20 20 20 20 20 20 20 66 61 loat fa
2c20: 72 67 5b 34 5d 3b 0a 20 20 64 6f 75 62 6c 65 20 rg[4];. double
2c30: 20 20 20 20 20 20 20 20 64 61 72 67 5b 32 5d 3b darg[2];
2c40: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
2c50: 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 ned(__mips__) &&
2c60: 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 !defined(__mips
2c70: 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 6e n32__) && !defin
2c80: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 ed(__mips64__).
2c90: 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 int
2ca0: 61 6e 75 6d 3b 0a 20 20 66 6c 6f 61 74 20 20 20 anum;. float
2cb0: 20 20 20 20 20 20 20 66 61 72 67 5b 32 5d 3b 0a farg[2];.
2cc0: 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 double
2cd0: 20 64 61 72 67 5b 32 5d 3b 0a 23 65 6e 64 69 66 darg[2];.#endif
2ce0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
2cf0: 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 ipsn32__) || def
2d00: 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 ined(__mips64__)
2d10: 0a 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 . int
2d20: 20 20 61 6e 75 6d 3b 0a 20 20 66 6c 6f 61 74 20 anum;. float
2d30: 20 20 20 20 20 20 20 20 20 66 61 72 67 5b 38 5d farg[8]
2d40: 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 ;. double
2d50: 20 20 20 64 61 72 67 5b 38 5d 3b 0a 23 65 6e 64 darg[8];.#end
2d60: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
2d70: 5f 73 70 61 72 63 36 34 5f 5f 29 0a 20 20 69 6e _sparc64__). in
2d80: 74 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 75 t anu
2d90: 6d 3b 0a 20 20 66 6c 6f 61 74 20 20 20 20 20 20 m;. float
2da0: 20 20 20 20 66 61 72 67 5b 31 36 5d 3b 0a 20 20 farg[16];.
2db0: 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 64 double d
2dc0: 61 72 67 5b 31 36 5d 3b 0a 23 65 6e 64 69 66 0a arg[16];.#endif.
2dd0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f #if defined(__po
2de0: 77 65 72 70 63 5f 5f 29 20 7c 7c 20 64 65 66 69 werpc__) || defi
2df0: 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f ned(__powerpc64_
2e00: 5f 29 0a 20 20 64 6f 75 62 6c 65 2a 20 20 20 20 _). double*
2e10: 20 20 20 20 6d 65 6d 66 61 72 67 70 74 72 3b 0a memfargptr;.
2e20: 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 double
2e30: 20 66 61 72 67 5b 31 33 5d 3b 0a 23 69 66 20 21 farg[13];.#if !
2e40: 28 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c (defined(_AIX) |
2e50: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 | (defined(__MAC
2e60: 48 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 H__) && defined(
2e70: 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 20 20 5f __APPLE__))). _
2e80: 5f 76 61 77 6f 72 64 20 20 20 20 20 20 20 72 65 _vaword re
2e90: 67 61 72 67 5b 38 5d 3b 0a 20 20 75 6e 73 69 67 garg[8];. unsig
2ea0: 6e 65 64 20 6c 6f 6e 67 20 20 73 61 70 74 72 3b ned long saptr;
2eb0: 0a 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 . int
2ec0: 20 20 6f 6e 73 74 61 63 6b 3b 0a 23 65 6e 64 69 onstack;.#endi
2ed0: 66 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 f.#endif.#if def
2ee0: 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 20 ined(__s390__).
2ef0: 20 66 6c 6f 61 74 2a 20 20 20 20 20 20 20 20 20 float*
2f00: 6d 65 6d 66 61 72 67 70 74 72 3b 0a 20 20 64 6f memfargptr;. do
2f10: 75 62 6c 65 2a 20 20 20 20 20 20 20 20 6d 65 6d uble* mem
2f20: 64 61 72 67 70 74 72 3b 0a 20 20 66 6c 6f 61 74 dargptr;. float
2f30: 20 20 20 20 20 20 20 20 20 20 66 61 72 67 5b 32 farg[2
2f40: 5d 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 ];. double
2f50: 20 20 20 20 64 61 72 67 5b 32 5d 3b 0a 20 20 5f darg[2];. _
2f60: 5f 76 61 77 6f 72 64 20 20 20 20 20 20 20 72 65 _vaword re
2f70: 67 61 72 67 5b 35 5d 3b 0a 20 20 75 6e 73 69 67 garg[5];. unsig
2f80: 6e 65 64 20 6c 6f 6e 67 20 20 73 61 70 74 72 3b ned long saptr;
2f90: 0a 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 . int
2fa0: 20 20 6f 6e 73 74 61 63 6b 3b 0a 23 65 6e 64 69 onstack;.#endi
2fb0: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
2fc0: 69 61 36 34 5f 5f 29 0a 20 20 5f 5f 76 61 77 6f ia64__). __vawo
2fd0: 72 64 2a 20 20 20 20 20 20 73 61 70 74 72 3b 0a rd* saptr;.
2fe0: 20 20 64 6f 75 62 6c 65 2a 20 20 20 20 20 20 20 double*
2ff0: 20 6d 65 6d 66 61 72 67 70 74 72 3b 0a 20 20 64 memfargptr;. d
3000: 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 66 61 ouble fa
3010: 72 67 5b 38 5d 3b 0a 23 65 6e 64 69 66 0a 23 69 rg[8];.#endif.#i
3020: 66 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f f defined(__x86_
3030: 36 34 5f 5f 29 0a 20 20 64 6f 75 62 6c 65 2a 20 64__). double*
3040: 20 20 20 20 20 20 20 6d 65 6d 66 61 72 67 70 74 memfargpt
3050: 72 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 r;. double
3060: 20 20 20 20 66 61 72 67 5b 38 5d 3b 0a 20 20 5f farg[8];. _
3070: 5f 76 61 77 6f 72 64 2a 20 20 20 20 20 20 6d 65 _vaword* me
3080: 6d 69 61 72 67 70 74 72 3b 0a 20 20 5f 5f 76 61 miargptr;. __va
3090: 77 6f 72 64 20 20 20 20 20 20 20 69 61 72 67 5b word iarg[
30a0: 36 5d 3b 0a 23 65 6e 64 69 66 0a 7d 20 5f 5f 76 6];.#endif.} __v
30b0: 61 5f 61 6c 69 73 74 3b 0a 0a 74 79 70 65 64 65 a_alist;..typede
30c0: 66 20 5f 5f 76 61 5f 61 6c 69 73 74 2a 20 76 61 f __va_alist* va
30d0: 5f 61 6c 69 73 74 3b 0a 0a 0a 2f 2a 0a 20 2a 20 _alist;.../*. *
30e0: 44 65 66 69 6e 69 74 69 6f 6e 20 6f 66 20 74 68 Definition of th
30f0: 65 20 76 61 5f 73 74 61 72 74 5f 78 78 78 20 6d e va_start_xxx m
3100: 61 63 72 6f 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 acros.. */.#defi
3110: 6e 65 20 5f 5f 56 41 5f 53 54 41 52 54 5f 46 4c ne __VA_START_FL
3120: 41 47 53 20 20 5c 0a 20 20 5f 5f 56 41 5f 53 54 AGS \. __VA_ST
3130: 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 20 5f 5f RUCT_RETURN | __
3140: 56 41 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 20 VA_FLOAT_RETURN
3150: 7c 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 52 | __VA_STRUCT_AR
3160: 47 53 20 7c 20 5f 5f 56 41 5f 43 4c 45 41 4e 55 GS | __VA_CLEANU
3170: 50 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 P.#define __va_s
3180: 74 61 72 74 28 4c 49 53 54 2c 52 45 54 54 59 50 tart(LIST,RETTYP
3190: 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d E) \. ((LIST)-
31a0: 3e 66 6c 61 67 73 20 3d 20 5f 5f 56 41 5f 53 54 >flags = __VA_ST
31b0: 41 52 54 5f 46 4c 41 47 53 2c 09 09 09 09 09 5c ART_FLAGS,.....\
31c0: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 72 74 79 70 . (LIST)->rtyp
31d0: 65 20 3d 20 28 52 45 54 54 59 50 45 29 09 09 09 e = (RETTYPE)...
31e0: 09 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 ...\. ).#define
31f0: 20 76 61 5f 73 74 61 72 74 5f 76 6f 69 64 28 4c va_start_void(L
3200: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
3210: 28 4c 49 53 54 2c 5f 5f 56 41 76 6f 69 64 29 0a (LIST,__VAvoid).
3220: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3230: 5f 63 68 61 72 28 4c 49 53 54 29 09 20 5f 5f 76 _char(LIST). __v
3240: 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 a_start(LIST,__V
3250: 41 63 68 61 72 29 0a 23 64 65 66 69 6e 65 20 76 Achar).#define v
3260: 61 5f 73 74 61 72 74 5f 73 63 68 61 72 28 4c 49 a_start_schar(LI
3270: 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 28 ST). __va_start(
3280: 4c 49 53 54 2c 5f 5f 56 41 73 63 68 61 72 29 0a LIST,__VAschar).
3290: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
32a0: 5f 75 63 68 61 72 28 4c 49 53 54 29 09 20 5f 5f _uchar(LIST). __
32b0: 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f va_start(LIST,__
32c0: 56 41 75 63 68 61 72 29 0a 23 64 65 66 69 6e 65 VAuchar).#define
32d0: 20 76 61 5f 73 74 61 72 74 5f 73 68 6f 72 74 28 va_start_short(
32e0: 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 LIST). __va_star
32f0: 74 28 4c 49 53 54 2c 5f 5f 56 41 73 68 6f 72 74 t(LIST,__VAshort
3300: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 ).#define va_sta
3310: 72 74 5f 75 73 68 6f 72 74 28 4c 49 53 54 29 09 rt_ushort(LIST).
3320: 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 __va_start(LIST
3330: 2c 5f 5f 56 41 75 73 68 6f 72 74 29 0a 23 64 65 ,__VAushort).#de
3340: 66 69 6e 65 20 76 61 5f 73 74 61 72 74 5f 69 6e fine va_start_in
3350: 74 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 t(LIST). __va_st
3360: 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 69 6e 74 art(LIST,__VAint
3370: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 ).#define va_sta
3380: 72 74 5f 75 69 6e 74 28 4c 49 53 54 29 09 20 5f rt_uint(LIST). _
3390: 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f _va_start(LIST,_
33a0: 5f 56 41 75 69 6e 74 29 0a 23 64 65 66 69 6e 65 _VAuint).#define
33b0: 20 76 61 5f 73 74 61 72 74 5f 6c 6f 6e 67 28 4c va_start_long(L
33c0: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
33d0: 28 4c 49 53 54 2c 5f 5f 56 41 6c 6f 6e 67 29 0a (LIST,__VAlong).
33e0: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
33f0: 5f 75 6c 6f 6e 67 28 4c 49 53 54 29 09 20 5f 5f _ulong(LIST). __
3400: 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f va_start(LIST,__
3410: 56 41 75 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 VAulong).#define
3420: 20 76 61 5f 73 74 61 72 74 5f 6c 6f 6e 67 6c 6f va_start_longlo
3430: 6e 67 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 ng(LIST). __va_s
3440: 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 6c 6f tart(LIST,__VAlo
3450: 6e 67 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 20 nglong).#define
3460: 76 61 5f 73 74 61 72 74 5f 75 6c 6f 6e 67 6c 6f va_start_ulonglo
3470: 6e 67 28 4c 49 53 54 29 20 5f 5f 76 61 5f 73 74 ng(LIST) __va_st
3480: 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 75 6c 6f art(LIST,__VAulo
3490: 6e 67 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 20 nglong).#define
34a0: 76 61 5f 73 74 61 72 74 5f 66 6c 6f 61 74 28 4c va_start_float(L
34b0: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
34c0: 28 4c 49 53 54 2c 5f 5f 56 41 66 6c 6f 61 74 29 (LIST,__VAfloat)
34d0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 .#define va_star
34e0: 74 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 20 t_double(LIST).
34f0: 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c __va_start(LIST,
3500: 5f 5f 56 41 64 6f 75 62 6c 65 29 0a 23 64 65 66 __VAdouble).#def
3510: 69 6e 65 20 76 61 5f 73 74 61 72 74 5f 70 74 72 ine va_start_ptr
3520: 28 4c 49 53 54 2c 54 59 50 45 29 09 20 5f 5f 76 (LIST,TYPE). __v
3530: 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 a_start(LIST,__V
3540: 41 76 6f 69 64 70 29 0a 0a 2f 2a 0a 20 2a 20 76 Avoidp)../*. * v
3550: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 3a 20 a_start_struct:
3560: 50 72 65 70 61 72 69 6e 67 20 73 74 72 75 63 74 Preparing struct
3570: 75 72 65 20 72 65 74 75 72 6e 2e 0a 20 2a 2f 0a ure return.. */.
3580: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3590: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
35a0: 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c E,TYPE_SPLITTABL
35b0: 45 29 20 20 5c 0a 20 20 5f 76 61 5f 73 74 61 72 E) \. _va_star
35c0: 74 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 73 69 t_struct(LIST,si
35d0: 7a 65 6f 66 28 54 59 50 45 29 2c 5f 5f 56 41 5f zeof(TYPE),__VA_
35e0: 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 2c 54 59 alignof(TYPE),TY
35f0: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 0a 2f PE_SPLITTABLE)./
3600: 2a 20 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 * _va_start_stru
3610: 63 74 28 29 20 69 73 20 6c 69 6b 65 20 76 61 5f ct() is like va_
3620: 73 74 61 72 74 5f 73 74 72 75 63 74 28 29 2c 20 start_struct(),
3630: 65 78 63 65 70 74 20 74 68 61 74 20 79 6f 75 20 except that you
3640: 70 61 73 73 0a 20 2a 20 74 68 65 20 74 79 70 65 pass. * the type
3650: 27 73 20 73 69 7a 65 20 61 6e 64 20 61 6c 69 67 's size and alig
3660: 6e 6d 65 6e 74 20 69 6e 73 74 65 61 64 20 6f 66 nment instead of
3670: 20 74 68 65 20 74 79 70 65 20 69 74 73 65 6c 66 the type itself
3680: 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 76 .. */.#define _v
3690: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 28 4c a_start_struct(L
36a0: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
36b0: 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 PE_ALIGN,TYPE_SP
36c0: 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 LITTABLE) \. (
36d0: 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c __va_start(LIST,
36e0: 5f 5f 56 41 73 74 72 75 63 74 29 2c 09 09 09 09 __VAstruct),....
36f0: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 72 ..\. (LIST)->r
3700: 73 69 7a 65 20 3d 20 28 54 59 50 45 5f 53 49 5a size = (TYPE_SIZ
3710: 45 29 2c 09 09 09 09 09 09 5c 0a 20 20 20 28 28 E),......\. ((
3720: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f LIST)->flags & _
3730: 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 54 52 _VA_SUNPROCC_STR
3740: 55 43 54 5f 52 45 54 55 52 4e 09 09 09 09 5c 0a UCT_RETURN....\.
3750: 20 20 20 20 3f 20 5f 5f 76 61 5f 73 74 61 72 74 ? __va_start
3760: 5f 73 74 72 75 63 74 32 28 4c 49 53 54 29 09 09 _struct2(LIST)..
3770: 09 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 4c 49 ....\. : ((LI
3780: 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 28 5f 5f ST)->flags & (__
3790: 56 41 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 VA_PCC_STRUCT_RE
37a0: 54 55 52 4e 20 7c 20 5f 5f 56 41 5f 53 55 4e 43 TURN | __VA_SUNC
37b0: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 C_STRUCT_RETURN)
37c0: 20 5c 0a 20 20 20 20 20 20 20 3f 20 28 28 54 59 \. ? ((TY
37d0: 50 45 5f 53 49 5a 45 29 20 3c 3d 20 73 69 7a 65 PE_SIZE) <= size
37e0: 6f 66 28 5f 5f 76 61 5f 73 74 72 75 63 74 5f 62 of(__va_struct_b
37f0: 75 66 66 65 72 29 20 7c 7c 20 5f 5f 76 61 5f 65 uffer) || __va_e
3800: 72 72 6f 72 32 28 54 59 50 45 5f 53 49 5a 45 29 rror2(TYPE_SIZE)
3810: 2c 20 5c 0a 20 20 20 20 20 20 20 20 20 20 28 4c , \. (L
3820: 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 26 5f IST)->raddr = &_
3830: 5f 76 61 5f 73 74 72 75 63 74 5f 62 75 66 66 65 _va_struct_buffe
3840: 72 2c 09 09 09 09 5c 0a 20 20 20 20 20 20 20 20 r,....\.
3850: 20 20 30 09 09 09 09 09 09 09 09 5c 0a 20 20 20 0........\.
3860: 20 20 20 20 20 20 29 09 09 09 09 09 09 09 09 5c )........\
3870: 0a 20 20 20 20 20 20 20 3a 20 28 28 28 4c 49 53 . : (((LIS
3880: 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 T)->flags & __VA
3890: 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 _SMALL_STRUCT_RE
38a0: 54 55 52 4e 29 09 09 09 5c 0a 20 20 20 20 20 20 TURN)...\.
38b0: 20 20 20 20 26 26 20 5f 5f 76 61 5f 72 65 67 5f && __va_reg_
38c0: 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 struct_return(LI
38d0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
38e0: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 5c 0a E_SPLITTABLE).\.
38f0: 20 20 20 20 20 20 20 20 20 20 3f 20 28 28 4c 49 ? ((LI
3900: 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 26 28 4c ST)->raddr = &(L
3910: 49 53 54 29 2d 3e 74 6d 70 2c 09 09 09 09 5c 0a IST)->tmp,....\.
3920: 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 5f 76 __v
3930: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 a_start_struct1(
3940: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
3950: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
3960: 50 4c 49 54 54 41 42 4c 45 29 20 5c 0a 20 20 20 PLITTABLE) \.
3970: 20 20 20 20 20 20 20 20 20 29 09 09 09 09 09 09 )......
3980: 09 09 5c 0a 20 20 20 20 20 20 20 20 20 20 3a 20 ..\. :
3990: 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 __va_start_struc
39a0: 74 32 28 4c 49 53 54 29 09 09 09 09 09 5c 0a 20 t2(LIST).....\.
39b0: 20 29 29 20 20 29 20 20 29 0a 2f 2a 20 44 65 74 )) ) )./* Det
39c0: 65 72 6d 69 6e 65 73 20 77 68 65 74 68 65 72 20 ermines whether
39d0: 61 20 73 74 72 75 63 74 75 72 65 20 69 73 20 72 a structure is r
39e0: 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 73 eturned in regis
39f0: 74 65 72 73 2c 0a 20 2a 20 64 65 70 65 6e 64 69 ters,. * dependi
3a00: 6e 67 20 6f 6e 20 69 74 73 20 73 69 7a 65 20 61 ng on its size a
3a10: 6e 64 20 69 74 73 20 77 6f 72 64 2d 73 70 6c 69 nd its word-spli
3a20: 74 74 61 62 6c 65 20 66 6c 61 67 2e 0a 20 2a 2f ttable flag.. */
3a30: 0a 23 69 66 20 28 64 65 66 69 6e 65 64 28 5f 5f .#if (defined(__
3a40: 69 33 38 36 5f 5f 29 20 26 26 20 64 65 66 69 6e i386__) && defin
3a50: 65 64 28 5f 57 49 4e 33 32 29 29 0a 23 64 65 66 ed(_WIN32)).#def
3a60: 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 74 72 ine __va_reg_str
3a70: 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c uct_return(LIST,
3a80: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 53 TYPE_SIZE,TYPE_S
3a90: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
3aa0: 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 ((TYPE_SIZE) ==
3ab0: 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 1 || (TYPE_SIZE)
3ac0: 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f 53 == 2 || (TYPE_S
3ad0: 49 5a 45 29 20 3d 3d 20 34 09 09 5c 0a 20 20 20 IZE) == 4..\.
3ae0: 7c 7c 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 || ((TYPE_SIZE)
3af0: 3d 3d 20 38 09 09 09 09 09 09 09 5c 0a 20 20 20 == 8.......\.
3b00: 20 20 20 20 26 26 20 28 28 28 4c 49 53 54 29 2d && (((LIST)-
3b10: 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 4d 53 >flags & __VA_MS
3b20: 56 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e VC_STRUCT_RETURN
3b30: 29 09 09 09 5c 0a 20 20 20 20 20 20 20 20 20 20 )...\.
3b40: 20 7c 7c 20 28 28 54 59 50 45 5f 53 50 4c 49 54 || ((TYPE_SPLIT
3b50: 54 41 42 4c 45 29 09 09 09 09 09 5c 0a 20 20 20 TABLE).....\.
3b60: 20 20 20 20 20 20 20 20 20 20 20 20 26 26 20 28 && (
3b70: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 (LIST)->flags &
3b80: 5f 5f 56 41 5f 47 43 43 5f 53 54 52 55 43 54 5f __VA_GCC_STRUCT_
3b90: 52 45 54 55 52 4e 29 09 09 5c 0a 20 20 29 20 20 RETURN)..\. )
3ba0: 20 29 20 20 20 29 20 20 20 29 0a 2f 2a 20 54 75 ) ) )./* Tu
3bb0: 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 rn on __VA_REGIS
3bc0: 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 TER_STRUCT_RETUR
3bd0: 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f N if __VA_SMALL_
3be0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 STRUCT_RETURN wa
3bf0: 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 s set. * and the
3c00: 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 struct will act
3c10: 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 ually be returne
3c20: 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a d in registers..
3c30: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
3c40: 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c _start_struct1(L
3c50: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
3c60: 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 PE_ALIGN,TYPE_SP
3c70: 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 LITTABLE) \. (
3c80: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d (LIST)->flags |=
3c90: 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 __VA_REGISTER_S
3ca0: 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 29 TRUCT_RETURN, 0)
3cb0: 0a 23 65 6e 64 69 66 0a 23 69 66 20 28 64 65 66 .#endif.#if (def
3cc0: 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 26 ined(__i386__) &
3cd0: 26 20 21 64 65 66 69 6e 65 64 28 5f 57 49 4e 33 & !defined(_WIN3
3ce0: 32 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 2)) || defined(_
3cf0: 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 65 66 _m68k__) || (def
3d00: 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 26 26 ined(__arm__) &&
3d10: 20 21 64 65 66 69 6e 65 64 28 5f 5f 41 52 4d 45 !defined(__ARME
3d20: 4c 5f 5f 29 29 20 7c 7c 20 28 64 65 66 69 6e 65 L__)) || (define
3d30: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 d(__powerpc__) &
3d40: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 & !defined(__pow
3d50: 65 72 70 63 36 34 5f 5f 29 29 20 7c 7c 20 64 65 erpc64__)) || de
3d60: 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f fined(__convex__
3d70: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
3d80: 33 39 30 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 390__).#define _
3d90: 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 _va_reg_struct_r
3da0: 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f eturn(LIST,TYPE_
3db0: 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 SIZE,TYPE_SPLITT
3dc0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 50 ABLE) \. ((TYP
3dd0: 45 5f 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 E_SIZE) == 1 ||
3de0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 (TYPE_SIZE) == 2
3df0: 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 || (TYPE_SIZE)
3e00: 3d 3d 20 34 09 09 5c 0a 20 20 20 7c 7c 20 28 28 == 4..\. || ((
3e10: 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 38 20 TYPE_SIZE) == 8
3e20: 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 54 41 && (TYPE_SPLITTA
3e30: 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 20 20 BLE)....\.
3e40: 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 && ((LIST)->fla
3e50: 67 73 20 26 20 5f 5f 56 41 5f 47 43 43 5f 53 54 gs & __VA_GCC_ST
3e60: 52 55 43 54 5f 52 45 54 55 52 4e 29 09 09 09 5c RUCT_RETURN)...\
3e70: 0a 20 20 29 20 20 20 29 0a 2f 2a 20 54 75 72 6e . ) )./* Turn
3e80: 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 on __VA_REGISTE
3e90: 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 R_STRUCT_RETURN
3ea0: 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 if __VA_SMALL_ST
3eb0: 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 73 20 RUCT_RETURN was
3ec0: 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 20 73 set. * and the s
3ed0: 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 75 61 truct will actua
3ee0: 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 64 20 lly be returned
3ef0: 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a in registers.. *
3f00: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 /.#define __va_s
3f10: 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 tart_struct1(LIS
3f20: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
3f30: 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 _ALIGN,TYPE_SPLI
3f40: 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c TTABLE) \. ((L
3f50: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
3f60: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 _VA_REGISTER_STR
3f70: 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 29 0a 23 UCT_RETURN, 0).#
3f80: 65 6e 64 69 66 0a 0a 23 69 66 20 64 65 66 69 6e endif..#if defin
3f90: 65 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 0a 2f 2a ed(__ARMEL__)./*
3fa0: 20 73 74 72 75 63 74 73 20 6f 66 20 73 69 7a 65 structs of size
3fb0: 20 33 20 61 6c 73 6f 20 77 69 6c 6c 20 62 65 20 3 also will be
3fc0: 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 returned in regi
3fd0: 73 74 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ster */.#define
3fe0: 5f 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f __va_reg_struct_
3ff0: 72 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 return(LIST,TYPE
4000: 5f 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 _SIZE,TYPE_SPLIT
4010: 54 41 42 4c 45 29 20 20 5c 0a 20 20 20 20 28 28 TABLE) \. ((
4020: 54 59 50 45 5f 53 49 5a 45 29 20 3c 3d 20 34 29 TYPE_SIZE) <= 4)
4030: 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f 56 41 ./* Turn on __VA
4040: 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 43 54 _REGISTER_STRUCT
4050: 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f 56 41 5f _RETURN if __VA_
4060: 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 54 SMALL_STRUCT_RET
4070: 55 52 4e 20 77 61 73 20 73 65 74 0a 20 2a 20 61 URN was set. * a
4080: 6e 64 20 74 68 65 20 73 74 72 75 63 74 20 77 69 nd the struct wi
4090: 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 20 72 ll actually be r
40a0: 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 73 eturned in regis
40b0: 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e ters.. */.#defin
40c0: 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 e __va_start_str
40d0: 75 63 74 31 28 4c 49 53 54 2c 54 59 50 45 5f 53 uct1(LIST,TYPE_S
40e0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c 54 IZE,TYPE_ALIGN,T
40f0: 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 YPE_SPLITTABLE)
4100: 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c \. ((LIST)->fl
4110: 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 ags |= __VA_REGI
4120: 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 STER_STRUCT_RETU
4130: 52 4e 2c 20 30 29 0a 23 65 6e 64 69 66 0a 23 69 RN, 0).#endif.#i
4140: 66 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 f defined(__alph
4150: 61 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 a__).#define __v
4160: 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 65 74 a_reg_struct_ret
4170: 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 urn(LIST,TYPE_SI
4180: 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 ZE,TYPE_SPLITTAB
4190: 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f LE) \. ((TYPE_
41a0: 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 28 54 SIZE) == 1 || (T
41b0: 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 20 7c YPE_SIZE) == 2 |
41c0: 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d | (TYPE_SIZE) ==
41d0: 20 34 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 4 || (TYPE_SIZE
41e0: 29 20 3d 3d 20 38 09 5c 0a 20 20 20 7c 7c 20 28 ) == 8.\. || (
41f0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 31 (TYPE_SIZE) == 1
4200: 36 20 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 6 && (TYPE_SPLIT
4210: 54 41 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 TABLE)....\.
4220: 20 20 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 && ((LIST)->f
4230: 6c 61 67 73 20 26 20 5f 5f 56 41 5f 47 43 43 5f lags & __VA_GCC_
4240: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 09 09 STRUCT_RETURN)..
4250: 09 5c 0a 20 20 29 20 20 20 29 0a 2f 2a 20 54 75 .\. ) )./* Tu
4260: 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 rn on __VA_REGIS
4270: 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 TER_STRUCT_RETUR
4280: 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f N if __VA_SMALL_
4290: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 STRUCT_RETURN wa
42a0: 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 s set. * and the
42b0: 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 struct will act
42c0: 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 ually be returne
42d0: 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a d in registers..
42e0: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
42f0: 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c _start_struct1(L
4300: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
4310: 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 PE_ALIGN,TYPE_SP
4320: 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 LITTABLE) \. (
4330: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d (LIST)->flags |=
4340: 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 __VA_REGISTER_S
4350: 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 29 TRUCT_RETURN, 0)
4360: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
4370: 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a 23 64 ned(__hppa__).#d
4380: 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 efine __va_reg_s
4390: 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 truct_return(LIS
43a0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
43b0: 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a _SPLITTABLE) \.
43c0: 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 ((LIST)->flags
43d0: 20 26 20 5f 5f 56 41 5f 4f 4c 44 47 43 43 5f 53 & __VA_OLDGCC_S
43e0: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 09 09 09 TRUCT_RETURN....
43f0: 5c 0a 20 20 20 3f 20 28 28 54 59 50 45 5f 53 49 \. ? ((TYPE_SI
4400: 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 28 54 59 50 ZE) == 1 || (TYP
4410: 45 5f 53 49 5a 45 29 20 3d 3d 20 32 20 7c 7c 20 E_SIZE) == 2 ||
4420: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 34 (TYPE_SIZE) == 4
4430: 29 09 09 5c 0a 20 20 20 3a 20 28 28 54 59 50 45 )..\. : ((TYPE
4440: 5f 53 49 5a 45 29 20 3c 3d 20 38 29 09 09 09 09 _SIZE) <= 8)....
4450: 09 09 09 5c 0a 20 20 29 0a 2f 2a 20 54 65 73 74 ...\. )./* Test
4460: 20 62 6f 74 68 20 5f 5f 56 41 5f 4f 4c 44 47 43 both __VA_OLDGC
4470: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 C_STRUCT_RETURN
4480: 61 6e 64 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 and __VA_SMALL_S
4490: 54 52 55 43 54 5f 52 45 54 55 52 4e 20 61 74 20 TRUCT_RETURN at
44a0: 72 75 6e 20 74 69 6d 65 2e 20 2a 2f 0a 23 64 65 run time. */.#de
44b0: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
44c0: 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 struct1(LIST,TYP
44d0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
44e0: 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c N,TYPE_SPLITTABL
44f0: 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 69 66 E) \. 0.#endif
4500: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
4510: 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e ips__) && !defin
4520: 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 ed(__mipsn32__)
4530: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 && !defined(__mi
4540: 70 73 36 34 5f 5f 29 20 7c 7c 20 28 64 65 66 69 ps64__) || (defi
4550: 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 ned(__sparc__) &
4560: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 & !defined(__spa
4570: 72 63 36 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 rc64__)) || defi
4580: 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 0a 23 64 ned(__m88k__).#d
4590: 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 efine __va_reg_s
45a0: 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 truct_return(LIS
45b0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
45c0: 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a _SPLITTABLE) \.
45d0: 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d ((TYPE_SIZE) =
45e0: 3d 20 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a = 1 || (TYPE_SIZ
45f0: 45 29 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 E) == 2 || (TYPE
4600: 5f 53 49 5a 45 29 20 3d 3d 20 34 29 0a 2f 2a 20 _SIZE) == 4)./*
4610: 54 65 73 74 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f Test __VA_SMALL_
4620: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 6e STRUCT_RETURN in
4630: 73 74 65 61 64 20 6f 66 20 5f 5f 56 41 5f 52 45 stead of __VA_RE
4640: 47 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 GISTER_STRUCT_RE
4650: 54 55 52 4e 2e 20 2a 2f 0a 23 69 66 20 64 65 66 TURN. */.#if def
4660: 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 ined(__mips__) &
4670: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 & !defined(__mip
4680: 73 6e 33 32 5f 5f 29 20 26 26 20 21 64 65 66 69 sn32__) && !defi
4690: 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a ned(__mips64__).
46a0: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 #define __va_sta
46b0: 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 2c rt_struct1(LIST,
46c0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
46d0: 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 LIGN,TYPE_SPLITT
46e0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 ABLE) \. ((LIS
46f0: 54 29 2d 3e 61 6e 75 6d 2b 2b 2c 09 09 09 09 09 T)->anum++,.....
4700: 09 09 5c 0a 20 20 20 30 09 09 09 09 09 09 09 09 ..\. 0........
4710: 09 5c 0a 20 20 29 0a 23 65 6c 73 65 0a 23 64 65 .\. ).#else.#de
4720: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
4730: 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 struct1(LIST,TYP
4740: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
4750: 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c N,TYPE_SPLITTABL
4760: 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 69 66 E) \. 0.#endif
4770: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
4780: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
4790: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
47a0: 70 73 36 34 5f 5f 29 0a 23 64 65 66 69 6e 65 20 ps64__).#define
47b0: 5f 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f __va_reg_struct_
47c0: 72 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 return(LIST,TYPE
47d0: 5f 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 _SIZE,TYPE_SPLIT
47e0: 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 TABLE) \. ((LI
47f0: 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 ST)->flags & __V
4800: 41 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 A_GCC_STRUCT_RET
4810: 55 52 4e 09 09 09 09 5c 0a 20 20 20 3f 20 28 28 URN....\. ? ((
4820: 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 31 20 TYPE_SIZE) == 1
4830: 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d || (TYPE_SIZE) =
4840: 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a = 2 || (TYPE_SIZ
4850: 45 29 20 3d 3d 20 34 20 7c 7c 20 28 54 59 50 45 E) == 4 || (TYPE
4860: 5f 53 49 5a 45 29 20 3d 3d 20 38 29 20 5c 0a 20 _SIZE) == 8) \.
4870: 20 20 3a 20 28 28 54 59 50 45 5f 53 49 5a 45 29 : ((TYPE_SIZE)
4880: 20 3c 3d 20 31 36 29 09 09 09 09 09 09 5c 0a 20 <= 16)......\.
4890: 20 29 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f )./* Turn on __
48a0: 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 VA_REGISTER_STRU
48b0: 43 54 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f 56 CT_RETURN if __V
48c0: 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 A_SMALL_STRUCT_R
48d0: 45 54 55 52 4e 20 77 61 73 20 73 65 74 0a 20 2a ETURN was set. *
48e0: 20 61 6e 64 20 74 68 65 20 73 74 72 75 63 74 20 and the struct
48f0: 77 69 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 will actually be
4900: 20 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 returned in reg
4910: 69 73 74 65 72 73 2e 20 41 6c 73 6f 20 74 75 72 isters. Also tur
4920: 6e 20 6f 6e 0a 20 2a 20 5f 5f 56 41 5f 52 45 47 n on. * __VA_REG
4930: 49 53 54 45 52 5f 46 4c 4f 41 54 53 54 52 55 43 ISTER_FLOATSTRUC
4940: 54 5f 52 45 54 55 52 4e 20 6f 72 20 5f 5f 56 41 T_RETURN or __VA
4950: 5f 52 45 47 49 53 54 45 52 5f 44 4f 55 42 4c 45 _REGISTER_DOUBLE
4960: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 66 STRUCT_RETURN if
4970: 0a 20 2a 20 74 68 65 20 73 74 72 75 63 74 20 77 . * the struct w
4980: 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 20 ill be returned
4990: 69 6e 20 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e in floating-poin
49a0: 74 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a 2f t registers.. */
49b0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 .#define __va_st
49c0: 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 art_struct1(LIST
49d0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
49e0: 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 ALIGN,TYPE_SPLIT
49f0: 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 TABLE) \. ((LI
4a00: 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f ST)->flags |= __
4a10: 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 VA_REGISTER_STRU
4a20: 43 54 5f 52 45 54 55 52 4e 2c 09 09 09 09 5c 0a CT_RETURN,....\.
4a30: 20 20 20 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 (TYPE_ALIGN)
4a40: 3d 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 == sizeof(float)
4a50: 20 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 54 && (TYPE_SPLITT
4a60: 41 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 26 ABLE)....\. &
4a70: 26 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d & ((TYPE_SIZE) =
4a80: 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 20 = sizeof(float)
4a90: 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d || (TYPE_SIZE) =
4aa0: 3d 20 32 2a 73 69 7a 65 6f 66 28 66 6c 6f 61 74 = 2*sizeof(float
4ab0: 29 29 09 09 5c 0a 20 20 20 20 26 26 20 28 28 4c ))..\. && ((L
4ac0: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
4ad0: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 46 4c 4f _VA_REGISTER_FLO
4ae0: 41 54 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 ATSTRUCT_RETURN)
4af0: 2c 09 09 09 5c 0a 20 20 20 28 54 59 50 45 5f 41 ,...\. (TYPE_A
4b00: 4c 49 47 4e 29 20 3d 3d 20 73 69 7a 65 6f 66 28 LIGN) == sizeof(
4b10: 64 6f 75 62 6c 65 29 20 26 26 20 28 54 59 50 45 double) && (TYPE
4b20: 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 09 09 09 _SPLITTABLE)....
4b30: 5c 0a 20 20 20 20 26 26 20 28 28 54 59 50 45 5f \. && ((TYPE_
4b40: 53 49 5a 45 29 20 3d 3d 20 73 69 7a 65 6f 66 28 SIZE) == sizeof(
4b50: 64 6f 75 62 6c 65 29 20 7c 7c 20 28 54 59 50 45 double) || (TYPE
4b60: 5f 53 49 5a 45 29 20 3d 3d 20 32 2a 73 69 7a 65 _SIZE) == 2*size
4b70: 6f 66 28 64 6f 75 62 6c 65 29 29 09 5c 0a 20 20 of(double)).\.
4b80: 20 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c && ((LIST)->fl
4b90: 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 ags |= __VA_REGI
4ba0: 53 54 45 52 5f 44 4f 55 42 4c 45 53 54 52 55 43 STER_DOUBLESTRUC
4bb0: 54 5f 52 45 54 55 52 4e 29 2c 09 09 09 5c 0a 20 T_RETURN),...\.
4bc0: 20 20 30 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 0).#endif.#if
4bd0: 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 defined(__powerp
4be0: 63 36 34 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f c64__).#define _
4bf0: 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 _va_reg_struct_r
4c00: 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f eturn(LIST,TYPE_
4c10: 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 SIZE,TYPE_SPLITT
4c20: 41 42 4c 45 29 20 20 5c 0a 20 20 30 0a 23 64 65 ABLE) \. 0.#de
4c30: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
4c40: 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 struct1(LIST,TYP
4c50: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
4c60: 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c N,TYPE_SPLITTABL
4c70: 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 69 66 E) \. 0.#endif
4c80: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 .#if defined(__s
4c90: 70 61 72 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 parc64__) || def
4ca0: 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 23 ined(__ia64__).#
4cb0: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f define __va_reg_
4cc0: 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 struct_return(LI
4cd0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
4ce0: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c E_SPLITTABLE) \
4cf0: 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 . ((TYPE_SIZE)
4d00: 3c 3d 20 33 32 29 0a 2f 2a 20 54 75 72 6e 20 6f <= 32)./* Turn o
4d10: 6e 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f n __VA_REGISTER_
4d20: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 66 STRUCT_RETURN if
4d30: 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 __VA_SMALL_STRU
4d40: 43 54 5f 52 45 54 55 52 4e 20 77 61 73 20 73 65 CT_RETURN was se
4d50: 74 0a 20 2a 20 61 6e 64 20 74 68 65 20 73 74 72 t. * and the str
4d60: 75 63 74 20 77 69 6c 6c 20 61 63 74 75 61 6c 6c uct will actuall
4d70: 79 20 62 65 20 72 65 74 75 72 6e 65 64 20 69 6e y be returned in
4d80: 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a 2f 0a registers.. */.
4d90: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 #define __va_sta
4da0: 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 2c rt_struct1(LIST,
4db0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
4dc0: 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 LIGN,TYPE_SPLITT
4dd0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 ABLE) \. ((LIS
4de0: 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 T)->flags |= __V
4df0: 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 43 A_REGISTER_STRUC
4e00: 54 5f 52 45 54 55 52 4e 2c 09 09 09 09 5c 0a 20 T_RETURN,....\.
4e10: 20 20 30 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 0).#endif.#if
4e20: 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 defined(__x86_64
4e30: 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 __).#define __va
4e40: 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 65 74 75 _reg_struct_retu
4e50: 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a rn(LIST,TYPE_SIZ
4e60: 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c E,TYPE_SPLITTABL
4e70: 45 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 E) \. ((TYPE_S
4e80: 49 5a 45 29 20 3c 3d 20 31 36 29 0a 2f 2a 20 54 IZE) <= 16)./* T
4e90: 75 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 urn on __VA_REGI
4ea0: 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 STER_STRUCT_RETU
4eb0: 52 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c RN if __VA_SMALL
4ec0: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 _STRUCT_RETURN w
4ed0: 61 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 as set. * and th
4ee0: 65 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 e struct will ac
4ef0: 74 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e tually be return
4f00: 65 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e ed in registers.
4f10: 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
4f20: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 a_start_struct1(
4f30: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
4f40: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
4f50: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
4f60: 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c ((LIST)->flags |
4f70: 3d 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f = __VA_REGISTER_
4f80: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 09 09 STRUCT_RETURN,..
4f90: 09 09 5c 0a 20 20 20 30 29 0a 23 65 6e 64 69 66 ..\. 0).#endif
4fa0: 0a 2f 2a 0a 20 2a 20 50 72 65 70 61 72 69 6e 67 ./*. * Preparing
4fb0: 20 73 74 72 75 63 74 75 72 65 20 72 65 74 75 72 structure retur
4fc0: 6e 20 69 6e 20 6d 65 6d 6f 72 79 2e 0a 20 2a 2f n in memory.. */
4fd0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 .#if defined(__i
4fe0: 33 38 36 5f 5f 29 0a 2f 2a 20 52 65 74 75 72 6e 386__)./* Return
4ff0: 20 73 74 72 75 63 74 75 72 65 20 70 6f 69 6e 74 structure point
5000: 65 72 20 69 73 20 70 61 73 73 65 64 20 69 6e 20 er is passed in
5010: 61 20 73 70 65 63 69 61 6c 20 72 65 67 69 73 74 a special regist
5020: 65 72 20 6f 72 20 61 73 20 66 69 72 73 74 20 61 er or as first a
5030: 72 67 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f rg. */.#define _
5040: 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 _va_start_struct
5050: 32 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 2(LIST) \. ((L
5060: 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f IST)->flags & __
5070: 56 41 5f 4e 45 58 54 47 43 43 5f 53 54 52 55 43 VA_NEXTGCC_STRUC
5080: 54 5f 52 45 54 55 52 4e 09 09 09 09 5c 0a 20 20 T_RETURN....\.
5090: 20 3f 20 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 ? ((LIST)->radd
50a0: 72 20 3d 20 28 4c 49 53 54 29 2d 3e 73 74 72 75 r = (LIST)->stru
50b0: 63 74 72 61 64 64 72 2c 20 30 29 09 20 2f 2a 20 ctraddr, 0). /*
50c0: 73 70 65 63 69 61 6c 20 72 65 67 69 73 74 65 72 special register
50d0: 20 2a 2f 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 */.\. : ((LIS
50e0: 54 29 2d 3e 72 61 64 64 72 20 3d 20 2a 28 76 6f T)->raddr = *(vo
50f0: 69 64 2a 20 2a 29 28 28 4c 49 53 54 29 2d 3e 61 id* *)((LIST)->a
5100: 70 74 72 29 2c 09 09 2f 2a 20 66 69 72 73 74 20 ptr),../* first
5110: 61 72 67 20 2a 2f 09 5c 0a 20 20 20 20 20 20 28 arg */.\. (
5120: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
5130: 69 7a 65 6f 66 28 76 6f 69 64 2a 29 2c 09 09 09 izeof(void*),...
5140: 09 09 5c 0a 20 20 20 20 20 20 30 09 09 09 09 09 ..\. 0.....
5150: 09 09 09 09 5c 0a 20 20 29 20 20 29 0a 23 65 6e ....\. ) ).#en
5160: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
5170: 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 __alpha__) || de
5180: 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c fined(__arm__) |
5190: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 | defined(__powe
51a0: 72 70 63 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 rpc__) || define
51b0: 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 d(__powerpc64__)
51c0: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f || defined(__co
51d0: 6e 76 65 78 5f 5f 29 20 20 7c 7c 20 64 65 66 69 nvex__) || defi
51e0: 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a ned(__s390__)./*
51f0: 20 52 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 Return structur
5200: 65 20 70 6f 69 6e 74 65 72 20 69 73 20 70 61 73 e pointer is pas
5210: 73 65 64 20 61 73 20 66 69 72 73 74 20 61 72 67 sed as first arg
5220: 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
5230: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 a_start_struct2(
5240: 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 LIST) \. ((LIS
5250: 54 29 2d 3e 72 61 64 64 72 20 3d 20 2a 28 76 6f T)->raddr = *(vo
5260: 69 64 2a 20 2a 29 28 28 4c 49 53 54 29 2d 3e 61 id* *)((LIST)->a
5270: 70 74 72 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c ptr),....\. (L
5280: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
5290: 7a 65 6f 66 28 76 6f 69 64 2a 29 2c 09 09 09 09 zeof(void*),....
52a0: 09 5c 0a 20 20 20 30 09 09 09 09 09 09 09 09 09 .\. 0.........
52b0: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
52c0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f defined(__mips_
52d0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
52e0: 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 mipsn32__) || de
52f0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
5300: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
5310: 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 52 65 74 parc64__)./* Ret
5320: 75 72 6e 20 73 74 72 75 63 74 75 72 65 20 70 6f urn structure po
5330: 69 6e 74 65 72 20 69 73 20 70 61 73 73 65 64 20 inter is passed
5340: 61 73 20 66 69 72 73 74 20 61 72 67 2e 20 2a 2f as first arg. */
5350: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 .#define __va_st
5360: 61 72 74 5f 73 74 72 75 63 74 32 28 4c 49 53 54 art_struct2(LIST
5370: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
5380: 72 61 64 64 72 20 3d 20 2a 28 76 6f 69 64 2a 20 raddr = *(void*
5390: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 *)((LIST)->aptr)
53a0: 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 ,....\. (LIST)
53b0: 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 ->aptr += sizeof
53c0: 28 76 6f 69 64 2a 29 2c 09 09 09 09 09 5c 0a 20 (void*),.....\.
53d0: 20 20 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 2b 2b (LIST)->anum++
53e0: 2c 09 09 09 09 09 09 09 5c 0a 20 20 20 30 09 09 ,.......\. 0..
53f0: 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e .......\. ).#en
5400: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
5410: 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a 2f 2a 20 52 __x86_64__)./* R
5420: 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 65 20 eturn structure
5430: 70 6f 69 6e 74 65 72 20 69 73 20 70 61 73 73 65 pointer is passe
5440: 64 20 61 73 20 66 69 72 73 74 20 61 72 67 2e 20 d as first arg.
5450: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
5460: 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 4c 49 start_struct2(LI
5470: 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 ST) \. ((LIST)
5480: 2d 3e 72 61 64 64 72 20 3d 20 28 76 6f 69 64 20 ->raddr = (void
5490: 2a 29 28 2a 28 4c 49 53 54 29 2d 3e 6d 65 6d 69 *)(*(LIST)->memi
54a0: 61 72 67 70 74 72 2b 2b 29 2c 09 09 09 5c 0a 20 argptr++),...\.
54b0: 20 20 30 09 09 09 09 09 09 09 09 09 5c 0a 20 20 0.........\.
54c0: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
54d0: 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c ined(__m68k__) |
54e0: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 | (defined(__spa
54f0: 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 rc__) && !define
5500: 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 20 d(__sparc64__))
5510: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 || defined(__hpp
5520: 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 a__) || defined(
5530: 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 __m88k__) || def
5540: 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 2f ined(__ia64__)./
5550: 2a 20 52 65 74 75 72 6e 20 73 74 72 75 63 74 75 * Return structu
5560: 72 65 20 70 6f 69 6e 74 65 72 20 69 73 20 70 61 re pointer is pa
5570: 73 73 65 64 20 69 6e 20 61 20 73 70 65 63 69 61 ssed in a specia
5580: 6c 20 72 65 67 69 73 74 65 72 2e 20 2a 2f 0a 23 l register. */.#
5590: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 define __va_star
55a0: 74 5f 73 74 72 75 63 74 32 28 4c 49 53 54 29 20 t_struct2(LIST)
55b0: 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 72 61 \. ((LIST)->ra
55c0: 64 64 72 20 3d 20 28 4c 49 53 54 29 2d 3e 73 74 ddr = (LIST)->st
55d0: 72 75 63 74 72 61 64 64 72 2c 20 30 29 0a 23 65 ructraddr, 0).#e
55e0: 6e 64 69 66 0a 0a 0a 2f 2a 0a 20 2a 20 44 65 66 ndif.../*. * Def
55f0: 69 6e 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 76 inition of the v
5600: 61 5f 61 72 67 5f 78 78 78 20 6d 61 63 72 6f 73 a_arg_xxx macros
5610: 2e 0a 20 2a 2f 0a 0a 2f 2a 20 50 61 64 64 69 6e .. */../* Paddin
5620: 67 20 6f 66 20 6e 6f 6e 2d 73 74 72 75 63 74 20 g of non-struct
5630: 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 23 64 arguments. */.#d
5640: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 73 69 efine __va_argsi
5650: 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 20 20 5c ze(TYPE_SIZE) \
5660: 0a 20 20 28 28 28 54 59 50 45 5f 53 49 5a 45 29 . (((TYPE_SIZE)
5670: 20 2b 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f + sizeof(__vawo
5680: 72 64 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 rd)-1) & -(long)
5690: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
56a0: 29 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f ).#if defined(__
56b0: 69 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e i386__) || defin
56c0: 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 ed(__m68k__) ||
56d0: 28 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f (defined(__mips_
56e0: 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f _) && !defined(_
56f0: 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 26 26 20 21 _mipsn32__) && !
5700: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 defined(__mips64
5710: 5f 5f 29 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 __)) || (defined
5720: 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 (__sparc__) && !
5730: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
5740: 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 4__)) || defined
5750: 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 (__alpha__) || d
5760: 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 efined(__arm__)
5770: 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 70 6f || (defined(__po
5780: 77 65 72 70 63 5f 5f 29 20 26 26 20 21 64 65 66 werpc__) && !def
5790: 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 ined(__powerpc64
57a0: 5f 5f 29 20 26 26 20 28 64 65 66 69 6e 65 64 28 __) && (defined(
57b0: 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 _AIX) || (define
57c0: 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 d(__MACH__) && d
57d0: 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f efined(__APPLE__
57e0: 29 29 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 )))) || defined(
57f0: 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 20 7c __powerpc64__) |
5800: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 38 6b | defined(__m88k
5810: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
5820: 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 64 65 _convex__) || de
5830: 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 fined(__ia64__)
5840: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 || defined(__x86
5850: 5f 36 34 5f 5f 29 0a 2f 2a 20 61 72 67 73 20 67 _64__)./* args g
5860: 72 6f 77 20 75 70 20 2a 2f 0a 2f 2a 20 73 6d 61 row up */./* sma
5870: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 3c 20 ll structures <
5880: 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 1 word are adjus
5890: 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e ted depending on
58a0: 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 23 64 65 compiler */.#de
58b0: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 fine __va_arg_le
58c0: 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c ftadjusted(LIST,
58d0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
58e0: 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c 49 53 LIGN) \. ((LIS
58f0: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 61 T)->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 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 ZE),....\. (LI
5920: 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f 76 61 ST)->aptr - __va
5930: 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 _argsize(TYPE_SI
5940: 5a 45 29 09 09 09 09 5c 0a 20 20 29 0a 23 64 65 ZE)....\. ).#de
5950: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 72 69 fine __va_arg_ri
5960: 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 ghtadjusted(LIST
5970: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
5980: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c 49 ALIGN) \. ((LI
5990: 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 ST)->aptr += __v
59a0: 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 a_argsize(TYPE_S
59b0: 49 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c IZE),....\. (L
59c0: 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 28 54 IST)->aptr - ((T
59d0: 59 50 45 5f 53 49 5a 45 29 20 3c 20 73 69 7a 65 YPE_SIZE) < size
59e0: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 09 09 09 5c of(__vaword)...\
59f0: 0a 09 09 20 20 20 3f 20 28 54 59 50 45 5f 53 49 ... ? (TYPE_SI
5a00: 5a 45 29 09 09 09 09 09 5c 0a 09 09 20 20 20 3a ZE).....\... :
5a10: 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 __va_argsize(TY
5a20: 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a 09 09 PE_SIZE)....\...
5a30: 20 20 29 09 09 09 09 09 09 09 5c 0a 20 20 29 0a ).......\. ).
5a40: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
5a50: 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 ed(__powerpc__)
5a60: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f && !defined(__po
5a70: 77 65 72 70 63 36 34 5f 5f 29 20 26 26 20 21 28 werpc64__) && !(
5a80: 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c defined(_AIX) ||
5a90: 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 (defined(__MACH
5aa0: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
5ab0: 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a 20 61 _APPLE__)))./* a
5ac0: 72 67 73 20 67 72 6f 77 20 75 70 20 2a 2f 0a 2f rgs grow up */./
5ad0: 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 * small structur
5ae0: 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 es < 1 word are
5af0: 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 69 adjusted dependi
5b00: 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a ng on compiler *
5b10: 2f 0a 2f 2a 20 41 6c 73 6f 20 6d 61 6b 65 20 73 /./* Also make s
5b20: 75 72 65 20 77 65 20 73 77 69 74 63 68 20 74 6f ure we switch to
5b30: 20 74 68 65 20 73 74 61 63 6b 20 70 6f 69 6e 74 the stack point
5b40: 65 72 20 61 66 74 65 72 20 38 20 61 72 67 73 20 er after 8 args
5b50: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
5b60: 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 arg_leftadjusted
5b70: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
5b80: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
5b90: 20 28 28 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 ((((LIST)->onst
5ba0: 61 63 6b 20 3d 3d 20 30 20 26 26 20 28 4c 49 53 ack == 0 && (LIS
5bb0: 54 29 2d 3e 61 70 74 72 20 3e 3d 20 28 6c 6f 6e T)->aptr >= (lon
5bc0: 67 29 26 28 4c 49 53 54 29 2d 3e 72 65 67 61 72 g)&(LIST)->regar
5bd0: 67 5b 38 5d 29 09 5c 0a 20 20 20 20 3f 20 28 28 g[8]).\. ? ((
5be0: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 LIST)->onstack=1
5bf0: 2c 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d , (LIST)->aptr =
5c00: 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 (LIST)->saptr)
5c10: 3a 20 30 29 2c 09 09 5c 0a 20 20 20 28 4c 49 53 : 0),..\. (LIS
5c20: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 61 T)->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 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 ZE),....\. (LI
5c50: 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f 76 61 ST)->aptr - __va
5c60: 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 _argsize(TYPE_SI
5c70: 5a 45 29 09 09 09 09 5c 0a 20 20 29 0a 23 64 65 ZE)....\. ).#de
5c80: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 72 69 fine __va_arg_ri
5c90: 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 ghtadjusted(LIST
5ca0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
5cb0: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 28 28 ALIGN) \. ((((
5cc0: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d LIST)->onstack =
5cd0: 3d 20 30 20 26 26 20 28 4c 49 53 54 29 2d 3e 61 = 0 && (LIST)->a
5ce0: 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c ptr >= (long)&(L
5cf0: 49 53 54 29 2d 3e 72 65 67 61 72 67 5b 38 5d 29 IST)->regarg[8])
5d00: 09 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 .\. ? ((LIST)
5d10: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
5d20: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 53 ST)->aptr = (LIS
5d30: 54 29 2d 3e 73 61 70 74 72 29 20 3a 20 30 29 2c T)->saptr) : 0),
5d40: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
5d50: 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 ptr += __va_args
5d60: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 ize(TYPE_SIZE),.
5d70: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
5d80: 61 70 74 72 20 2d 20 28 28 54 59 50 45 5f 53 49 aptr - ((TYPE_SI
5d90: 5a 45 29 20 3c 20 73 69 7a 65 6f 66 28 5f 5f 76 ZE) < sizeof(__v
5da0: 61 77 6f 72 64 29 09 09 09 5c 0a 09 09 20 20 20 aword)...\...
5db0: 3f 20 28 54 59 50 45 5f 53 49 5a 45 29 09 09 09 ? (TYPE_SIZE)...
5dc0: 09 09 5c 0a 09 09 20 20 20 3a 20 5f 5f 76 61 5f ..\... : __va_
5dd0: 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a argsize(TYPE_SIZ
5de0: 45 29 09 09 09 09 5c 0a 09 09 20 20 29 09 09 09 E)....\... )...
5df0: 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 ....\. ).#endif
5e00: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 .#if defined(__s
5e10: 33 39 30 5f 5f 29 0a 2f 2a 20 61 72 67 73 20 67 390__)./* args g
5e20: 72 6f 77 20 75 70 20 2a 2f 0a 2f 2a 20 73 6d 61 row up */./* sma
5e30: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 3c 20 ll structures <
5e40: 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 1 word are adjus
5e50: 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e ted depending on
5e60: 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 2f 2a 20 compiler */./*
5e70: 41 6c 73 6f 20 6d 61 6b 65 20 73 75 72 65 20 77 Also make sure w
5e80: 65 20 73 77 69 74 63 68 20 74 6f 20 74 68 65 20 e switch to the
5e90: 73 74 61 63 6b 20 70 6f 69 6e 74 65 72 20 61 66 stack pointer af
5ea0: 74 65 72 20 35 20 61 72 67 73 20 2a 2f 0a 23 64 ter 5 args */.#d
5eb0: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c efine __va_arg_l
5ec0: 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 eftadjusted(LIST
5ed0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
5ee0: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 28 28 ALIGN) \. ((((
5ef0: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d LIST)->onstack =
5f00: 3d 20 30 20 26 26 20 28 4c 49 53 54 29 2d 3e 61 = 0 && (LIST)->a
5f10: 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c ptr >= (long)&(L
5f20: 49 53 54 29 2d 3e 72 65 67 61 72 67 5b 35 5d 29 IST)->regarg[5])
5f30: 09 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 .\. ? ((LIST)
5f40: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
5f50: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 53 ST)->aptr = (LIS
5f60: 54 29 2d 3e 73 61 70 74 72 29 20 3a 20 30 29 2c T)->saptr) : 0),
5f70: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
5f80: 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 ptr += __va_args
5f90: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 ize(TYPE_SIZE),.
5fa0: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
5fb0: 61 70 74 72 20 2d 20 5f 5f 76 61 5f 61 72 67 73 aptr - __va_args
5fc0: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 09 09 ize(TYPE_SIZE)..
5fd0: 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 20 ..\. ).#define
5fe0: 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 61 64 __va_arg_rightad
5ff0: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
6000: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
6010: 29 20 20 5c 0a 20 20 28 28 28 28 28 4c 49 53 54 ) \. (((((LIST
6020: 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 20 )->onstack == 0
6030: 26 26 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 && ((LIST)->aptr
6040: 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c 49 53 54 >= (long)&(LIST
6050: 29 2d 3e 72 65 67 61 72 67 5b 35 5d 29 29 20 5c )->regarg[5])) \
6060: 0a 20 20 20 7c 7c 20 28 28 54 59 50 45 5f 53 49 . || ((TYPE_SI
6070: 5a 45 29 20 3e 20 73 69 7a 65 6f 66 28 5f 5f 76 ZE) > sizeof(__v
6080: 61 77 6f 72 64 29 20 26 26 20 28 4c 49 53 54 29 aword) && (LIST)
6090: 2d 3e 61 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 ->aptr >= (long)
60a0: 26 28 4c 49 53 54 29 2d 3e 72 65 67 61 72 67 5b &(LIST)->regarg[
60b0: 34 5d 29 29 20 5c 0a 20 20 20 20 3f 20 28 28 4c 4])) \. ? ((L
60c0: 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c IST)->onstack=1,
60d0: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 (LIST)->aptr =
60e0: 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 3a (LIST)->saptr) :
60f0: 20 30 29 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 0),..\. (LIST
6100: 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 61 5f )->aptr += __va_
6110: 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a argsize(TYPE_SIZ
6120: 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 E),....\. (LIS
6130: 54 29 2d 3e 61 70 74 72 20 2d 20 28 28 54 59 50 T)->aptr - ((TYP
6140: 45 5f 53 49 5a 45 29 20 3c 20 73 69 7a 65 6f 66 E_SIZE) < sizeof
6150: 28 5f 5f 76 61 77 6f 72 64 29 09 09 09 5c 0a 09 (__vaword)...\..
6160: 09 20 20 20 3f 20 28 54 59 50 45 5f 53 49 5a 45 . ? (TYPE_SIZE
6170: 29 09 09 09 09 09 5c 0a 09 09 20 20 20 3a 20 5f ).....\... : _
6180: 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 _va_argsize(TYPE
6190: 5f 53 49 5a 45 29 09 09 09 09 5c 0a 09 09 20 20 _SIZE)....\...
61a0: 29 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 ).......\. ).#e
61b0: 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 ndif.#if defined
61c0: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
61d0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
61e0: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
61f0: 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 __sparc64__)./*
6200: 61 72 67 73 20 67 72 6f 77 20 75 70 20 2a 2f 0a args grow up */.
6210: 2f 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 /* small structu
6220: 72 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 res < 1 word are
6230: 20 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 adjusted depend
6240: 69 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 ing on compiler
6250: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
6260: 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 arg_leftadjusted
6270: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
6280: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
6290: 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2b ((LIST)->anum +
62a0: 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 = __va_argsize(T
62b0: 59 50 45 5f 53 49 5a 45 29 2f 73 69 7a 65 6f 66 YPE_SIZE)/sizeof
62c0: 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 5c 0a 20 (__vaword),..\.
62d0: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
62e0: 3d 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 2c 09 09 09 09 5c 0a YPE_SIZE),....\.
6300: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
6310: 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 - __va_argsize(T
6320: 59 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a 20 YPE_SIZE)....\.
6330: 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f ).#define __va_
6340: 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 arg_rightadjuste
6350: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
6360: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
6370: 20 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 ((LIST)->anum
6380: 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 += __va_argsize(
6390: 54 59 50 45 5f 53 49 5a 45 29 2f 73 69 7a 65 6f TYPE_SIZE)/sizeo
63a0: 66 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 5c 0a f(__vaword),..\.
63b0: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
63c0: 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 += __va_argsize(
63d0: 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 5c TYPE_SIZE),....\
63e0: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
63f0: 20 2d 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 - ((TYPE_SIZE)
6400: 3c 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 < sizeof(__vawor
6410: 64 29 09 09 09 5c 0a 09 09 20 20 20 3f 20 28 54 d)...\... ? (T
6420: 59 50 45 5f 53 49 5a 45 29 09 09 09 09 09 5c 0a YPE_SIZE).....\.
6430: 09 09 20 20 20 3a 20 5f 5f 76 61 5f 61 72 67 73 .. : __va_args
6440: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 09 09 ize(TYPE_SIZE)..
6450: 09 09 5c 0a 09 09 20 20 29 09 09 09 09 09 09 09 ..\... ).......
6460: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
6470: 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f defined(__hppa_
6480: 5f 29 0a 2f 2a 20 61 72 67 73 20 67 72 6f 77 20 _)./* args grow
6490: 64 6f 77 6e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 down */.#define
64a0: 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a __va_arg_leftadj
64b0: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
64c0: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
64d0: 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 \. ((LIST)->a
64e0: 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e 61 70 ptr = (LIST)->ap
64f0: 74 72 20 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a tr - __va_argsiz
6500: 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 5c e(TYPE_SIZE),..\
6510: 0a 20 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 . ((TYPE_SIZE)
6520: 20 3e 20 34 20 26 26 20 28 28 4c 49 53 54 29 2d > 4 && ((LIST)-
6530: 3e 61 70 74 72 20 26 3d 20 2d 38 29 29 2c 09 09 >aptr &= -8)),..
6540: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
6550: 70 74 72 09 09 09 09 09 09 09 09 5c 0a 20 20 29 ptr........\. )
6560: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
6570: 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 g_rightadjusted(
6580: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
6590: 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 YPE_ALIGN) \.
65a0: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 ((LIST)->aptr =
65b0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f (LIST)->aptr - _
65c0: 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 _va_argsize(TYPE
65d0: 5f 53 49 5a 45 29 2c 09 09 5c 0a 20 20 20 28 28 _SIZE),..\. ((
65e0: 54 59 50 45 5f 53 49 5a 45 29 20 3e 20 34 20 26 TYPE_SIZE) > 4 &
65f0: 26 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 & ((LIST)->aptr
6600: 26 3d 20 2d 38 29 29 2c 09 09 09 09 5c 0a 20 20 &= -8)),....\.
6610: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 20 (LIST)->aptr +
6620: 28 28 2d 28 54 59 50 45 5f 53 49 5a 45 29 29 20 ((-(TYPE_SIZE))
6630: 26 20 33 29 09 09 09 09 09 5c 0a 20 20 29 0a 23 & 3).....\. ).#
6640: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
6650: 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 d(__i386__) || d
6660: 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 5f 5f efined(__alpha__
6670: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 69 ) || defined(__i
6680: 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 a64__) || define
6690: 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 0a 2f 2a 20 d(__ARMEL__)./*
66a0: 6c 69 74 74 6c 65 20 65 6e 64 69 61 6e 20 2d 3e little endian ->
66b0: 20 73 6d 61 6c 6c 20 61 72 67 73 20 3c 20 31 20 small args < 1
66c0: 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 word are adjuste
66d0: 64 20 74 6f 20 74 68 65 20 6c 65 66 74 20 2a 2f d to the left */
66e0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
66f0: 67 5f 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c g_adjusted(LIST,
6700: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
6710: 4c 49 47 4e 29 20 20 5c 0a 20 20 5f 5f 76 61 5f LIGN) \. __va_
6720: 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 arg_leftadjusted
6730: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
6740: 54 59 50 45 5f 41 4c 49 47 4e 29 0a 23 65 6e 64 TYPE_ALIGN).#end
6750: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
6760: 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 _m68k__) || defi
6770: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
6780: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
6790: 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e ps64__) || defin
67a0: 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 7c 7c ed(__sparc__) ||
67b0: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
67c0: 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 64__) || defined
67d0: 28 5f 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 28 64 (__hppa__) || (d
67e0: 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 efined(__arm__)
67f0: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 41 52 && !defined(__AR
6800: 4d 45 4c 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e MEL__)) || defin
6810: 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 ed(__powerpc__)
6820: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 || defined(__pow
6830: 65 72 70 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 erpc64__) || def
6840: 69 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c ined(__m88k__) |
6850: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 | defined(__conv
6860: 65 78 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 ex__) || defined
6870: 28 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 62 69 (__s390__)./* bi
6880: 67 20 65 6e 64 69 61 6e 20 2d 3e 20 73 6d 61 6c g endian -> smal
6890: 6c 20 61 72 67 73 20 3c 20 31 20 77 6f 72 64 20 l args < 1 word
68a0: 61 72 65 20 61 64 6a 75 73 74 65 64 20 74 6f 20 are adjusted to
68b0: 74 68 65 20 72 69 67 68 74 20 2a 2f 0a 23 64 65 the right */.#de
68c0: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 61 64 fine __va_arg_ad
68d0: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
68e0: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
68f0: 29 20 20 5c 0a 20 20 5f 5f 76 61 5f 61 72 67 5f ) \. __va_arg_
6900: 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 rightadjusted(LI
6910: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
6920: 45 5f 41 4c 49 47 4e 29 0a 23 65 6e 64 69 66 0a E_ALIGN).#endif.
6930: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
6940: 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 ps__) && !define
6950: 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 26 d(__mipsn32__) &
6960: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 & !defined(__mip
6970: 73 36 34 5f 5f 29 0a 2f 2a 20 62 69 67 20 65 6e s64__)./* big en
6980: 64 69 61 6e 20 2d 3e 20 73 6d 61 6c 6c 20 61 72 dian -> small ar
6990: 67 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 gs < 1 word are
69a0: 61 64 6a 75 73 74 65 64 20 74 6f 20 74 68 65 20 adjusted to the
69b0: 72 69 67 68 74 20 2a 2f 0a 23 64 65 66 69 6e 65 right */.#define
69c0: 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 __va_arg_adjust
69d0: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
69e0: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
69f0: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d . ((LIST)->anum
6a00: 2b 2b 2c 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 ++, __va_arg_rig
6a10: 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c htadjusted(LIST,
6a20: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
6a30: 4c 49 47 4e 29 29 0a 23 65 6e 64 69 66 0a 23 69 LIGN)).#endif.#i
6a40: 66 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f f defined(__x86_
6a50: 36 34 5f 5f 29 0a 2f 2a 20 74 68 65 20 66 69 72 64__)./* the fir
6a60: 73 74 20 36 20 61 72 67 75 6d 65 6e 74 20 77 6f st 6 argument wo
6a70: 72 64 73 20 61 72 65 20 70 61 73 73 65 64 20 69 rds are passed i
6a80: 6e 20 72 65 67 69 73 74 65 72 73 20 2a 2f 0a 23 n registers */.#
6a90: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
6aa0: 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 adjusted(LIST,TY
6ab0: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 PE_SIZE,TYPE_ALI
6ac0: 47 4e 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 GN) \. ((LIST)
6ad0: 2d 3e 6d 65 6d 69 61 72 67 70 74 72 20 2b 20 28 ->memiargptr + (
6ae0: 28 54 59 50 45 5f 53 49 5a 45 29 20 2b 20 73 69 (TYPE_SIZE) + si
6af0: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 2d 31 zeof(__vaword)-1
6b00: 29 20 2f 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 ) / sizeof(__vaw
6b10: 6f 72 64 29 20 3c 3d 20 26 28 4c 49 53 54 29 2d ord) <= &(LIST)-
6b20: 3e 69 61 72 67 5b 36 5d 20 5c 0a 20 20 20 3f 20 >iarg[6] \. ?
6b30: 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 69 61 72 67 ((LIST)->memiarg
6b40: 70 74 72 20 2b 3d 20 28 28 54 59 50 45 5f 53 49 ptr += ((TYPE_SI
6b50: 5a 45 29 20 2b 20 73 69 7a 65 6f 66 28 5f 5f 76 ZE) + sizeof(__v
6b60: 61 77 6f 72 64 29 2d 31 29 20 2f 20 73 69 7a 65 aword)-1) / size
6b70: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 2c 20 5c 0a of(__vaword), \.
6b80: 20 20 20 20 20 20 28 4c 49 53 54 29 2d 3e 6d 65 (LIST)->me
6b90: 6d 69 61 72 67 70 74 72 20 2d 20 28 28 54 59 50 miargptr - ((TYP
6ba0: 45 5f 53 49 5a 45 29 20 2b 20 73 69 7a 65 6f 66 E_SIZE) + sizeof
6bb0: 28 5f 5f 76 61 77 6f 72 64 29 2d 31 29 20 2f 20 (__vaword)-1) /
6bc0: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
6bd0: 20 5c 0a 20 20 20 20 20 29 09 09 09 09 09 09 09 \. ).......
6be0: 09 09 5c 0a 20 20 20 3a 20 28 76 6f 69 64 2a 29 ..\. : (void*)
6bf0: 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a __va_arg_leftadj
6c00: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
6c10: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
6c20: 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 ..\. ).#endif.#
6c30: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 28 define __va_arg(
6c40: 4c 49 53 54 2c 54 59 50 45 29 20 20 5c 0a 20 20 LIST,TYPE) \.
6c50: 2a 28 54 59 50 45 2a 29 5f 5f 76 61 5f 61 72 67 *(TYPE*)__va_arg
6c60: 5f 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 73 _adjusted(LIST,s
6c70: 69 7a 65 6f 66 28 54 59 50 45 29 2c 5f 5f 56 41 izeof(TYPE),__VA
6c80: 5f 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 29 0a _alignof(TYPE)).
6c90: 0a 2f 2a 20 49 6e 74 65 67 65 72 20 61 72 67 75 ./* Integer argu
6ca0: 6d 65 6e 74 73 2e 20 2a 2f 0a 0a 23 64 65 66 69 ments. */..#defi
6cb0: 6e 65 20 76 61 5f 61 72 67 5f 63 68 61 72 28 4c ne va_arg_char(L
6cc0: 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 IST).__va_arg(LI
6cd0: 53 54 2c 63 68 61 72 29 0a 23 64 65 66 69 6e 65 ST,char).#define
6ce0: 20 76 61 5f 61 72 67 5f 73 63 68 61 72 28 4c 49 va_arg_schar(LI
6cf0: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
6d00: 54 2c 73 69 67 6e 65 64 20 63 68 61 72 29 0a 23 T,signed char).#
6d10: 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 75 63 define va_arg_uc
6d20: 68 61 72 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 har(LIST).__va_a
6d30: 72 67 28 4c 49 53 54 2c 75 6e 73 69 67 6e 65 64 rg(LIST,unsigned
6d40: 20 63 68 61 72 29 0a 23 64 65 66 69 6e 65 20 76 char).#define v
6d50: 61 5f 61 72 67 5f 73 68 6f 72 74 28 4c 49 53 54 a_arg_short(LIST
6d60: 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c ).__va_arg(LIST,
6d70: 73 68 6f 72 74 29 0a 23 64 65 66 69 6e 65 20 76 short).#define v
6d80: 61 5f 61 72 67 5f 75 73 68 6f 72 74 28 4c 49 53 a_arg_ushort(LIS
6d90: 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 T).__va_arg(LIST
6da0: 2c 75 6e 73 69 67 6e 65 64 20 73 68 6f 72 74 29 ,unsigned short)
6db0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
6dc0: 69 6e 74 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 int(LIST).__va_a
6dd0: 72 67 28 4c 49 53 54 2c 69 6e 74 29 0a 23 64 65 rg(LIST,int).#de
6de0: 66 69 6e 65 20 76 61 5f 61 72 67 5f 75 69 6e 74 fine va_arg_uint
6df0: 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 (LIST).__va_arg(
6e00: 4c 49 53 54 2c 75 6e 73 69 67 6e 65 64 20 69 6e LIST,unsigned in
6e10: 74 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 t).#define va_ar
6e20: 67 5f 6c 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 g_long(LIST).__v
6e30: 61 5f 61 72 67 28 4c 49 53 54 2c 6c 6f 6e 67 29 a_arg(LIST,long)
6e40: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
6e50: 75 6c 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 ulong(LIST).__va
6e60: 5f 61 72 67 28 4c 49 53 54 2c 75 6e 73 69 67 6e _arg(LIST,unsign
6e70: 65 64 20 6c 6f 6e 67 29 0a 0a 23 69 66 20 64 65 ed long)..#if de
6e80: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
6e90: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
6ea0: 70 61 72 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 parc64__) || def
6eb0: 69 6e 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 ined(__alpha__)
6ec0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 || defined(__pow
6ed0: 65 72 70 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 erpc64__) || def
6ee0: 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 7c ined(__ia64__) |
6ef0: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f | defined(__x86_
6f00: 36 34 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 64__)./* `long l
6f10: 6f 6e 67 27 20 61 6e 64 20 60 6c 6f 6e 67 27 20 ong' and `long'
6f20: 61 72 65 20 69 64 65 6e 74 69 63 61 6c 2e 20 2a are identical. *
6f30: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
6f40: 5f 6c 6f 6e 67 6c 6f 6e 67 09 09 76 61 5f 61 72 _longlong..va_ar
6f50: 67 5f 6c 6f 6e 67 0a 23 64 65 66 69 6e 65 20 76 g_long.#define v
6f60: 61 5f 61 72 67 5f 75 6c 6f 6e 67 6c 6f 6e 67 09 a_arg_ulonglong.
6f70: 76 61 5f 61 72 67 5f 75 6c 6f 6e 67 0a 23 65 6c va_arg_ulong.#el
6f80: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
6f90: 73 6e 33 32 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 sn32__)./* `long
6fa0: 20 6c 6f 6e 67 27 20 66 69 74 73 20 69 6e 20 5f long' fits in _
6fb0: 5f 76 61 77 6f 72 64 2e 20 2a 2f 0a 23 64 65 66 _vaword. */.#def
6fc0: 69 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c ine va_arg_longl
6fd0: 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 ong(LIST).__va_a
6fe0: 72 67 28 4c 49 53 54 2c 6c 6f 6e 67 20 6c 6f 6e rg(LIST,long lon
6ff0: 67 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 g).#define va_ar
7000: 67 5f 75 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 g_ulonglong(LIST
7010: 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c ).__va_arg(LIST,
7020: 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 6c 6f unsigned long lo
7030: 6e 67 29 0a 23 65 6c 69 66 20 64 65 66 69 6e 65 ng).#elif define
7040: 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 d(__i386__) || d
7050: 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 efined(__m68k__)
7060: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
7070: 70 73 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 ps__) || (define
7080: 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 d(__sparc__) &&
7090: 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 !defined(__sparc
70a0: 36 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64__)) || define
70b0: 64 28 5f 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 64 d(__hppa__) || d
70c0: 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 efined(__arm__)
70d0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 || defined(__pow
70e0: 65 72 70 63 5f 5f 29 20 7c 7c 20 64 65 66 69 6e erpc__) || defin
70f0: 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 ed(__m88k__) ||
7100: 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 defined(__convex
7110: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7120: 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e _s390__)./* `lon
7130: 67 20 6c 6f 6e 67 27 73 20 61 72 65 20 70 61 73 g long's are pas
7140: 73 65 64 20 65 6d 62 65 64 64 65 64 20 6f 6e 20 sed embedded on
7150: 74 68 65 20 61 72 67 20 73 74 61 63 6b 2e 20 2a the arg stack. *
7160: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
7170: 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 29 09 _longlong(LIST).
7180: 5f 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e __va_arg_longlon
7190: 67 28 4c 49 53 54 2c 6c 6f 6e 67 20 6c 6f 6e 67 g(LIST,long long
71a0: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 ).#define va_arg
71b0: 5f 75 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 29 _ulonglong(LIST)
71c0: 09 5f 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f .__va_arg_longlo
71d0: 6e 67 28 4c 49 53 54 2c 75 6e 73 69 67 6e 65 64 ng(LIST,unsigned
71e0: 20 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 69 66 20 long long).#if
71f0: 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f defined(__i386__
7200: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d ) || defined(__m
7210: 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 68k__) || (defin
7220: 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 26 26 20 21 ed(__arm__) && !
7230: 64 65 66 69 6e 65 64 28 5f 5f 41 52 4d 45 4c 5f defined(__ARMEL_
7240: 5f 29 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 _)) || (defined(
7250: 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 26 20 __powerpc__) &&
7260: 28 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c (defined(_AIX) |
7270: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 | (defined(__MAC
7280: 48 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 H__) && defined(
7290: 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 29 20 7c 7c __APPLE__)))) ||
72a0: 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 defined(__conve
72b0: 78 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 6f x__)./* `long lo
72c0: 6e 67 27 73 20 61 72 65 20 28 61 74 20 6d 6f 73 ng's are (at mos
72d0: 74 29 20 77 6f 72 64 2d 61 6c 69 67 6e 65 64 2e t) word-aligned.
72e0: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
72f0: 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 _arg_longlong(LI
7300: 53 54 2c 54 59 50 45 29 09 5f 5f 76 61 5f 61 72 ST,TYPE).__va_ar
7310: 67 28 4c 49 53 54 2c 54 59 50 45 29 0a 23 65 6e g(LIST,TYPE).#en
7320: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
7330: 5f 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 28 64 65 __mips__) || (de
7340: 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f fined(__powerpc_
7350: 5f 29 20 26 26 20 21 28 64 65 66 69 6e 65 64 28 _) && !(defined(
7360: 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 _AIX) || (define
7370: 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 d(__MACH__) && d
7380: 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f efined(__APPLE__
7390: 29 29 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 )))) || defined(
73a0: 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 __m88k__) || def
73b0: 69 6e 65 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 0a ined(__ARMEL__).
73c0: 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 73 20 /* `long long's
73d0: 68 61 76 65 20 61 6c 69 67 6e 6d 65 6e 74 20 38 have alignment 8
73e0: 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
73f0: 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c a_arg_longlong(L
7400: 49 53 54 2c 54 59 50 45 29 09 09 09 09 09 5c 0a IST,TYPE).....\.
7410: 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 ((LIST)->aptr
7420: 3d 20 28 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 = (((LIST)->aptr
7430: 2b 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 59 +__VA_alignof(TY
7440: 50 45 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 PE)-1) & -(long)
7450: 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 59 50 __VA_alignof(TYP
7460: 45 29 29 2c 20 5c 0a 20 20 20 5f 5f 76 61 5f 61 E)), \. __va_a
7470: 72 67 28 4c 49 53 54 2c 54 59 50 45 29 29 0a 23 rg(LIST,TYPE)).#
7480: 65 6e 64 69 66 0a 23 69 66 20 28 64 65 66 69 6e endif.#if (defin
7490: 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 ed(__sparc__) &&
74a0: 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 !defined(__spar
74b0: 63 36 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e c64__)) || defin
74c0: 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 ed(__s390__)./*
74d0: 57 69 74 68 69 6e 20 74 68 65 20 61 72 67 20 73 Within the arg s
74e0: 74 61 63 6b 2c 20 74 68 65 20 61 6c 69 67 6e 6d tack, the alignm
74f0: 65 6e 74 20 69 73 20 6f 6e 6c 79 20 34 2c 20 6e ent is only 4, n
7500: 6f 74 20 38 2e 20 2a 2f 0a 2f 2a 20 42 65 77 61 ot 8. */./* Bewa
7510: 72 65 20 61 67 61 69 6e 73 74 20 75 6e 61 6c 69 re against unali
7520: 67 6e 65 64 20 61 63 63 65 73 73 65 73 21 20 2a gned accesses! *
7530: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
7540: 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 rg_longlong(LIST
7550: 2c 54 59 50 45 29 09 09 09 09 09 5c 0a 20 20 28 ,TYPE).....\. (
7560: 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 77 6f 72 (LIST)->tmp._wor
7570: 64 73 5b 30 5d 20 3d 20 28 28 5f 5f 76 61 77 6f ds[0] = ((__vawo
7580: 72 64 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 rd*)((LIST)->apt
7590: 72 29 29 5b 30 5d 2c 09 09 5c 0a 20 20 20 28 4c r))[0],..\. (L
75a0: 49 53 54 29 2d 3e 74 6d 70 2e 5f 77 6f 72 64 73 IST)->tmp._words
75b0: 5b 31 5d 20 3d 20 28 28 5f 5f 76 61 77 6f 72 64 [1] = ((__vaword
75c0: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 *)((LIST)->aptr)
75d0: 29 5b 31 5d 2c 09 09 5c 0a 20 20 20 28 4c 49 53 )[1],..\. (LIS
75e0: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 T)->aptr += size
75f0: 6f 66 28 54 59 50 45 29 2c 09 09 09 09 09 5c 0a of(TYPE),.....\.
7600: 20 20 20 28 54 59 50 45 29 28 28 4c 49 53 54 29 (TYPE)((LIST)
7610: 2d 3e 74 6d 70 2e 5f 6c 6f 6e 67 6c 6f 6e 67 29 ->tmp._longlong)
7620: 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 .....\. ).#endi
7630: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
7640: 68 70 70 61 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 hppa__)./* `long
7650: 20 6c 6f 6e 67 27 73 20 68 61 76 65 20 61 6c 69 long's have ali
7660: 67 6e 6d 65 6e 74 20 38 2e 20 2a 2f 0a 23 64 65 gnment 8. */.#de
7670: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 6f fine __va_arg_lo
7680: 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c 54 59 50 45 nglong(LIST,TYPE
7690: 29 09 09 09 09 09 5c 0a 20 20 28 28 4c 49 53 54 ).....\. ((LIST
76a0: 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 54 )->aptr = ((LIST
76b0: 29 2d 3e 61 70 74 72 20 26 20 2d 28 6c 6f 6e 67 )->aptr & -(long
76c0: 29 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 59 )__VA_alignof(TY
76d0: 50 45 29 29 2c 09 09 5c 0a 20 20 20 5f 5f 76 61 PE)),..\. __va
76e0: 5f 61 72 67 28 4c 49 53 54 2c 54 59 50 45 29 29 _arg(LIST,TYPE))
76f0: 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0a .#endif.#endif..
7700: 2f 2a 20 46 6c 6f 61 74 69 6e 67 20 70 6f 69 6e /* Floating poin
7710: 74 20 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a t arguments. */.
7720: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 .#if defined(__i
7730: 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 386__) || define
7740: 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 d(__m68k__) || d
7750: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 efined(__mipsn32
7760: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7770: 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 _mips64__) || de
7780: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 fined(__sparc__)
7790: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 || defined(__sp
77a0: 61 72 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 arc64__) || defi
77b0: 6e 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c ned(__alpha__) |
77c0: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 61 72 6d | (defined(__arm
77d0: 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 __) && !defined(
77e0: 5f 5f 41 52 4d 45 4c 5f 5f 29 29 20 7c 7c 20 64 __ARMEL__)) || d
77f0: 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 efined(__powerpc
7800: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7810: 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 20 7c 7c _powerpc64__) ||
7820: 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 defined(__conve
7830: 78 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 x__) || defined(
7840: 5f 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 __ia64__) || def
7850: 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 ined(__x86_64__)
7860: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 || defined(__s3
7870: 39 30 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 90__).#define __
7880: 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 va_align_double(
7890: 4c 49 53 54 29 0a 23 65 6e 64 69 66 0a 23 69 66 LIST).#endif.#if
78a0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f defined(__mips_
78b0: 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f _) && !defined(_
78c0: 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 26 26 20 21 _mipsn32__) && !
78d0: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 defined(__mips64
78e0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
78f0: 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 _m88k__) || defi
7900: 6e 65 64 28 5f 5f 41 52 4d 45 4c 5f 5f 29 0a 2f ned(__ARMEL__)./
7910: 2a 20 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 64 * __VA_alignof(d
7920: 6f 75 62 6c 65 29 20 3e 20 73 69 7a 65 6f 66 28 ouble) > sizeof(
7930: 5f 5f 76 61 77 6f 72 64 29 20 2a 2f 0a 23 64 65 __vaword) */.#de
7940: 66 69 6e 65 20 5f 5f 76 61 5f 61 6c 69 67 6e 5f fine __va_align_
7950: 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a double(LIST) \.
7960: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d (LIST)->aptr =
7970: 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b ((LIST)->aptr +
7980: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2d sizeof(double)-
7990: 31 29 20 26 20 2d 28 6c 6f 6e 67 29 73 69 7a 65 1) & -(long)size
79a0: 6f 66 28 64 6f 75 62 6c 65 29 2c 0a 23 65 6e 64 of(double),.#end
79b0: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
79c0: 5f 68 70 70 61 5f 5f 29 0a 23 64 65 66 69 6e 65 _hppa__).#define
79d0: 20 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 __va_align_doub
79e0: 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 4c le(LIST) \. (L
79f0: 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 IST)->aptr = (LI
7a00: 53 54 29 2d 3e 61 70 74 72 20 26 20 2d 28 6c 6f ST)->aptr & -(lo
7a10: 6e 67 29 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 ng)sizeof(double
7a20: 29 2c 0a 23 65 6e 64 69 66 0a 0a 23 69 66 20 64 ),.#endif..#if d
7a30: 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f efined(__sparc__
7a40: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
7a50: 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 42 65 sparc64__)./* Be
7a60: 77 61 72 65 20 61 67 61 69 6e 73 74 20 75 6e 61 ware against una
7a70: 6c 69 67 6e 65 64 20 60 64 6f 75 62 6c 65 27 20 ligned `double'
7a80: 61 63 63 65 73 73 65 73 21 20 2a 2f 0a 23 64 65 accesses! */.#de
7a90: 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 fine va_arg_doub
7aa0: 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f le(LIST) \. (_
7ab0: 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 _va_align_double
7ac0: 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 (LIST)......\.
7ad0: 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 77 6f (LIST)->tmp._wo
7ae0: 72 64 73 5b 30 5d 20 3d 20 28 28 5f 5f 76 61 77 rds[0] = ((__vaw
7af0: 6f 72 64 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 ord*)((LIST)->ap
7b00: 74 72 29 29 5b 30 5d 2c 09 09 5c 0a 20 20 20 28 tr))[0],..\. (
7b10: 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 77 6f 72 64 LIST)->tmp._word
7b20: 73 5b 31 5d 20 3d 20 28 28 5f 5f 76 61 77 6f 72 s[1] = ((__vawor
7b30: 64 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 d*)((LIST)->aptr
7b40: 29 29 5b 31 5d 2c 09 09 5c 0a 20 20 20 28 4c 49 ))[1],..\. (LI
7b50: 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a ST)->aptr += siz
7b60: 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 09 eof(double),....
7b70: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 74 6d .\. (LIST)->tm
7b80: 70 2e 5f 64 6f 75 62 6c 65 09 09 09 09 09 09 09 p._double.......
7b90: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
7ba0: 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 defined(__alpha
7bb0: 5f 5f 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 74 __)./* The first
7bc0: 20 36 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 6e 6 floating poin
7bd0: 74 20 72 65 67 69 73 74 65 72 73 20 68 61 76 65 t registers have
7be0: 20 62 65 65 6e 20 73 74 6f 72 65 64 20 69 6e 20 been stored in
7bf0: 61 6e 6f 74 68 65 72 20 70 6c 61 63 65 2e 20 2a another place. *
7c00: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
7c10: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c _double(LIST) \
7c20: 0a 20 20 28 28 28 4c 49 53 54 29 2d 3e 61 70 74 . (((LIST)->apt
7c30: 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 r += sizeof(doub
7c40: 6c 65 29 29 20 3c 3d 20 28 4c 49 53 54 29 2d 3e le)) <= (LIST)->
7c50: 6d 65 6d 61 72 67 70 74 72 09 09 5c 0a 20 20 20 memargptr..\.
7c60: 3f 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 ? *(double*)((LI
7c70: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
7c80: 6f 66 28 64 6f 75 62 6c 65 29 20 2d 20 36 2a 73 of(double) - 6*s
7c90: 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 5c izeof(double)).\
7ca0: 0a 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 . : *(double*)
7cb0: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 ((LIST)->aptr -
7cc0: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 sizeof(double)).
7cd0: 09 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 ...\. ).#define
7ce0: 20 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 va_arg_float(LI
7cf0: 53 54 29 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 ST) \. (((LIST
7d00: 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f )->aptr += sizeo
7d10: 66 28 64 6f 75 62 6c 65 29 29 20 3c 3d 20 28 4c f(double)) <= (L
7d20: 49 53 54 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 IST)->memargptr.
7d30: 09 5c 0a 20 20 20 3f 20 2f 2a 20 54 68 65 20 66 .\. ? /* The f
7d40: 69 72 73 74 20 36 20 61 72 67 73 20 68 61 76 65 irst 6 args have
7d50: 20 62 65 65 6e 20 70 75 74 20 69 6e 74 6f 20 6d been put into m
7d60: 65 6d 6f 72 79 20 62 79 20 22 73 74 74 22 20 69 emory by "stt" i
7d70: 6e 73 74 72 75 63 74 69 6f 6e 73 20 2a 2f 5c 0a nstructions */\.
7d80: 20 20 20 20 20 2f 2a 20 28 73 65 65 20 76 61 63 /* (see vac
7d90: 61 6c 6c 2d 61 6c 70 68 61 2e 73 21 29 2e 20 54 all-alpha.s!). T
7da0: 68 65 72 65 66 6f 72 65 20 6c 6f 61 64 20 74 68 herefore load th
7db0: 65 6d 20 61 73 20 64 6f 75 62 6c 65 73 2e 20 2a em as doubles. *
7dc0: 2f 09 5c 0a 20 20 20 20 20 2f 2a 20 57 68 65 6e /.\. /* When
7dd0: 20 76 69 65 77 65 64 20 61 73 20 66 6c 6f 61 74 viewed as float
7de0: 73 2c 20 74 68 65 20 76 61 6c 75 65 20 77 69 6c s, the value wil
7df0: 6c 20 62 65 20 74 68 65 20 63 6f 72 72 65 63 74 l be the correct
7e00: 20 6f 6e 65 2e 20 2a 2f 09 5c 0a 20 20 20 20 20 one. */.\.
7e10: 28 66 6c 6f 61 74 29 2a 28 64 6f 75 62 6c 65 2a (float)*(double*
7e20: 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d )((LIST)->aptr -
7e30: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 20 sizeof(double)
7e40: 2d 20 36 2a 73 69 7a 65 6f 66 28 64 6f 75 62 6c - 6*sizeof(doubl
7e50: 65 29 29 20 5c 0a 20 20 20 3a 20 2f 2a 20 54 68 e)) \. : /* Th
7e60: 65 73 65 20 61 72 67 73 20 68 61 76 65 20 62 65 ese args have be
7e70: 65 6e 20 70 75 74 20 69 6e 74 6f 20 6d 65 6d 6f en put into memo
7e80: 72 79 20 62 79 20 22 73 74 73 22 20 69 6e 73 74 ry by "sts" inst
7e90: 72 75 63 74 69 6f 6e 73 2c 20 2a 2f 09 5c 0a 20 ructions, */.\.
7ea0: 20 20 20 20 2f 2a 20 74 68 65 72 65 66 6f 72 65 /* therefore
7eb0: 20 6c 6f 61 64 20 74 68 65 6d 20 61 73 20 66 6c load them as fl
7ec0: 6f 61 74 73 2e 20 2a 2f 09 09 09 09 5c 0a 20 20 oats. */....\.
7ed0: 20 20 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 *(float*)((LI
7ee0: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
7ef0: 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 09 09 5c of(double))....\
7f00: 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 . ).#endif.#if
7f10: 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f defined(__hppa__
7f20: 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 74 20 34 )./* The first 4
7f30: 20 66 6c 6f 61 74 20 72 65 67 69 73 74 65 72 73 float registers
7f40: 20 61 6e 64 20 74 68 65 20 66 69 72 73 74 20 32 and the first 2
7f50: 20 64 6f 75 62 6c 65 20 72 65 67 69 73 74 65 72 double register
7f60: 73 20 61 72 65 20 73 74 6f 72 65 64 0a 20 2a 20 s are stored. *
7f70: 65 6c 73 65 77 68 65 72 65 2e 0a 20 2a 2f 0a 23 elsewhere.. */.#
7f80: 69 66 20 31 20 2f 2a 20 67 63 63 2d 32 2e 35 2e if 1 /* gcc-2.5.
7f90: 32 20 70 61 73 73 65 73 20 74 68 65 73 65 20 61 2 passes these a
7fa0: 72 67 73 20 69 6e 20 67 65 6e 65 72 61 6c 20 72 rgs in general r
7fb0: 65 67 69 73 74 65 72 73 21 20 41 20 62 75 67 2c egisters! A bug,
7fc0: 20 49 20 74 68 69 6e 6b 2e 20 2a 2f 0a 23 64 65 I think. */.#de
7fd0: 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c 6f 61 fine va_arg_floa
7fe0: 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 2a 28 t(LIST) \. (*(
7ff0: 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e float*)((LIST)->
8000: 61 70 74 72 20 2d 3d 20 73 69 7a 65 6f 66 28 66 aptr -= sizeof(f
8010: 6c 6f 61 74 29 29 29 0a 23 64 65 66 69 6e 65 20 loat))).#define
8020: 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 va_arg_double(LI
8030: 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 ST) \. (__va_a
8040: 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 lign_double(LIST
8050: 29 09 09 09 09 09 09 5c 0a 20 20 20 2a 28 64 6f )......\. *(do
8060: 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 uble*)((LIST)->a
8070: 70 74 72 20 2d 3d 20 73 69 7a 65 6f 66 28 64 6f ptr -= sizeof(do
8080: 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 0a uble))....\. ).
8090: 23 65 6c 73 65 20 2f 2a 20 74 68 69 73 20 77 6f #else /* this wo
80a0: 75 6c 64 20 62 65 20 63 6f 72 72 65 63 74 20 69 uld be correct i
80b0: 66 20 74 68 65 20 61 72 67 73 20 77 65 72 65 20 f the args were
80c0: 70 61 73 73 65 64 20 69 6e 20 66 6c 6f 61 74 20 passed in float
80d0: 72 65 67 69 73 74 65 72 73 2e 20 2a 2f 0a 23 64 registers. */.#d
80e0: 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c 6f efine va_arg_flo
80f0: 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 at(LIST) \. ((
8100: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 3d 20 (LIST)->aptr -=
8110: 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 20 3e sizeof(float)) >
8120: 3d 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 61 72 67 = (LIST)->memarg
8130: 70 74 72 09 09 09 5c 0a 20 20 20 3f 20 2f 2a 20 ptr...\. ? /*
8140: 54 68 65 20 66 69 72 73 74 20 34 20 66 6c 6f 61 The first 4 floa
8150: 74 20 61 72 67 73 20 61 72 65 20 73 74 6f 72 65 t args are store
8160: 64 20 73 65 70 61 72 61 74 65 6c 79 2e 20 2a 2f d separately. */
8170: 09 09 5c 0a 20 20 20 20 20 2a 28 66 6c 6f 61 74 ..\. *(float
8180: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
8190: 2b 20 28 4c 49 53 54 29 2d 3e 66 61 72 67 5f 6f + (LIST)->farg_o
81a0: 66 66 73 65 74 29 09 09 09 5c 0a 20 20 20 3a 20 ffset)...\. :
81b0: 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 *(float*)((LIST)
81c0: 2d 3e 61 70 74 72 29 09 09 09 09 09 09 5c 0a 20 ->aptr)......\.
81d0: 20 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 ).#define va_ar
81e0: 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 g_double(LIST)
81f0: 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f \. (__va_align_
8200: 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 double(LIST)....
8210: 09 09 5c 0a 20 20 20 28 28 28 4c 49 53 54 29 2d ..\. (((LIST)-
8220: 3e 61 70 74 72 20 2d 3d 20 73 69 7a 65 6f 66 28 >aptr -= sizeof(
8230: 64 6f 75 62 6c 65 29 29 20 3e 3d 20 28 4c 49 53 double)) >= (LIS
8240: 54 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 5c T)->memargptr..\
8250: 0a 20 20 20 20 3f 20 2f 2a 20 54 68 65 20 66 69 . ? /* The fi
8260: 72 73 74 20 32 20 64 6f 75 62 6c 65 20 61 72 67 rst 2 double arg
8270: 73 20 61 72 65 20 73 74 6f 72 65 64 20 73 65 70 s are stored sep
8280: 61 72 61 74 65 6c 79 2e 20 2a 2f 09 09 5c 0a 20 arately. */..\.
8290: 20 20 20 20 20 2a 28 64 6f 75 62 6c 65 2a 29 28 *(double*)(
82a0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 20 28 (LIST)->aptr + (
82b0: 4c 49 53 54 29 2d 3e 64 61 72 67 5f 6f 66 66 73 LIST)->darg_offs
82c0: 65 74 29 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 et)...\. : *(
82d0: 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d double*)((LIST)-
82e0: 3e 61 70 74 72 29 09 09 09 09 09 09 5c 0a 20 20 >aptr)......\.
82f0: 29 29 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 )).#endif.#endif
8300: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
8310: 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e ips__) && !defin
8320: 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 ed(__mipsn32__)
8330: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 && !defined(__mi
8340: 70 73 36 34 5f 5f 29 0a 2f 2a 20 54 68 65 20 66 ps64__)./* The f
8350: 69 72 73 74 20 30 2c 31 2c 32 20 72 65 67 69 73 irst 0,1,2 regis
8360: 74 65 72 73 20 61 72 65 20 73 74 6f 72 65 64 20 ters are stored
8370: 65 6c 73 65 77 68 65 72 65 20 69 66 20 74 68 65 elsewhere if the
8380: 79 20 61 72 65 20 66 6c 6f 61 74 69 6e 67 2d 70 y are floating-p
8390: 6f 69 6e 74 0a 20 2a 20 70 61 72 61 6d 65 74 65 oint. * paramete
83a0: 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 rs.. */.#define
83b0: 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 va_arg_float(LIS
83c0: 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d T) \. ((LIST)-
83d0: 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 >aptr += sizeof(
83e0: 66 6c 6f 61 74 29 2c 09 09 09 09 09 5c 0a 20 20 float),.....\.
83f0: 20 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 2b 2b 2c (LIST)->anum++,
8400: 09 09 09 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 .......\. ((LI
8410: 53 54 29 2d 3e 61 6e 75 6d 20 3d 3d 20 31 09 09 ST)->anum == 1..
8420: 09 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 28 4c .....\. ? ((L
8430: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
8440: 5f 56 41 5f 46 4c 4f 41 54 5f 31 2c 20 28 4c 49 _VA_FLOAT_1, (LI
8450: 53 54 29 2d 3e 66 61 72 67 5b 30 5d 29 09 09 09 ST)->farg[0])...
8460: 5c 0a 20 20 20 20 3a 20 28 28 4c 49 53 54 29 2d \. : ((LIST)-
8470: 3e 61 6e 75 6d 20 3d 3d 20 32 20 26 26 20 28 28 >anum == 2 && ((
8480: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f LIST)->flags & _
8490: 5f 56 41 5f 46 4c 4f 41 54 5f 31 29 09 09 5c 0a _VA_FLOAT_1)..\.
84a0: 20 20 20 20 20 20 20 3f 20 28 2f 2a 20 28 4c 49 ? (/* (LI
84b0: 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f ST)->flags |= __
84c0: 56 41 5f 46 4c 4f 41 54 5f 32 2c 20 2a 2f 20 28 VA_FLOAT_2, */ (
84d0: 4c 49 53 54 29 2d 3e 66 61 72 67 5b 31 5d 29 09 LIST)->farg[1]).
84e0: 09 5c 0a 20 20 20 20 20 20 20 3a 20 2a 28 66 6c .\. : *(fl
84f0: 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 oat*)((LIST)->ap
8500: 74 72 20 2d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 tr - sizeof(floa
8510: 74 29 29 09 09 09 5c 0a 20 20 29 29 20 20 29 0a t))...\. )) ).
8520: 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 #define va_arg_d
8530: 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 ouble(LIST) \.
8540: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 (__va_align_dou
8550: 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 5c ble(LIST)......\
8560: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
8570: 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c += sizeof(doubl
8580: 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 e),.....\. (LI
8590: 53 54 29 2d 3e 61 6e 75 6d 2b 2b 2c 09 09 09 09 ST)->anum++,....
85a0: 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d ...\. ((LIST)-
85b0: 3e 61 6e 75 6d 20 3d 3d 20 31 09 09 09 09 09 09 >anum == 1......
85c0: 09 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 .\. ? ((LIST)
85d0: 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f ->flags |= __VA_
85e0: 46 4c 4f 41 54 5f 31 2c 20 28 4c 49 53 54 29 2d FLOAT_1, (LIST)-
85f0: 3e 64 61 72 67 5b 30 5d 29 09 09 09 5c 0a 20 20 >darg[0])...\.
8600: 20 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 : ((LIST)->anu
8610: 6d 20 3d 3d 20 32 20 26 26 20 28 28 4c 49 53 54 m == 2 && ((LIST
8620: 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f )->flags & __VA_
8630: 46 4c 4f 41 54 5f 31 29 09 09 5c 0a 20 20 20 20 FLOAT_1)..\.
8640: 20 20 20 3f 20 28 2f 2a 20 28 4c 49 53 54 29 2d ? (/* (LIST)-
8650: 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 46 >flags |= __VA_F
8660: 4c 4f 41 54 5f 32 2c 20 2a 2f 20 28 4c 49 53 54 LOAT_2, */ (LIST
8670: 29 2d 3e 64 61 72 67 5b 31 5d 29 09 09 5c 0a 20 )->darg[1])..\.
8680: 20 20 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 : *(double
8690: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
86a0: 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 - sizeof(double)
86b0: 29 09 09 09 5c 0a 20 20 29 29 20 20 29 0a 23 65 )...\. )) ).#e
86c0: 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 ndif.#if defined
86d0: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
86e0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
86f0: 34 5f 5f 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 4__)./* The firs
8700: 74 20 30 2c 2e 2e 2c 38 20 72 65 67 69 73 74 65 t 0,..,8 registe
8710: 72 73 20 61 72 65 20 73 74 6f 72 65 64 20 65 6c rs are stored el
8720: 73 65 77 68 65 72 65 20 69 66 20 74 68 65 79 20 sewhere if they
8730: 61 72 65 20 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 are floating-poi
8740: 6e 74 0a 20 2a 20 70 61 72 61 6d 65 74 65 72 73 nt. * parameters
8750: 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 .. */.#define va
8760: 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 _arg_float(LIST)
8770: 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 \. (__va_alig
8780: 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 n_double(LIST)..
8790: 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d ....\. (LIST)-
87a0: 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 >aptr += sizeof(
87b0: 64 6f 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 double),.....\.
87c0: 20 20 28 2b 2b 28 4c 49 53 54 29 2d 3e 61 6e 75 (++(LIST)->anu
87d0: 6d 20 3c 3d 20 38 09 09 09 09 09 09 09 5c 0a 20 m <= 8.......\.
87e0: 20 20 20 3f 20 28 4c 49 53 54 29 2d 3e 66 61 72 ? (LIST)->far
87f0: 67 5b 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2d g[(LIST)->anum -
8800: 20 31 5d 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 1].....\. :
8810: 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 *(float*)((LIST)
8820: 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 ->aptr - sizeof(
8830: 64 6f 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 double))....\.
8840: 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 )).#define va_ar
8850: 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 g_double(LIST)
8860: 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f \. (__va_align_
8870: 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 double(LIST)....
8880: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
8890: 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f ptr += sizeof(do
88a0: 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 uble),.....\.
88b0: 28 2b 2b 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 (++(LIST)->anum
88c0: 3c 3d 20 38 09 09 09 09 09 09 09 5c 0a 20 20 20 <= 8.......\.
88d0: 20 3f 20 28 4c 49 53 54 29 2d 3e 64 61 72 67 5b ? (LIST)->darg[
88e0: 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 (LIST)->anum - 1
88f0: 5d 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 ].....\. : *(
8900: 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d double*)((LIST)-
8910: 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 >aptr - sizeof(d
8920: 6f 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 ouble))....\. )
8930: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
8940: 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f ined(__sparc64__
8950: 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 74 20 30 )./* The first 0
8960: 2c 2e 2e 2c 31 36 20 72 65 67 69 73 74 65 72 73 ,..,16 registers
8970: 20 61 72 65 20 73 74 6f 72 65 64 20 65 6c 73 65 are stored else
8980: 77 68 65 72 65 20 69 66 20 74 68 65 79 20 61 72 where if they ar
8990: 65 20 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 e floating-point
89a0: 0a 20 2a 20 70 61 72 61 6d 65 74 65 72 73 2e 0a . * parameters..
89b0: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 */.#define va_a
89c0: 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 rg_float(LIST)
89d0: 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f \. (__va_align_
89e0: 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 double(LIST)....
89f0: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
8a00: 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f ptr += sizeof(do
8a10: 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 uble),.....\.
8a20: 28 2b 2b 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 (++(LIST)->anum
8a30: 3c 3d 20 31 36 09 09 09 09 09 09 5c 0a 20 20 20 <= 16......\.
8a40: 20 3f 20 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b ? (LIST)->farg[
8a50: 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 (LIST)->anum - 1
8a60: 5d 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 ].....\. : *(
8a70: 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e float*)((LIST)->
8a80: 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f aptr - sizeof(do
8a90: 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 uble))....\. ))
8aa0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
8ab0: 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a double(LIST) \.
8ac0: 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f (__va_align_do
8ad0: 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 uble(LIST)......
8ae0: 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 \. (LIST)->apt
8af0: 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 r += sizeof(doub
8b00: 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 2b le),.....\. (+
8b10: 2b 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3c 3d +(LIST)->anum <=
8b20: 20 31 36 09 09 09 09 09 09 5c 0a 20 20 20 20 3f 16......\. ?
8b30: 20 28 4c 49 53 54 29 2d 3e 64 61 72 67 5b 28 4c (LIST)->darg[(L
8b40: 49 53 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 5d 09 IST)->anum - 1].
8b50: 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 64 6f ....\. : *(do
8b60: 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 uble*)((LIST)->a
8b70: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 ptr - sizeof(dou
8b80: 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 0a ble))....\. )).
8b90: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
8ba0: 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 ed(__powerpc__)
8bb0: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f && !defined(__po
8bc0: 77 65 72 70 63 36 34 5f 5f 29 20 26 26 20 28 64 werpc64__) && (d
8bd0: 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c 20 efined(_AIX) ||
8be0: 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 5f (defined(__MACH_
8bf0: 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f 5f _) && defined(__
8c00: 41 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a 20 54 68 APPLE__)))./* Th
8c10: 65 20 66 69 72 73 74 20 31 33 20 66 6c 6f 61 74 e first 13 float
8c20: 69 6e 67 2d 70 6f 69 6e 74 20 61 72 67 73 20 68 ing-point args h
8c30: 61 76 65 20 62 65 65 6e 20 73 74 6f 72 65 64 20 ave been stored
8c40: 65 6c 73 65 77 68 65 72 65 2e 20 2a 2f 0a 23 64 elsewhere. */.#d
8c50: 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c 6f efine va_arg_flo
8c60: 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 at(LIST) \. ((
8c70: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
8c80: 69 7a 65 6f 66 28 66 6c 6f 61 74 29 2c 09 09 09 izeof(float),...
8c90: 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e ..\. ((LIST)->
8ca0: 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c memfargptr < &(L
8cb0: 49 53 54 29 2d 3e 66 61 72 67 5b 31 33 5d 09 09 IST)->farg[13]..
8cc0: 09 09 5c 0a 20 20 20 20 3f 20 28 66 6c 6f 61 74 ..\. ? (float
8cd0: 29 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 ) *((LIST)->memf
8ce0: 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 5c 0a argptr++).....\.
8cf0: 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a 29 28 : *(float*)(
8d00: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 (LIST)->aptr - s
8d10: 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 09 09 09 izeof(float))...
8d20: 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e 65 20 .\. )).#define
8d30: 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 va_arg_double(LI
8d40: 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 ST) \. (__va_a
8d50: 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 lign_double(LIST
8d60: 29 09 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 )......\. (LIS
8d70: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 T)->aptr += size
8d80: 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 09 09 of(double),.....
8d90: 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 \. ((LIST)->me
8da0: 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 53 mfargptr < &(LIS
8db0: 54 29 2d 3e 66 61 72 67 5b 31 33 5d 09 09 09 09 T)->farg[13]....
8dc0: 5c 0a 20 20 20 20 3f 20 2a 28 28 4c 49 53 54 29 \. ? *((LIST)
8dd0: 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 29 09 ->memfargptr++).
8de0: 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 64 .....\. : *(d
8df0: 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e ouble*)((LIST)->
8e00: 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f aptr - sizeof(do
8e10: 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 uble))....\. ))
8e20: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
8e30: 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 ned(__powerpc__)
8e40: 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 && !defined(__p
8e50: 6f 77 65 72 70 63 36 34 5f 5f 29 20 26 26 20 21 owerpc64__) && !
8e60: 28 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c (defined(_AIX) |
8e70: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 | (defined(__MAC
8e80: 48 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 H__) && defined(
8e90: 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a 20 __APPLE__)))./*
8ea0: 54 68 65 20 66 69 72 73 74 20 38 20 66 6c 6f 61 The first 8 floa
8eb0: 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 67 73 20 ting-point args
8ec0: 68 61 76 65 20 62 65 65 6e 20 73 74 6f 72 65 64 have been stored
8ed0: 20 65 6c 73 65 77 68 65 72 65 2e 20 2a 2f 0a 23 elsewhere. */.#
8ee0: 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c define va_arg_fl
8ef0: 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 oat(LIST) \. (
8f00: 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 (LIST)->memfargp
8f10: 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 tr < &(LIST)->fa
8f20: 72 67 5b 38 5d 09 09 09 09 5c 0a 20 20 20 3f 20 rg[8]....\. ?
8f30: 28 66 6c 6f 61 74 29 20 2a 28 28 4c 49 53 54 29 (float) *((LIST)
8f40: 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 29 09 ->memfargptr++).
8f50: 09 09 09 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 ....\. : ((LIS
8f60: 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 T)->aptr = ((LIS
8f70: 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 T)->onstack == 0
8f80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8f90: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a \.
8fa0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8fb0: 20 20 20 20 20 20 20 3f 20 28 28 4c 49 53 54 29 ? ((LIST)
8fc0: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
8fd0: 53 54 29 2d 3e 73 61 70 74 72 29 20 20 20 20 20 ST)->saptr)
8fe0: 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 \.
8ff0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9000: 20 3a 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 : (LIST)->aptr
9010: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9020: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9030: 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 \.
9040: 20 20 20 20 20 20 20 20 20 20 29 2c 20 20 20 20 ),
9050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9060: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9070: 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 \.
9080: 20 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 (LIST)->aptr
9090: 20 2b 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 += sizeof(float
90a0: 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 20 20 2a ),.....\. *
90b0: 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d (float*)((LIST)-
90c0: 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 66 >aptr - sizeof(f
90d0: 6c 6f 61 74 29 29 09 09 09 09 5c 0a 20 20 29 29 loat))....\. ))
90e0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
90f0: 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a double(LIST) \.
9100: 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 ((LIST)->memfa
9110: 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d rgptr < &(LIST)-
9120: 3e 66 61 72 67 5b 38 5d 09 09 09 09 5c 0a 20 20 >farg[8]....\.
9130: 20 20 3f 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 ? *((LIST)->me
9140: 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 mfargptr++).....
9150: 09 5c 0a 20 20 20 20 3a 20 28 28 4c 49 53 54 29 .\. : ((LIST)
9160: 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 54 29 ->aptr = ((LIST)
9170: 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 20 20 ->onstack == 0
9180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9190: 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 \.
91a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
91b0: 20 20 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6f ? ((LIST)->o
91c0: 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 53 54 29 nstack=1, (LIST)
91d0: 2d 3e 73 61 70 74 72 29 20 20 20 20 20 20 20 20 ->saptr)
91e0: 20 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 \.
91f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 :
9200: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 20 20 20 (LIST)->aptr
9210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9220: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c \
9230: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
9240: 20 20 20 20 20 20 20 29 2c 20 20 20 20 20 20 20 ),
9250: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9260: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9270: 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 \.
9280: 20 20 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 __va_align_dou
9290: 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 5c ble(LIST)......\
92a0: 0a 20 20 20 20 20 20 20 28 4c 49 53 54 29 2d 3e . (LIST)->
92b0: 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 aptr += sizeof(d
92c0: 6f 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 ouble),.....\.
92d0: 20 20 20 20 20 2a 28 64 6f 75 62 6c 65 2a 29 28 *(double*)(
92e0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 (LIST)->aptr - s
92f0: 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 izeof(double))..
9300: 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a 23 .\. )).#endif.#
9310: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 if defined(__pow
9320: 65 72 70 63 36 34 5f 5f 29 0a 2f 2a 20 54 68 65 erpc64__)./* The
9330: 20 66 69 72 73 74 20 31 33 20 66 6c 6f 61 74 69 first 13 floati
9340: 6e 67 2d 70 6f 69 6e 74 20 61 72 67 73 20 68 61 ng-point args ha
9350: 76 65 20 62 65 65 6e 20 73 74 6f 72 65 64 20 65 ve been stored e
9360: 6c 73 65 77 68 65 72 65 2e 20 2a 2f 0a 23 64 65 lsewhere. */.#de
9370: 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c 6f 61 fine va_arg_floa
9380: 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c t(LIST) \. ((L
9390: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
93a0: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 2c 09 zeof(__vaword),.
93b0: 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 ....\. ((LIST)
93c0: 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 ->memfargptr < &
93d0: 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 31 33 5d (LIST)->farg[13]
93e0: 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 66 6c 6f ....\. ? (flo
93f0: 61 74 29 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 at) *((LIST)->me
9400: 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 mfargptr++).....
9410: 5c 0a 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a \. : *(float*
9420: 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d )((LIST)->aptr -
9430: 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 09 sizeof(float)).
9440: 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e ...\. )).#defin
9450: 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 e va_arg_double(
9460: 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 LIST) \. (__va
9470: 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 _align_double(LI
9480: 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 28 4c ST)......\. (L
9490: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
94a0: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 zeof(double),...
94b0: 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e ..\. ((LIST)->
94c0: 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c memfargptr < &(L
94d0: 49 53 54 29 2d 3e 66 61 72 67 5b 31 33 5d 09 09 IST)->farg[13]..
94e0: 09 09 5c 0a 20 20 20 20 3f 20 2a 28 28 4c 49 53 ..\. ? *((LIS
94f0: 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b T)->memfargptr++
9500: 29 09 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a )......\. : *
9510: 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 (double*)((LIST)
9520: 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 ->aptr - sizeof(
9530: 64 6f 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 double))....\.
9540: 29 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 )).#endif.#if de
9550: 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a fined(__s390__).
9560: 2f 2a 20 54 68 65 20 66 69 72 73 74 20 32 20 66 /* The first 2 f
9570: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 loating-point ar
9580: 67 73 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f gs have been sto
9590: 72 65 64 20 65 6c 73 65 77 68 65 72 65 2e 20 2a red elsewhere. *
95a0: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
95b0: 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a _float(LIST) \.
95c0: 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 ((LIST)->memfa
95d0: 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d rgptr < &(LIST)-
95e0: 3e 66 61 72 67 5b 32 5d 09 09 09 09 5c 0a 20 20 >farg[2]....\.
95f0: 20 3f 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 64 61 ? (LIST)->memda
9600: 72 67 70 74 72 2b 2b 2c 20 28 66 6c 6f 61 74 29 rgptr++, (float)
9610: 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 *((LIST)->memfa
9620: 72 67 70 74 72 2b 2b 29 09 09 5c 0a 20 20 20 3a rgptr++)..\. :
9630: 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d ((LIST)->aptr =
9640: 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 ((LIST)->onstac
9650: 6b 20 3d 3d 20 30 20 20 20 20 20 20 20 20 20 20 k == 0
9660: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9670: 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 \.
9680: 20 20 20 20 20 20 20 20 20 20 20 20 20 3f 20 28 ? (
9690: 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d (LIST)->onstack=
96a0: 31 2c 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 1, (LIST)->saptr
96b0: 29 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a ) \.
96c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
96d0: 20 20 20 20 20 20 20 3a 20 28 4c 49 53 54 29 2d : (LIST)-
96e0: 3e 61 70 74 72 20 20 20 20 20 20 20 20 20 20 20 >aptr
96f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9700: 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 \.
9710: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9720: 29 2c 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ),
9730: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9740: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9750: 20 20 5c 0a 20 20 20 20 20 20 28 4c 49 53 54 29 \. (LIST)
9760: 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 ->aptr += sizeof
9770: 28 66 6c 6f 61 74 29 2c 09 09 09 09 09 5c 0a 20 (float),.....\.
9780: 20 20 20 20 20 2a 28 66 6c 6f 61 74 2a 29 28 28 *(float*)((
9790: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 LIST)->aptr - si
97a0: 7a 65 6f 66 28 66 6c 6f 61 74 29 29 09 09 09 09 zeof(float))....
97b0: 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e 65 20 76 \. )).#define v
97c0: 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 a_arg_double(LIS
97d0: 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d T) \. ((LIST)-
97e0: 3e 6d 65 6d 64 61 72 67 70 74 72 20 3c 20 26 28 >memdargptr < &(
97f0: 4c 49 53 54 29 2d 3e 64 61 72 67 5b 32 5d 09 09 LIST)->darg[2]..
9800: 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 53 54 29 ..\. ? (LIST)
9810: 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 2c 20 ->memfargptr++,
9820: 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 64 61 72 *((LIST)->memdar
9830: 67 70 74 72 2b 2b 29 09 09 09 5c 0a 20 20 20 20 gptr++)...\.
9840: 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 : ((LIST)->aptr
9850: 3d 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 = ((LIST)->onsta
9860: 63 6b 20 3d 3d 20 30 20 20 20 20 20 20 20 20 20 ck == 0
9870: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9880: 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 \.
9890: 20 20 20 20 20 20 20 20 20 20 20 20 20 3f 20 28 ? (
98a0: 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d (LIST)->onstack=
98b0: 31 2c 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 1, (LIST)->saptr
98c0: 29 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a ) \.
98d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
98e0: 20 20 20 20 20 20 20 3a 20 28 4c 49 53 54 29 2d : (LIST)-
98f0: 3e 61 70 74 72 20 20 20 20 20 20 20 20 20 20 20 >aptr
9900: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9910: 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 \.
9920: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9930: 29 2c 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ),
9940: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9950: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9960: 20 20 5c 0a 20 20 20 20 20 20 20 5f 5f 76 61 5f \. __va_
9970: 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 align_double(LIS
9980: 54 29 09 09 09 09 09 09 5c 0a 20 20 20 20 20 20 T)......\.
9990: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d (LIST)->aptr +=
99a0: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c sizeof(double),
99b0: 09 09 09 09 09 5c 0a 20 20 20 20 20 20 20 2a 28 .....\. *(
99c0: 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d double*)((LIST)-
99d0: 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 >aptr - sizeof(d
99e0: 6f 75 62 6c 65 29 29 09 09 09 5c 0a 20 20 29 29 ouble))...\. ))
99f0: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
9a00: 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 2f 2a ned(__ia64__)./*
9a10: 20 54 68 65 20 66 69 72 73 74 20 38 20 66 6c 6f The first 8 flo
9a20: 61 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 67 73 ating-point args
9a30: 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f 72 65 have been store
9a40: 64 20 65 6c 73 65 77 68 65 72 65 2e 20 2a 2f 0a d elsewhere. */.
9a50: 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 #define va_arg_f
9a60: 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 loat(LIST) \.
9a70: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d ((LIST)->aptr +=
9a80: 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 sizeof(__vaword
9a90: 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 ),.....\. ((LI
9aa0: 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 ST)->memfargptr
9ab0: 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b < &(LIST)->farg[
9ac0: 38 5d 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 66 8]....\. ? (f
9ad0: 6c 6f 61 74 29 20 2a 28 28 4c 49 53 54 29 2d 3e loat) *((LIST)->
9ae0: 6d 65 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 09 memfargptr++)...
9af0: 09 09 5c 0a 20 20 20 20 3a 20 2a 28 66 6c 6f 61 ..\. : *(floa
9b00: 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 t*)((LIST)->aptr
9b10: 20 2d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f - sizeof(__vawo
9b20: 72 64 29 29 09 09 09 5c 0a 20 20 29 29 0a 23 64 rd))...\. )).#d
9b30: 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 efine va_arg_dou
9b40: 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 ble(LIST) \. (
9b50: 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c __va_align_doubl
9b60: 65 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 e(LIST)......\.
9b70: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
9b80: 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 = sizeof(double)
9b90: 2c 09 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 ,.....\. ((LIS
9ba0: 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c T)->memfargptr <
9bb0: 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 38 &(LIST)->farg[8
9bc0: 5d 09 09 09 09 5c 0a 20 20 20 20 3f 20 2a 28 28 ]....\. ? *((
9bd0: 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 LIST)->memfargpt
9be0: 72 2b 2b 29 09 09 09 09 09 09 5c 0a 20 20 20 20 r++)......\.
9bf0: 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 : *(double*)((LI
9c00: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
9c10: 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 09 09 5c of(double))....\
9c20: 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a 23 69 66 . )).#endif.#if
9c30: 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 defined(__x86_6
9c40: 34 5f 5f 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 4__)./* The firs
9c50: 74 20 38 20 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 t 8 floating-poi
9c60: 6e 74 20 61 72 67 73 20 68 61 76 65 20 62 65 65 nt args have bee
9c70: 6e 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 65 n stored elsewhe
9c80: 72 65 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 re. */.#define v
9c90: 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 a_arg_float(LIST
9ca0: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
9cb0: 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c memfargptr < &(L
9cc0: 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d 09 09 09 IST)->farg[8]...
9cd0: 09 5c 0a 20 20 20 3f 20 28 28 4c 49 53 54 29 2d .\. ? ((LIST)-
9ce0: 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 2c 09 09 >memfargptr++,..
9cf0: 09 09 09 09 5c 0a 20 20 20 20 20 20 2a 28 66 6c ....\. *(fl
9d00: 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 6d 65 oat*)((LIST)->me
9d10: 6d 66 61 72 67 70 74 72 20 2d 20 31 29 09 09 09 mfargptr - 1)...
9d20: 09 09 5c 0a 20 20 20 20 20 29 09 09 09 09 09 09 ..\. )......
9d30: 09 09 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 54 ...\. : ((LIST
9d40: 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f )->aptr += sizeo
9d50: 66 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 09 09 f(__vaword),....
9d60: 09 5c 0a 20 20 20 20 20 20 2a 28 66 6c 6f 61 74 .\. *(float
9d70: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
9d80: 2d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 - sizeof(__vawor
9d90: 64 29 29 09 09 09 5c 0a 20 20 29 20 20 29 0a 23 d))...\. ) ).#
9da0: 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f define va_arg_do
9db0: 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 uble(LIST) \.
9dc0: 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 ((LIST)->memfarg
9dd0: 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 ptr < &(LIST)->f
9de0: 61 72 67 5b 38 5d 09 09 09 09 5c 0a 20 20 20 3f arg[8]....\. ?
9df0: 20 2a 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 *(LIST)->memfar
9e00: 67 70 74 72 2b 2b 09 09 09 09 09 09 5c 0a 20 20 gptr++......\.
9e10: 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 : ((LIST)->aptr
9e20: 20 2b 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 += sizeof(__vaw
9e30: 6f 72 64 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 ord),.....\.
9e40: 20 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 *(double*)((LI
9e50: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
9e60: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 09 09 09 of(__vaword))...
9e70: 5c 0a 20 20 29 20 20 29 0a 23 65 6e 64 69 66 0a \. ) ).#endif.
9e80: 23 69 66 6e 64 65 66 20 76 61 5f 61 72 67 5f 66 #ifndef va_arg_f
9e90: 6c 6f 61 74 0a 23 64 65 66 69 6e 65 20 76 61 5f loat.#define va_
9ea0: 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 09 arg_float(LIST).
9eb0: 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 66 6c __va_arg(LIST,fl
9ec0: 6f 61 74 29 0a 23 65 6e 64 69 66 0a 23 69 66 6e oat).#endif.#ifn
9ed0: 64 65 66 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c def va_arg_doubl
9ee0: 65 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 e.#define va_arg
9ef0: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c _double(LIST) \
9f00: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 . (__va_align_d
9f10: 6f 75 62 6c 65 28 4c 49 53 54 29 20 5f 5f 76 61 ouble(LIST) __va
9f20: 5f 61 72 67 28 4c 49 53 54 2c 64 6f 75 62 6c 65 _arg(LIST,double
9f30: 29 29 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 50 6f )).#endif../* Po
9f40: 69 6e 74 65 72 20 61 72 67 75 6d 65 6e 74 73 2e inter arguments.
9f50: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 */.#define va_a
9f60: 72 67 5f 70 74 72 28 4c 49 53 54 2c 54 59 50 45 rg_ptr(LIST,TYPE
9f70: 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c ).__va_arg(LIST,
9f80: 54 59 50 45 29 0a 0a 2f 2a 20 53 74 72 75 63 74 TYPE)../* Struct
9f90: 75 72 65 20 61 72 67 75 6d 65 6e 74 73 2e 20 2a ure arguments. *
9fa0: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
9fb0: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
9fc0: 45 29 20 20 5c 0a 20 20 2a 28 54 59 50 45 2a 29 E) \. *(TYPE*)
9fd0: 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 __va_arg_struct(
9fe0: 4c 49 53 54 2c 73 69 7a 65 6f 66 28 54 59 50 45 LIST,sizeof(TYPE
9ff0: 29 2c 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 ),__VA_alignof(T
a000: 59 50 45 29 29 0a 2f 2a 20 5f 76 61 5f 61 72 67 YPE))./* _va_arg
a010: 5f 73 74 72 75 63 74 28 29 20 69 73 20 6c 69 6b _struct() is lik
a020: 65 20 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 e va_arg_struct(
a030: 29 2c 20 65 78 63 65 70 74 20 74 68 61 74 20 79 ), except that y
a040: 6f 75 20 70 61 73 73 20 74 68 65 20 74 79 70 65 ou pass the type
a050: 27 73 0a 20 2a 20 73 69 7a 65 20 61 6e 64 20 61 's. * size and a
a060: 6c 69 67 6e 6d 65 6e 74 20 69 6e 73 74 65 61 64 lignment instead
a070: 20 6f 66 20 74 68 65 20 74 79 70 65 20 61 6e 64 of the type and
a080: 20 67 65 74 20 74 68 65 20 76 61 6c 75 65 27 73 get the value's
a090: 20 61 64 64 72 65 73 73 20 69 6e 73 74 65 61 64 address instead
a0a0: 0a 20 2a 20 6f 66 20 74 68 65 20 76 61 6c 75 65 . * of the value
a0b0: 20 69 74 73 65 6c 66 2e 0a 20 2a 2f 0a 23 64 65 itself.. */.#de
a0c0: 66 69 6e 65 20 5f 76 61 5f 61 72 67 5f 73 74 72 fine _va_arg_str
a0d0: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 uct(LIST,TYPE_SI
a0e0: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 ZE,TYPE_ALIGN)
a0f0: 5c 0a 20 20 28 76 6f 69 64 2a 29 5f 5f 76 61 5f \. (void*)__va_
a100: 61 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c arg_struct(LIST,
a110: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
a120: 4c 49 47 4e 29 0a 2f 2a 20 53 74 72 75 63 74 75 LIGN)./* Structu
a130: 72 65 20 61 72 67 75 6d 65 6e 74 20 61 6c 69 67 re argument alig
a140: 6e 6d 65 6e 74 2e 20 2a 2f 0a 23 69 66 20 64 65 nment. */.#if de
a150: 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 fined(__i386__)
a160: 26 26 20 64 65 66 69 6e 65 64 28 5f 4d 53 43 5f && defined(_MSC_
a170: 56 45 52 29 0a 2f 2a 20 49 6e 20 4d 53 56 43 2c VER)./* In MSVC,
a180: 20 64 6f 75 62 6c 65 73 20 69 6e 73 69 64 65 20 doubles inside
a190: 73 74 72 75 63 74 75 72 65 73 20 68 61 76 65 20 structures have
a1a0: 61 6c 69 67 6e 6d 65 6e 74 20 38 2c 20 69 2e 65 alignment 8, i.e
a1b0: 2e 0a 20 2a 20 5f 5f 56 41 5f 61 6c 69 67 6e 6f .. * __VA_aligno
a1c0: 66 28 64 6f 75 62 6c 65 29 20 3d 20 38 2c 20 62 f(double) = 8, b
a1d0: 75 74 20 64 6f 75 62 6c 65 73 20 28 61 6e 64 20 ut doubles (and
a1e0: 61 6c 73 6f 20 73 74 72 75 63 74 75 72 65 73 20 also structures
a1f0: 63 6f 6e 74 61 69 6e 69 6e 67 0a 20 2a 20 64 6f containing. * do
a200: 75 62 6c 65 73 29 20 61 72 65 20 70 61 73 73 65 ubles) are passe
a210: 64 20 6f 6e 20 74 68 65 20 73 74 61 63 6b 20 77 d on the stack w
a220: 69 74 68 20 61 6c 69 67 6e 6d 65 6e 74 20 34 2e ith alignment 4.
a230: 20 4c 6f 6f 6b 73 20 72 65 61 6c 6c 79 20 77 65 Looks really we
a240: 69 72 64 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 ird.. */.#define
a250: 20 5f 5f 76 61 5f 73 74 72 75 63 74 5f 61 6c 69 __va_struct_ali
a260: 67 6e 6d 65 6e 74 28 54 59 50 45 5f 41 4c 49 47 gnment(TYPE_ALIG
a270: 4e 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f 41 N) \. ((TYPE_A
a280: 4c 49 47 4e 29 20 3c 3d 20 34 20 3f 20 28 54 59 LIGN) <= 4 ? (TY
a290: 50 45 5f 41 4c 49 47 4e 29 20 3a 20 34 29 0a 23 PE_ALIGN) : 4).#
a2a0: 65 6c 73 65 0a 23 64 65 66 69 6e 65 20 5f 5f 76 else.#define __v
a2b0: 61 5f 73 74 72 75 63 74 5f 61 6c 69 67 6e 6d 65 a_struct_alignme
a2c0: 6e 74 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 nt(TYPE_ALIGN)
a2d0: 5c 0a 20 20 28 54 59 50 45 5f 41 4c 49 47 4e 29 \. (TYPE_ALIGN)
a2e0: 0a 23 65 6e 64 69 66 0a 23 64 65 66 69 6e 65 20 .#endif.#define
a2f0: 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 75 63 __va_align_struc
a300: 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 t(LIST,TYPE_SIZE
a310: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
a320: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d (LIST)->aptr =
a330: 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b ((LIST)->aptr +
a340: 20 5f 5f 76 61 5f 73 74 72 75 63 74 5f 61 6c 69 __va_struct_ali
a350: 67 6e 6d 65 6e 74 28 54 59 50 45 5f 41 4c 49 47 gnment(TYPE_ALIG
a360: 4e 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 5f N)-1) & -(long)_
a370: 5f 76 61 5f 73 74 72 75 63 74 5f 61 6c 69 67 6e _va_struct_align
a380: 6d 65 6e 74 28 54 59 50 45 5f 41 4c 49 47 4e 29 ment(TYPE_ALIGN)
a390: 2c 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f ,.#if defined(__
a3a0: 69 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e i386__) || defin
a3b0: 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 ed(__m68k__) ||
a3c0: 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 5f defined(__alpha_
a3d0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
a3e0: 61 72 6d 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 arm__) || define
a3f0: 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 d(__powerpc64__)
a400: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 || defined(__m8
a410: 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 8k__) || defined
a420: 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 (__convex__) ||
a430: 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 defined(__x86_64
a440: 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 __).#define __va
a450: 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 _arg_struct(LIST
a460: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
a470: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 ALIGN) \. (__v
a480: 61 5f 61 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c a_align_struct(L
a490: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
a4a0: 50 45 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 PE_ALIGN)....\.
a4b0: 20 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 __va_arg_adjus
a4c0: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
a4d0: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
a4e0: 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 ..\. ).#endif.#
a4f0: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
a500: 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 s__) && !defined
a510: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 26 26 (__mipsn32__) &&
a520: 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 !defined(__mips
a530: 36 34 5f 5f 29 0a 2f 2a 20 73 6d 61 6c 6c 20 73 64__)./* small s
a540: 74 72 75 63 74 75 72 65 73 20 3c 20 31 20 77 6f tructures < 1 wo
a550: 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 rd are adjusted
a560: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d depending on com
a570: 70 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 piler */.#define
a580: 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 __va_arg_struct
a590: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
a5a0: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
a5b0: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 (__va_align_str
a5c0: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 uct(LIST,TYPE_SI
a5d0: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
a5e0: 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e ..\. ((LIST)->
a5f0: 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 53 47 49 flags & __VA_SGI
a600: 43 43 5f 53 54 52 55 43 54 5f 41 52 47 53 09 09 CC_STRUCT_ARGS..
a610: 09 09 5c 0a 20 20 20 20 3f 20 2f 2a 20 53 47 49 ..\. ? /* SGI
a620: 20 4d 49 50 53 20 63 63 20 70 61 73 73 65 73 20 MIPS cc passes
a630: 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 small structures
a640: 20 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 2c 20 left-adjusted,
a650: 61 6c 74 68 6f 75 67 68 20 62 69 67 2d 65 6e 64 although big-end
a660: 69 61 6e 21 20 2a 2f 5c 0a 20 20 20 20 20 20 5f ian! */\. _
a670: 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 _va_arg_leftadju
a680: 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 sted(LIST,TYPE_S
a690: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 IZE,TYPE_ALIGN).
a6a0: 09 09 5c 0a 20 20 20 20 3a 20 2f 2a 20 53 47 49 ..\. : /* SGI
a6b0: 20 4d 49 50 53 20 67 63 63 20 70 61 73 73 65 73 MIPS gcc passes
a6c0: 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 small structure
a6d0: 73 20 77 69 74 68 69 6e 20 74 68 65 20 66 69 72 s within the fir
a6e0: 73 74 20 66 6f 75 72 20 77 6f 72 64 73 20 6c 65 st four words le
a6f0: 66 74 2d 09 20 20 20 5c 0a 20 20 20 20 20 20 20 ft-. \.
a700: 2a 20 61 64 6a 75 73 74 65 64 2c 20 66 6f 72 20 * adjusted, for
a710: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 compatibility wi
a720: 74 68 20 63 63 2e 20 42 75 74 20 73 74 72 75 63 th cc. But struc
a730: 74 75 72 65 73 20 69 6e 20 6d 65 6d 6f 72 79 20 tures in memory
a740: 61 72 65 20 70 61 73 73 65 64 20 20 5c 0a 20 20 are passed \.
a750: 20 20 20 20 20 2a 20 72 69 67 68 74 2d 61 64 6a * right-adj
a760: 75 73 74 65 64 21 21 20 53 65 65 20 67 63 63 2d usted!! See gcc-
a770: 32 2e 36 2e 33 2f 63 6f 6e 66 69 67 2f 6d 69 70 2.6.3/config/mip
a780: 73 2f 6d 69 70 73 2e 63 3a 66 75 6e 63 74 69 6f s/mips.c:functio
a790: 6e 5f 61 72 67 28 29 2e 09 20 20 20 5c 0a 20 20 n_arg().. \.
a7a0: 20 20 20 20 20 2a 2f 09 09 09 09 09 09 09 09 09 */.........
a7b0: 20 20 20 5c 0a 20 20 20 20 20 20 28 28 4c 49 53 \. ((LIS
a7c0: 54 29 2d 3e 61 70 74 72 20 3c 20 28 4c 49 53 54 T)->aptr < (LIST
a7d0: 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 09 09 )->memargptr....
a7e0: 09 5c 0a 20 20 20 20 20 20 20 3f 20 5f 5f 76 61 .\. ? __va
a7f0: 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 _arg_leftadjuste
a800: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
a810: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 5c 0a ,TYPE_ALIGN)..\.
a820: 20 20 20 20 20 20 20 3a 20 5f 5f 76 61 5f 61 72 : __va_ar
a830: 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 g_rightadjusted(
a840: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
a850: 59 50 45 5f 41 4c 49 47 4e 29 09 09 5c 0a 20 20 YPE_ALIGN)..\.
a860: 29 29 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 )) ).#endif.#if
a870: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e defined(__mipsn
a880: 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 32__) || defined
a890: 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 2f 2a 20 (__mips64__)./*
a8a0: 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 small structures
a8b0: 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 61 64 < 1 word are ad
a8c0: 6a 75 73 74 65 64 20 64 65 70 65 6e 64 69 6e 67 justed depending
a8d0: 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a on compiler */.
a8e0: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 #define __va_arg
a8f0: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
a900: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
a910: 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c N) \. (__va_al
a920: 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 2c ign_struct(LIST,
a930: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
a940: 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 20 28 28 LIGN)....\. ((
a950: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f LIST)->flags & _
a960: 5f 56 41 5f 53 47 49 43 43 5f 53 54 52 55 43 54 _VA_SGICC_STRUCT
a970: 5f 41 52 47 53 09 09 09 09 5c 0a 20 20 20 20 3f _ARGS....\. ?
a980: 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 63 63 20 /* SGI MIPS cc
a990: 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 74 72 passes small str
a9a0: 75 63 74 75 72 65 73 20 6c 65 66 74 2d 61 64 6a uctures left-adj
a9b0: 75 73 74 65 64 2c 20 61 6c 74 68 6f 75 67 68 20 usted, although
a9c0: 62 69 67 2d 65 6e 64 69 61 6e 21 20 2a 2f 5c 0a big-endian! */\.
a9d0: 20 20 20 20 20 20 5f 5f 76 61 5f 61 72 67 5f 6c __va_arg_l
a9e0: 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 eftadjusted(LIST
a9f0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
aa00: 41 4c 49 47 4e 29 09 09 09 5c 0a 20 20 20 20 3a ALIGN)...\. :
aa10: 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 67 63 63 /* SGI MIPS gcc
aa20: 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 74 passes small st
aa30: 72 75 63 74 75 72 65 73 20 72 69 67 68 74 2d 61 ructures right-a
aa40: 64 6a 75 73 74 65 64 2e 20 2a 2f 09 5c 0a 20 20 djusted. */.\.
aa50: 20 20 20 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 __va_arg_rig
aa60: 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c htadjusted(LIST,
aa70: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
aa80: 4c 49 47 4e 29 09 09 09 5c 0a 20 20 29 29 0a 23 LIGN)...\. )).#
aa90: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
aaa0: 64 28 5f 5f 70 6f 77 65 72 70 63 5f 5f 29 20 26 d(__powerpc__) &
aab0: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 & !defined(__pow
aac0: 65 72 70 63 36 34 5f 5f 29 20 26 26 20 28 64 65 erpc64__) && (de
aad0: 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c 20 28 fined(_AIX) || (
aae0: 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f defined(__MACH__
aaf0: 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 ) && defined(__A
ab00: 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a 20 73 6d 61 PPLE__)))./* sma
ab10: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 3c 20 ll structures <
ab20: 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 1 word are adjus
ab30: 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e ted depending on
ab40: 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 23 64 65 compiler */.#de
ab50: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 fine __va_arg_st
ab60: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
ab70: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 IZE,TYPE_ALIGN)
ab80: 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e \. (__va_align
ab90: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
aba0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
abb0: 4e 29 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 N)....\. ((LIS
abc0: 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 T)->flags & __VA
abd0: 5f 41 49 58 43 43 5f 53 54 52 55 43 54 5f 41 52 _AIXCC_STRUCT_AR
abe0: 47 53 09 09 09 09 5c 0a 20 20 20 20 3f 20 2f 2a GS....\. ? /*
abf0: 20 41 49 58 20 63 63 20 61 6e 64 20 78 6c 63 20 AIX cc and xlc
ac00: 70 61 73 73 20 73 6d 61 6c 6c 20 73 74 72 75 63 pass small struc
ac10: 74 75 72 65 73 20 6c 65 66 74 2d 61 64 6a 75 73 tures left-adjus
ac20: 74 65 64 2c 20 61 6c 74 68 6f 75 67 68 20 62 69 ted, although bi
ac30: 67 2d 65 6e 64 69 61 6e 21 20 2a 2f 5c 0a 20 20 g-endian! */\.
ac40: 20 20 20 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 __va_arg_lef
ac50: 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 tadjusted(LIST,T
ac60: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
ac70: 49 47 4e 29 09 09 09 5c 0a 20 20 20 20 3a 20 2f IGN)...\. : /
ac80: 2a 20 67 63 63 20 70 61 73 73 65 73 20 73 6d 61 * gcc passes sma
ac90: 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 72 69 ll structures ri
aca0: 67 68 74 2d 61 64 6a 75 73 74 65 64 2e 20 2a 2f ght-adjusted. */
acb0: 09 09 09 5c 0a 20 20 20 20 20 20 5f 5f 76 61 5f ...\. __va_
acc0: 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 arg_rightadjuste
acd0: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
ace0: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 5c ,TYPE_ALIGN)...\
acf0: 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a 23 69 66 . )).#endif.#if
ad00: 20 64 65 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 defined(__power
ad10: 70 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 pc__) && !define
ad20: 64 28 5f 5f 70 6f 77 65 72 70 63 36 34 5f 5f 29 d(__powerpc64__)
ad30: 20 26 26 20 21 28 64 65 66 69 6e 65 64 28 5f 41 && !(defined(_A
ad40: 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 IX) || (defined(
ad50: 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 __MACH__) && def
ad60: 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 ined(__APPLE__))
ad70: 29 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 73 20 )./* Structures
ad80: 61 72 65 20 70 61 73 73 65 64 20 61 73 20 70 6f are passed as po
ad90: 69 6e 74 65 72 73 20 74 6f 20 63 61 6c 6c 65 72 inters to caller
ada0: 2d 6d 61 64 65 20 6c 6f 63 61 6c 20 63 6f 70 69 -made local copi
adb0: 65 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f es. */.#define _
adc0: 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c _va_arg_struct(L
add0: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
ade0: 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 76 PE_ALIGN) \. v
adf0: 61 5f 61 72 67 5f 70 74 72 28 4c 49 53 54 2c 76 a_arg_ptr(LIST,v
ae00: 6f 69 64 2a 29 0a 23 65 6e 64 69 66 0a 23 69 66 oid*).#endif.#if
ae10: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
ae20: 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 __) && !defined(
ae30: 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 __sparc64__)./*
ae40: 53 74 72 75 63 74 75 72 65 73 20 61 72 65 20 70 Structures are p
ae50: 61 73 73 65 64 20 61 73 20 70 6f 69 6e 74 65 72 assed as pointer
ae60: 73 20 74 6f 20 63 61 6c 6c 65 72 2d 6d 61 64 65 s to caller-made
ae70: 20 6c 6f 63 61 6c 20 63 6f 70 69 65 73 2e 20 2a local copies. *
ae80: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
ae90: 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 rg_struct(LIST,T
aea0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
aeb0: 49 47 4e 29 20 20 5c 0a 20 20 76 61 5f 61 72 67 IGN) \. va_arg
aec0: 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a 29 _ptr(LIST,void*)
aed0: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
aee0: 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 ned(__sparc64__)
aef0: 0a 2f 2a 20 53 6d 61 6c 6c 20 73 74 72 75 63 74 ./* Small struct
af00: 75 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 ures are passed
af10: 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 2c 20 61 left-adjusted, a
af20: 6c 74 68 6f 75 67 68 20 62 69 67 2d 65 6e 64 69 lthough big-endi
af30: 61 6e 21 20 2a 2f 0a 2f 2a 20 42 69 67 20 73 74 an! */./* Big st
af40: 72 75 63 74 75 72 65 73 20 61 72 65 20 70 61 73 ructures are pas
af50: 73 65 64 20 61 73 20 70 6f 69 6e 74 65 72 73 20 sed as pointers
af60: 74 6f 20 63 61 6c 6c 65 72 2d 6d 61 64 65 20 6c to caller-made l
af70: 6f 63 61 6c 20 63 6f 70 69 65 73 2e 20 2a 2f 0a ocal copies. */.
af80: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 #define __va_arg
af90: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
afa0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
afb0: 4e 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 N) \. ((TYPE_S
afc0: 49 5a 45 29 20 3c 3d 20 31 36 09 09 09 09 09 09 IZE) <= 16......
afd0: 09 5c 0a 20 20 20 3f 20 28 5f 5f 76 61 5f 61 6c .\. ? (__va_al
afe0: 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 2c ign_struct(LIST,
aff0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
b000: 4c 49 47 4e 29 09 09 09 5c 0a 20 20 20 20 20 20 LIGN)...\.
b010: 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a __va_arg_leftadj
b020: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
b030: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
b040: 29 09 09 09 5c 0a 20 20 20 3a 20 76 61 5f 61 72 )...\. : va_ar
b050: 67 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a g_ptr(LIST,void*
b060: 29 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e )......\. ).#en
b070: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
b080: 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 53 74 72 __s390__)./* Str
b090: 75 63 74 75 72 65 73 20 3c 3d 20 38 20 62 79 74 uctures <= 8 byt
b0a0: 65 73 20 61 72 65 20 70 61 73 73 65 64 20 61 73 es are passed as
b0b0: 20 65 6d 62 65 64 64 65 64 20 63 6f 70 69 65 73 embedded copies
b0c0: 20 6f 6e 20 74 68 65 20 61 72 67 20 73 74 61 63 on the arg stac
b0d0: 6b 2e 0a 20 2a 20 42 69 67 20 73 74 72 75 63 74 k.. * Big struct
b0e0: 75 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 ures are passed
b0f0: 61 73 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 as pointers to c
b100: 61 6c 6c 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c aller-made local
b110: 20 63 6f 70 69 65 73 2e 0a 20 2a 2f 0a 23 64 65 copies.. */.#de
b120: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 fine __va_arg_st
b130: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
b140: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 IZE,TYPE_ALIGN)
b150: 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 \. ((TYPE_SIZE
b160: 29 20 21 3d 20 31 20 26 26 20 28 54 59 50 45 5f ) != 1 && (TYPE_
b170: 53 49 5a 45 29 20 21 3d 20 32 20 26 26 20 28 54 SIZE) != 2 && (T
b180: 59 50 45 5f 53 49 5a 45 29 20 21 3d 20 34 20 26 YPE_SIZE) != 4 &
b190: 26 20 28 54 59 50 45 5f 53 49 5a 45 29 20 21 3d & (TYPE_SIZE) !=
b1a0: 20 38 20 5c 0a 20 20 20 3f 20 76 61 5f 61 72 67 8 \. ? va_arg
b1b0: 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a 29 _ptr(LIST,void*)
b1c0: 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 28 76 6f ......\. : (vo
b1d0: 69 64 2a 29 5f 5f 76 61 5f 61 72 67 5f 72 69 67 id*)__va_arg_rig
b1e0: 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c htadjusted(LIST,
b1f0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
b200: 4c 49 47 4e 29 09 09 5c 0a 20 20 29 0a 23 65 6e LIGN)..\. ).#en
b210: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
b220: 5f 5f 68 70 70 61 5f 5f 29 0a 2f 2a 20 53 74 72 __hppa__)./* Str
b230: 75 63 74 75 72 65 73 20 3c 3d 20 38 20 62 79 74 uctures <= 8 byt
b240: 65 73 20 61 72 65 20 70 61 73 73 65 64 20 61 73 es are passed as
b250: 20 65 6d 62 65 64 64 65 64 20 63 6f 70 69 65 73 embedded copies
b260: 20 6f 6e 20 74 68 65 20 61 72 67 20 73 74 61 63 on the arg stac
b270: 6b 2e 0a 20 2a 20 42 69 67 20 73 74 72 75 63 74 k.. * Big struct
b280: 75 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 ures are passed
b290: 61 73 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 as pointers to c
b2a0: 61 6c 6c 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c aller-made local
b2b0: 20 63 6f 70 69 65 73 2e 0a 20 2a 2f 0a 23 64 65 copies.. */.#de
b2c0: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 fine __va_arg_st
b2d0: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
b2e0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 IZE,TYPE_ALIGN)
b2f0: 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 \. ((TYPE_SIZE
b300: 29 20 3e 20 38 09 09 09 09 09 09 09 5c 0a 20 20 ) > 8.......\.
b310: 20 3f 20 76 61 5f 61 72 67 5f 70 74 72 28 4c 49 ? va_arg_ptr(LI
b320: 53 54 2c 76 6f 69 64 2a 29 09 09 09 09 09 09 5c ST,void*)......\
b330: 0a 20 20 20 3a 20 2f 2a 20 46 49 58 4d 45 3a 20 . : /* FIXME:
b340: 67 63 63 2d 32 2e 36 2e 33 20 70 61 73 73 65 73 gcc-2.6.3 passes
b350: 20 73 74 72 75 63 74 75 72 65 73 20 3c 3d 20 34 structures <= 4
b360: 20 62 79 74 65 73 20 69 6e 20 6d 65 6d 6f 72 79 bytes in memory
b370: 20 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 21 20 left-adjusted!
b380: 3f 3f 20 2a 2f 5c 0a 20 20 20 20 20 28 76 6f 69 ?? */\. (voi
b390: 64 2a 29 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 d*)__va_arg_righ
b3a0: 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 tadjusted(LIST,T
b3b0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
b3c0: 49 47 4e 29 09 09 5c 0a 20 20 29 0a 23 65 6e 64 IGN)..\. ).#end
b3d0: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
b3e0: 5f 69 61 36 34 5f 5f 29 0a 2f 2a 20 54 79 70 65 _ia64__)./* Type
b3f0: 73 20 6c 61 72 67 65 72 20 74 68 61 6e 20 61 20 s larger than a
b400: 77 6f 72 64 20 68 61 76 65 20 32 2d 77 6f 72 64 word have 2-word
b410: 20 61 6c 69 67 6e 6d 65 6e 74 2e 20 2a 2f 0a 23 alignment. */.#
b420: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
b430: 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 struct(LIST,TYPE
b440: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
b450: 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 ) \. (__va_ali
b460: 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 gn_struct(LIST,T
b470: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
b480: 49 47 4e 29 09 09 09 09 5c 0a 20 20 20 28 28 54 IGN)....\. ((T
b490: 59 50 45 5f 53 49 5a 45 29 20 3e 20 73 69 7a 65 YPE_SIZE) > size
b4a0: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 26 26 20 of(__vaword) &&
b4b0: 28 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 4c 49 (((__vaword*)(LI
b4c0: 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 4c 49 53 ST)->aptr - (LIS
b4d0: 54 29 2d 3e 73 61 70 74 72 29 20 26 20 31 29 20 T)->saptr) & 1)
b4e0: 3f 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b ? (LIST)->aptr +
b4f0: 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 = sizeof(__vawor
b500: 64 29 20 3a 20 30 29 2c 20 5c 0a 20 20 20 5f 5f d) : 0), \. __
b510: 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 65 64 28 va_arg_adjusted(
b520: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
b530: 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a YPE_ALIGN)....\.
b540: 20 20 29 0a 23 65 6e 64 69 66 0a 0a 0a 2f 2a 0a ).#endif.../*.
b550: 20 2a 20 44 65 66 69 6e 69 74 69 6f 6e 20 6f 66 * Definition of
b560: 20 74 68 65 20 76 61 5f 72 65 74 75 72 6e 5f 78 the va_return_x
b570: 78 78 20 6d 61 63 72 6f 73 2e 0a 20 2a 2f 0a 23 xx macros.. */.#
b580: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 74 75 define __va_retu
b590: 72 6e 28 4c 49 53 54 2c 52 45 54 54 59 50 45 29 rn(LIST,RETTYPE)
b5a0: 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 29 2d 3e \. (((LIST)->
b5b0: 72 74 79 70 65 20 3d 3d 20 28 52 45 54 54 59 50 rtype == (RETTYP
b5c0: 45 29 29 20 7c 7c 20 5f 5f 76 61 5f 65 72 72 6f E)) || __va_erro
b5d0: 72 31 28 28 4c 49 53 54 29 2d 3e 72 74 79 70 65 r1((LIST)->rtype
b5e0: 2c 52 45 54 54 59 50 45 29 29 0a 23 64 65 66 69 ,RETTYPE)).#defi
b5f0: 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 76 6f 69 ne va_return_voi
b600: 64 28 4c 49 53 54 29 20 20 5c 0a 20 20 5f 5f 76 d(LIST) \. __v
b610: 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f a_return(LIST,__
b620: 56 41 76 6f 69 64 29 0a 23 64 65 66 69 6e 65 20 VAvoid).#define
b630: 76 61 5f 72 65 74 75 72 6e 5f 63 68 61 72 28 4c va_return_char(L
b640: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
b650: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
b660: 5f 5f 56 41 63 68 61 72 29 2c 20 28 4c 49 53 54 __VAchar), (LIST
b670: 29 2d 3e 74 6d 70 2e 5f 63 68 61 72 20 3d 20 28 )->tmp._char = (
b680: 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 VAL)).#define va
b690: 5f 72 65 74 75 72 6e 5f 73 63 68 61 72 28 4c 49 _return_schar(LI
b6a0: 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f ST,VAL) \. (__
b6b0: 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f va_return(LIST,_
b6c0: 5f 56 41 73 63 68 61 72 29 2c 20 28 4c 49 53 54 _VAschar), (LIST
b6d0: 29 2d 3e 74 6d 70 2e 5f 73 63 68 61 72 20 3d 20 )->tmp._schar =
b6e0: 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 (VAL)).#define v
b6f0: 61 5f 72 65 74 75 72 6e 5f 75 63 68 61 72 28 4c a_return_uchar(L
b700: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
b710: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
b720: 5f 5f 56 41 75 63 68 61 72 29 2c 20 28 4c 49 53 __VAuchar), (LIS
b730: 54 29 2d 3e 74 6d 70 2e 5f 75 63 68 61 72 20 3d T)->tmp._uchar =
b740: 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 (VAL)).#define
b750: 76 61 5f 72 65 74 75 72 6e 5f 73 68 6f 72 74 28 va_return_short(
b760: 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 LIST,VAL) \. (
b770: 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 __va_return(LIST
b780: 2c 5f 5f 56 41 73 68 6f 72 74 29 2c 20 28 4c 49 ,__VAshort), (LI
b790: 53 54 29 2d 3e 74 6d 70 2e 5f 73 68 6f 72 74 20 ST)->tmp._short
b7a0: 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 = (VAL)).#define
b7b0: 20 76 61 5f 72 65 74 75 72 6e 5f 75 73 68 6f 72 va_return_ushor
b7c0: 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 t(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 75 73 68 6f 72 74 29 2c 20 ST,__VAushort),
b7f0: 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 75 73 68 (LIST)->tmp._ush
b800: 6f 72 74 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 ort = (VAL)).#de
b810: 66 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 69 fine va_return_i
b820: 6e 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a nt(LIST,VAL) \.
b830: 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c (__va_return(L
b840: 49 53 54 2c 5f 5f 56 41 69 6e 74 29 2c 20 28 4c IST,__VAint), (L
b850: 49 53 54 29 2d 3e 74 6d 70 2e 5f 69 6e 74 20 3d IST)->tmp._int =
b860: 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 (VAL)).#define
b870: 76 61 5f 72 65 74 75 72 6e 5f 75 69 6e 74 28 4c va_return_uint(L
b880: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
b890: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
b8a0: 5f 5f 56 41 75 69 6e 74 29 2c 20 28 4c 49 53 54 __VAuint), (LIST
b8b0: 29 2d 3e 74 6d 70 2e 5f 75 69 6e 74 20 3d 20 28 )->tmp._uint = (
b8c0: 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 VAL)).#define va
b8d0: 5f 72 65 74 75 72 6e 5f 6c 6f 6e 67 28 4c 49 53 _return_long(LIS
b8e0: 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 T,VAL) \. (__v
b8f0: 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f a_return(LIST,__
b900: 56 41 6c 6f 6e 67 29 2c 20 28 4c 49 53 54 29 2d VAlong), (LIST)-
b910: 3e 74 6d 70 2e 5f 6c 6f 6e 67 20 3d 20 28 56 41 >tmp._long = (VA
b920: 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 L)).#define va_r
b930: 65 74 75 72 6e 5f 75 6c 6f 6e 67 28 4c 49 53 54 eturn_ulong(LIST
b940: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
b950: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
b960: 41 75 6c 6f 6e 67 29 2c 20 28 4c 49 53 54 29 2d Aulong), (LIST)-
b970: 3e 74 6d 70 2e 5f 75 6c 6f 6e 67 20 3d 20 28 56 >tmp._ulong = (V
b980: 41 4c 29 29 0a 23 69 66 20 64 65 66 69 6e 65 64 AL)).#if defined
b990: 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 (__mips64__) ||
b9a0: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
b9b0: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
b9c0: 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 __alpha__) || de
b9d0: 66 69 6e 65 64 28 5f 5f 70 6f 77 65 72 70 63 36 fined(__powerpc6
b9e0: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
b9f0: 5f 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 __ia64__) || def
ba00: 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 ined(__x86_64__)
ba10: 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 .#define va_retu
ba20: 72 6e 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 rn_longlong(LIST
ba30: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
ba40: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
ba50: 41 6c 6f 6e 67 6c 6f 6e 67 29 2c 20 28 4c 49 53 Alonglong), (LIS
ba60: 54 29 2d 3e 74 6d 70 2e 5f 6c 6f 6e 67 20 3d 20 T)->tmp._long =
ba70: 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 (VAL)).#define v
ba80: 61 5f 72 65 74 75 72 6e 5f 75 6c 6f 6e 67 6c 6f a_return_ulonglo
ba90: 6e 67 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a ng(LIST,VAL) \.
baa0: 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c (__va_return(L
bab0: 49 53 54 2c 5f 5f 56 41 75 6c 6f 6e 67 6c 6f 6e IST,__VAulonglon
bac0: 67 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e g), (LIST)->tmp.
bad0: 5f 75 6c 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a _ulong = (VAL)).
bae0: 23 65 6c 73 65 0a 23 64 65 66 69 6e 65 20 76 61 #else.#define va
baf0: 5f 72 65 74 75 72 6e 5f 6c 6f 6e 67 6c 6f 6e 67 _return_longlong
bb00: 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 (LIST,VAL) \.
bb10: 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 (__va_return(LIS
bb20: 54 2c 5f 5f 56 41 6c 6f 6e 67 6c 6f 6e 67 29 2c T,__VAlonglong),
bb30: 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 6c 6f (LIST)->tmp._lo
bb40: 6e 67 6c 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a nglong = (VAL)).
bb50: 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 #define va_retur
bb60: 6e 5f 75 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 n_ulonglong(LIST
bb70: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
bb80: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
bb90: 41 75 6c 6f 6e 67 6c 6f 6e 67 29 2c 20 28 4c 49 Aulonglong), (LI
bba0: 53 54 29 2d 3e 74 6d 70 2e 5f 75 6c 6f 6e 67 6c ST)->tmp._ulongl
bbb0: 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a 23 65 6e ong = (VAL)).#en
bbc0: 64 69 66 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 dif.#define va_r
bbd0: 65 74 75 72 6e 5f 66 6c 6f 61 74 28 4c 49 53 54 eturn_float(LIST
bbe0: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
bbf0: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
bc00: 41 66 6c 6f 61 74 29 2c 20 28 4c 49 53 54 29 2d Afloat), (LIST)-
bc10: 3e 74 6d 70 2e 5f 66 6c 6f 61 74 20 3d 20 28 56 >tmp._float = (V
bc20: 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f AL)).#define va_
bc30: 72 65 74 75 72 6e 5f 64 6f 75 62 6c 65 28 4c 49 return_double(LI
bc40: 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f ST,VAL) \. (__
bc50: 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f va_return(LIST,_
bc60: 5f 56 41 64 6f 75 62 6c 65 29 2c 20 28 4c 49 53 _VAdouble), (LIS
bc70: 54 29 2d 3e 74 6d 70 2e 5f 64 6f 75 62 6c 65 20 T)->tmp._double
bc80: 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 = (VAL)).#define
bc90: 20 76 61 5f 72 65 74 75 72 6e 5f 70 74 72 28 4c va_return_ptr(L
bca0: 49 53 54 2c 54 59 50 45 2c 56 41 4c 29 20 20 5c IST,TYPE,VAL) \
bcb0: 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 . (__va_return(
bcc0: 4c 49 53 54 2c 5f 5f 56 41 76 6f 69 64 70 29 2c LIST,__VAvoidp),
bcd0: 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 70 74 (LIST)->tmp._pt
bce0: 72 20 3d 20 28 76 6f 69 64 2a 29 28 54 59 50 45 r = (void*)(TYPE
bcf0: 29 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 )(VAL)).#define
bd00: 76 61 5f 72 65 74 75 72 6e 5f 73 74 72 75 63 74 va_return_struct
bd10: 28 4c 49 53 54 2c 54 59 50 45 2c 56 41 4c 29 20 (LIST,TYPE,VAL)
bd20: 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 \. (__va_retur
bd30: 6e 28 4c 49 53 54 2c 5f 5f 56 41 73 74 72 75 63 n(LIST,__VAstruc
bd40: 74 29 2c 20 2a 28 54 59 50 45 2a 29 28 28 4c 49 t), *(TYPE*)((LI
bd50: 53 54 29 2d 3e 72 61 64 64 72 29 20 3d 20 28 56 ST)->raddr) = (V
bd60: 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 5f 76 61 AL)).#define _va
bd70: 5f 72 65 74 75 72 6e 5f 73 74 72 75 63 74 28 4c _return_struct(L
bd80: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
bd90: 50 45 5f 41 4c 49 47 4e 2c 56 41 4c 5f 41 44 44 PE_ALIGN,VAL_ADD
bda0: 52 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 R) \. (__va_re
bdb0: 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 73 74 turn(LIST,__VAst
bdc0: 72 75 63 74 29 2c 09 09 09 09 09 5c 0a 20 20 20 ruct),.....\.
bdd0: 5f 5f 73 74 72 75 63 74 63 70 79 28 28 76 6f 69 __structcpy((voi
bde0: 64 2a 29 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 d*)((LIST)->radd
bdf0: 72 29 2c 56 41 4c 5f 41 44 44 52 2c 54 59 50 45 r),VAL_ADDR,TYPE
be00: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
be10: 29 09 5c 0a 20 20 29 0a 0a 0a 2f 2a 20 44 65 74 ).\. ).../* Det
be20: 65 72 6d 69 6e 65 20 77 68 65 74 68 65 72 20 61 ermine whether a
be30: 20 73 74 72 75 63 74 20 74 79 70 65 20 69 73 20 struct type is
be40: 77 6f 72 64 2d 73 70 6c 69 74 74 61 62 6c 65 2c word-splittable,
be50: 20 69 2e 65 2e 20 77 68 65 74 68 65 72 20 65 61 i.e. whether ea
be60: 63 68 20 6f 66 0a 20 2a 20 69 74 73 20 63 6f 6d ch of. * its com
be70: 70 6f 6e 65 6e 74 73 20 66 69 74 20 69 6e 74 6f ponents fit into
be80: 20 61 20 72 65 67 69 73 74 65 72 2e 0a 20 2a 20 a register.. *
be90: 54 68 65 20 65 6e 74 69 72 65 20 63 6f 6d 70 75 The entire compu
bea0: 74 61 74 69 6f 6e 20 69 73 20 64 6f 6e 65 20 61 tation is done a
beb0: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 0a t compile time..
bec0: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 77 */.#define va_w
bed0: 6f 72 64 5f 73 70 6c 69 74 74 61 62 6c 65 5f 31 ord_splittable_1
bee0: 28 73 6c 6f 74 31 29 20 20 5c 0a 20 20 28 5f 5f (slot1) \. (__
bef0: 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 va_offset1(slot1
bf00: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
bf10: 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 d) == (__va_offs
bf20: 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 7a 65 6f et1(slot1)+sizeo
bf30: 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 69 7a 65 f(slot1)-1)/size
bf40: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 0a 23 64 of(__vaword)).#d
bf50: 65 66 69 6e 65 20 76 61 5f 77 6f 72 64 5f 73 70 efine va_word_sp
bf60: 6c 69 74 74 61 62 6c 65 5f 32 28 73 6c 6f 74 31 littable_2(slot1
bf70: 2c 73 6c 6f 74 32 29 20 20 5c 0a 20 20 28 28 5f ,slot2) \. ((_
bf80: 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 _va_offset1(slot
bf90: 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 1)/sizeof(__vawo
bfa0: 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 rd) == (__va_off
bfb0: 73 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 7a 65 set1(slot1)+size
bfc0: 6f 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 69 7a of(slot1)-1)/siz
bfd0: 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c eof(__vaword)) \
bfe0: 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 66 . && (__va_off
bff0: 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 set2(slot1,slot2
c000: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
c010: 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 d) == (__va_offs
c020: 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 et2(slot1,slot2)
c030: 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2d 31 +sizeof(slot2)-1
c040: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
c050: 64 29 29 20 5c 0a 20 20 29 0a 23 64 65 66 69 6e d)) \. ).#defin
c060: 65 20 76 61 5f 77 6f 72 64 5f 73 70 6c 69 74 74 e va_word_splitt
c070: 61 62 6c 65 5f 33 28 73 6c 6f 74 31 2c 73 6c 6f able_3(slot1,slo
c080: 74 32 2c 73 6c 6f 74 33 29 20 20 5c 0a 20 20 28 t2,slot3) \. (
c090: 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c (__va_offset1(sl
c0a0: 6f 74 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 ot1)/sizeof(__va
c0b0: 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f word) == (__va_o
c0c0: 66 66 73 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 ffset1(slot1)+si
c0d0: 7a 65 6f 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 zeof(slot1)-1)/s
c0e0: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 izeof(__vaword))
c0f0: 20 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f \. && (__va_o
c100: 66 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f ffset2(slot1,slo
c110: 74 32 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 t2)/sizeof(__vaw
c120: 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 ord) == (__va_of
c130: 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 fset2(slot1,slot
c140: 32 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2)+sizeof(slot2)
c150: 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 -1)/sizeof(__vaw
c160: 6f 72 64 29 29 20 5c 0a 20 20 20 26 26 20 28 5f ord)) \. && (_
c170: 5f 76 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 _va_offset3(slot
c180: 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 2f 73 1,slot2,slot3)/s
c190: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 izeof(__vaword)
c1a0: 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 33 == (__va_offset3
c1b0: 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f (slot1,slot2,slo
c1c0: 74 33 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 33 t3)+sizeof(slot3
c1d0: 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 )-1)/sizeof(__va
c1e0: 77 6f 72 64 29 29 20 5c 0a 20 20 29 0a 23 64 65 word)) \. ).#de
c1f0: 66 69 6e 65 20 76 61 5f 77 6f 72 64 5f 73 70 6c fine va_word_spl
c200: 69 74 74 61 62 6c 65 5f 34 28 73 6c 6f 74 31 2c ittable_4(slot1,
c210: 73 6c 6f 74 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 slot2,slot3,slot
c220: 34 29 20 20 5c 0a 20 20 28 28 5f 5f 76 61 5f 6f 4) \. ((__va_o
c230: 66 66 73 65 74 31 28 73 6c 6f 74 31 29 2f 73 69 ffset1(slot1)/si
c240: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3d zeof(__vaword) =
c250: 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 = (__va_offset1(
c260: 73 6c 6f 74 31 29 2b 73 69 7a 65 6f 66 28 73 6c slot1)+sizeof(sl
c270: 6f 74 31 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f ot1)-1)/sizeof(_
c280: 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 20 20 26 _vaword)) \. &
c290: 26 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 32 28 & (__va_offset2(
c2a0: 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 2f 73 69 7a slot1,slot2)/siz
c2b0: 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3d 3d eof(__vaword) ==
c2c0: 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 32 28 73 (__va_offset2(s
c2d0: 6c 6f 74 31 2c 73 6c 6f 74 32 29 2b 73 69 7a 65 lot1,slot2)+size
c2e0: 6f 66 28 73 6c 6f 74 32 29 2d 31 29 2f 73 69 7a of(slot2)-1)/siz
c2f0: 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c eof(__vaword)) \
c300: 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 66 . && (__va_off
c310: 73 65 74 33 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 set3(slot1,slot2
c320: 2c 73 6c 6f 74 33 29 2f 73 69 7a 65 6f 66 28 5f ,slot3)/sizeof(_
c330: 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 _vaword) == (__v
c340: 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 31 2c a_offset3(slot1,
c350: 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 2b 73 69 7a slot2,slot3)+siz
c360: 65 6f 66 28 73 6c 6f 74 33 29 2d 31 29 2f 73 69 eof(slot3)-1)/si
c370: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 zeof(__vaword))
c380: 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 \. && (__va_of
c390: 66 73 65 74 34 28 73 6c 6f 74 31 2c 73 6c 6f 74 fset4(slot1,slot
c3a0: 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 34 29 2f 73 2,slot3,slot4)/s
c3b0: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 izeof(__vaword)
c3c0: 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 34 == (__va_offset4
c3d0: 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f (slot1,slot2,slo
c3e0: 74 33 2c 73 6c 6f 74 34 29 2b 73 69 7a 65 6f 66 t3,slot4)+sizeof
c3f0: 28 73 6c 6f 74 34 29 2d 31 29 2f 73 69 7a 65 6f (slot4)-1)/sizeo
c400: 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 f(__vaword)) \.
c410: 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f ).#define __va_
c420: 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 29 20 20 offset1(slot1)
c430: 5c 0a 20 20 30 0a 23 64 65 66 69 6e 65 20 5f 5f \. 0.#define __
c440: 76 61 5f 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 va_offset2(slot1
c450: 2c 73 6c 6f 74 32 29 20 20 5c 0a 20 20 28 28 5f ,slot2) \. ((_
c460: 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 _va_offset1(slot
c470: 31 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 31 29 1)+sizeof(slot1)
c480: 2b 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 73 6c +__VA_alignof(sl
c490: 6f 74 32 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 ot2)-1) & -(long
c4a0: 29 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 73 6c )__VA_alignof(sl
c4b0: 6f 74 32 29 29 0a 23 64 65 66 69 6e 65 20 5f 5f ot2)).#define __
c4c0: 76 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 31 va_offset3(slot1
c4d0: 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 20 20 5c ,slot2,slot3) \
c4e0: 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 65 74 . ((__va_offset
c4f0: 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 2b 73 2(slot1,slot2)+s
c500: 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2b 5f 5f 56 izeof(slot2)+__V
c510: 41 5f 61 6c 69 67 6e 6f 66 28 73 6c 6f 74 33 29 A_alignof(slot3)
c520: 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 5f 5f 56 -1) & -(long)__V
c530: 41 5f 61 6c 69 67 6e 6f 66 28 73 6c 6f 74 33 29 A_alignof(slot3)
c540: 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 6f ).#define __va_o
c550: 66 66 73 65 74 34 28 73 6c 6f 74 31 2c 73 6c 6f ffset4(slot1,slo
c560: 74 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 34 29 20 t2,slot3,slot4)
c570: 20 5c 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 \. ((__va_offs
c580: 65 74 33 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c et3(slot1,slot2,
c590: 73 6c 6f 74 33 29 2b 73 69 7a 65 6f 66 28 73 6c slot3)+sizeof(sl
c5a0: 6f 74 33 29 2b 5f 5f 56 41 5f 61 6c 69 67 6e 6f ot3)+__VA_aligno
c5b0: 66 28 73 6c 6f 74 34 29 2d 31 29 20 26 20 2d 28 f(slot4)-1) & -(
c5c0: 6c 6f 6e 67 29 5f 5f 56 41 5f 61 6c 69 67 6e 6f long)__VA_aligno
c5d0: 66 28 73 6c 6f 74 34 29 29 0a 0a 0a 2f 2a 0a 20 f(slot4)).../*.
c5e0: 2a 20 4d 69 73 63 65 6c 6c 61 6e 65 6f 75 73 20 * Miscellaneous
c5f0: 64 65 63 6c 61 72 61 74 69 6f 6e 73 2e 0a 20 2a declarations.. *
c600: 2f 0a 23 69 66 64 65 66 20 5f 5f 63 70 6c 75 73 /.#ifdef __cplus
c610: 70 6c 75 73 0a 65 78 74 65 72 6e 20 22 43 22 20 plus.extern "C"
c620: 76 6f 69 64 20 28 2a 76 61 63 61 6c 6c 29 20 28 void (*vacall) (
c630: 29 3b 20 2f 2a 20 74 68 65 20 72 65 74 75 72 6e ); /* the return
c640: 20 74 79 70 65 20 69 73 20 76 61 72 69 61 62 6c type is variabl
c650: 65 2c 20 6e 6f 74 20 76 6f 69 64 21 20 2a 2f 0a e, not void! */.
c660: 23 65 6c 73 65 0a 65 78 74 65 72 6e 20 76 6f 69 #else.extern voi
c670: 64 20 28 2a 76 61 63 61 6c 6c 29 20 28 29 3b 20 d (*vacall) ();
c680: 2f 2a 20 74 68 65 20 72 65 74 75 72 6e 20 74 79 /* the return ty
c690: 70 65 20 69 73 20 76 61 72 69 61 62 6c 65 2c 20 pe is variable,
c6a0: 6e 6f 74 20 76 6f 69 64 21 20 2a 2f 0a 23 65 6e not void! */.#en
c6b0: 64 69 66 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 dif.extern void
c6c0: 28 2a 20 76 61 63 61 6c 6c 5f 66 75 6e 63 74 69 (* vacall_functi
c6d0: 6f 6e 29 20 28 76 61 5f 61 6c 69 73 74 29 3b 0a on) (va_alist);.
c6e0: 65 78 74 65 72 6e 20 69 6e 74 20 5f 5f 76 61 5f extern int __va_
c6f0: 65 72 72 6f 72 31 20 28 65 6e 75 6d 20 5f 5f 56 error1 (enum __V
c700: 41 74 79 70 65 2c 20 65 6e 75 6d 20 5f 5f 56 41 Atype, enum __VA
c710: 74 79 70 65 29 3b 0a 65 78 74 65 72 6e 20 69 6e type);.extern in
c720: 74 20 5f 5f 76 61 5f 65 72 72 6f 72 32 20 28 75 t __va_error2 (u
c730: 6e 73 69 67 6e 65 64 20 69 6e 74 29 3b 0a 65 78 nsigned int);.ex
c740: 74 65 72 6e 20 76 6f 69 64 20 5f 5f 73 74 72 75 tern void __stru
c750: 63 74 63 70 79 20 28 76 6f 69 64 2a 20 64 65 73 ctcpy (void* des
c760: 74 2c 20 63 6f 6e 73 74 20 76 6f 69 64 2a 20 73 t, const void* s
c770: 72 63 2c 20 75 6e 73 69 67 6e 65 64 20 6c 6f 6e rc, unsigned lon
c780: 67 20 73 69 7a 65 2c 20 75 6e 73 69 67 6e 65 64 g size, unsigned
c790: 20 6c 6f 6e 67 20 61 6c 69 67 6e 6d 65 6e 74 29 long alignment)
c7a0: 3b 0a 74 79 70 65 64 65 66 20 75 6e 69 6f 6e 20 ;.typedef union
c7b0: 7b 20 5f 5f 76 61 77 6f 72 64 20 72 6f 6f 6d 5b { __vaword room[
c7c0: 5f 5f 56 41 5f 41 4c 49 53 54 5f 57 4f 52 44 53 __VA_ALIST_WORDS
c7d0: 5d 3b 20 64 6f 75 62 6c 65 20 61 6c 69 67 6e 3b ]; double align;
c7e0: 20 7d 20 5f 5f 76 61 5f 73 74 72 75 63 74 5f 62 } __va_struct_b
c7f0: 75 66 66 65 72 5f 74 3b 0a 65 78 74 65 72 6e 20 uffer_t;.extern
c800: 5f 5f 76 61 5f 73 74 72 75 63 74 5f 62 75 66 66 __va_struct_buff
c810: 65 72 5f 74 20 5f 5f 76 61 5f 73 74 72 75 63 74 er_t __va_struct
c820: 5f 62 75 66 66 65 72 3b 0a 0a 0a 23 65 6e 64 69 _buffer;...#endi
c830: 66 20 2f 2a 20 5f 56 41 43 41 4c 4c 5f 48 20 2a f /* _VACALL_H *
c840: 2f 0a /.