0000: 23 69 66 6e 64 65 66 20 5f 56 41 43 41 4c 4c 5f #ifndef _VACALL_
0010: 52 5f 48 20 20 20 20 20 20 20 20 20 20 20 20 20 R_H
0020: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0030: 2f 2a 2d 2a 2d 20 43 20 2d 2a 2d 2a 2f 0a 23 64 /*-*- C -*-*/.#d
0040: 65 66 69 6e 65 20 5f 56 41 43 41 4c 4c 5f 52 5f efine _VACALL_R_
0050: 48 0a 0a 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 H../*. * Copyrig
0060: 68 74 20 31 39 39 35 2d 32 30 30 34 20 42 72 75 ht 1995-2004 Bru
0070: 6e 6f 20 48 61 69 62 6c 65 2c 20 3c 62 72 75 6e no Haible, <brun
0080: 6f 40 63 6c 69 73 70 2e 6f 72 67 3e 0a 20 2a 0a o@clisp.org>. *.
0090: 20 2a 20 54 68 69 73 20 69 73 20 66 72 65 65 20 * This is free
00a0: 73 6f 66 74 77 61 72 65 20 64 69 73 74 72 69 62 software distrib
00b0: 75 74 65 64 20 75 6e 64 65 72 20 74 68 65 20 47 uted under the G
00c0: 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 NU General Publi
00d0: 63 20 4c 69 63 65 6e 63 65 0a 20 2a 20 64 65 73 c Licence. * des
00e0: 63 72 69 62 65 64 20 69 6e 20 74 68 65 20 66 69 cribed in the fi
00f0: 6c 65 20 43 4f 50 59 49 4e 47 2e 20 43 6f 6e 74 le COPYING. Cont
0100: 61 63 74 20 74 68 65 20 61 75 74 68 6f 72 20 69 act the author i
0110: 66 20 79 6f 75 20 64 6f 6e 27 74 20 68 61 76 65 f you don't have
0120: 20 74 68 69 73 0a 20 2a 20 6f 72 20 63 61 6e 27 this. * or can'
0130: 74 20 6c 69 76 65 20 77 69 74 68 20 69 74 2e 20 t live with it.
0140: 54 68 65 72 65 20 69 73 20 41 42 53 4f 4c 55 54 There is ABSOLUT
0150: 45 4c 59 20 4e 4f 20 57 41 52 52 41 4e 54 59 2c ELY NO WARRANTY,
0160: 20 65 78 70 6c 69 63 69 74 20 6f 72 20 69 6d 70 explicit or imp
0170: 6c 69 65 64 2c 0a 20 2a 20 6f 6e 20 74 68 69 73 lied,. * on this
0180: 20 73 6f 66 74 77 61 72 65 2e 0a 20 2a 2f 0a 0a software.. */..
0190: 0a 2f 2a 20 54 68 65 73 65 20 64 65 66 69 6e 69 ./* These defini
01a0: 74 69 6f 6e 73 20 61 72 65 20 61 64 6a 75 73 74 tions are adjust
01b0: 65 64 20 62 79 20 60 63 6f 6e 66 69 67 75 72 65 ed by `configure
01c0: 27 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 2e ' automatically.
01d0: 20 2a 2f 0a 0a 2f 2a 20 43 50 55 20 2a 2f 0a 23 */../* CPU */.#
01e0: 69 66 6e 64 65 66 20 5f 5f 69 33 38 36 5f 5f 0a ifndef __i386__.
01f0: 23 64 65 66 69 6e 65 20 5f 5f 69 33 38 36 5f 5f #define __i386__
0200: 20 31 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 1.#endif.#ifnde
0210: 66 20 5f 5f 6d 36 38 6b 5f 5f 0a 23 75 6e 64 65 f __m68k__.#unde
0220: 66 20 5f 5f 6d 36 38 6b 5f 5f 0a 23 65 6e 64 69 f __m68k__.#endi
0230: 66 0a 23 69 66 6e 64 65 66 20 5f 5f 6d 69 70 73 f.#ifndef __mips
0240: 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 69 70 73 __.#undef __mips
0250: 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 __.#endif.#ifnde
0260: 66 20 5f 5f 6d 69 70 73 6e 33 32 5f 5f 0a 23 75 f __mipsn32__.#u
0270: 6e 64 65 66 20 5f 5f 6d 69 70 73 6e 33 32 5f 5f ndef __mipsn32__
0280: 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 .#endif.#ifndef
0290: 5f 5f 6d 69 70 73 36 34 5f 5f 0a 23 75 6e 64 65 __mips64__.#unde
02a0: 66 20 5f 5f 6d 69 70 73 36 34 5f 5f 0a 23 65 6e f __mips64__.#en
02b0: 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 73 70 dif.#ifndef __sp
02c0: 61 72 63 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 73 arc__.#undef __s
02d0: 70 61 72 63 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 parc__.#endif.#i
02e0: 66 6e 64 65 66 20 5f 5f 73 70 61 72 63 36 34 5f fndef __sparc64_
02f0: 5f 0a 23 75 6e 64 65 66 20 5f 5f 73 70 61 72 63 _.#undef __sparc
0300: 36 34 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64__.#endif.#ifn
0310: 64 65 66 20 5f 5f 61 6c 70 68 61 5f 5f 0a 23 75 def __alpha__.#u
0320: 6e 64 65 66 20 5f 5f 61 6c 70 68 61 5f 5f 0a 23 ndef __alpha__.#
0330: 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f endif.#ifndef __
0340: 68 70 70 61 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f hppa__.#undef __
0350: 68 70 70 61 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 hppa__.#endif.#i
0360: 66 6e 64 65 66 20 5f 5f 61 72 6d 5f 5f 0a 23 75 fndef __arm__.#u
0370: 6e 64 65 66 20 5f 5f 61 72 6d 5f 5f 0a 23 65 6e ndef __arm__.#en
0380: 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 72 73 dif.#ifndef __rs
0390: 36 30 30 30 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6000__.#undef __
03a0: 72 73 36 30 30 30 5f 5f 0a 23 65 6e 64 69 66 0a rs6000__.#endif.
03b0: 23 69 66 6e 64 65 66 20 5f 5f 73 33 39 30 5f 5f #ifndef __s390__
03c0: 0a 23 75 6e 64 65 66 20 5f 5f 73 33 39 30 5f 5f .#undef __s390__
03d0: 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 .#endif.#ifndef
03e0: 5f 5f 6d 38 38 6b 5f 5f 0a 23 75 6e 64 65 66 20 __m88k__.#undef
03f0: 5f 5f 6d 38 38 6b 5f 5f 0a 23 65 6e 64 69 66 0a __m88k__.#endif.
0400: 23 69 66 6e 64 65 66 20 5f 5f 63 6f 6e 76 65 78 #ifndef __convex
0410: 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 63 6f 6e 76 __.#undef __conv
0420: 65 78 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e ex__.#endif.#ifn
0430: 64 65 66 20 5f 5f 69 61 36 34 5f 5f 0a 23 75 6e def __ia64__.#un
0440: 64 65 66 20 5f 5f 69 61 36 34 5f 5f 0a 23 65 6e def __ia64__.#en
0450: 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 78 38 dif.#ifndef __x8
0460: 36 5f 36 34 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6_64__.#undef __
0470: 78 38 36 5f 36 34 5f 5f 0a 23 65 6e 64 69 66 0a x86_64__.#endif.
0480: 0a 2f 2a 20 43 61 6c 6c 69 6e 67 20 63 6f 6e 76 ./* Calling conv
0490: 65 6e 74 69 6f 6e 20 2a 2f 0a 2f 2a 20 44 65 66 ention */./* Def
04a0: 69 6e 65 20 69 66 20 75 73 69 6e 67 20 70 63 63 ine if using pcc
04b0: 20 6e 6f 6e 2d 72 65 65 6e 74 72 61 6e 74 20 73 non-reentrant s
04c0: 74 72 75 63 74 20 72 65 74 75 72 6e 20 63 6f 6e truct return con
04d0: 76 65 6e 74 69 6f 6e 20 2a 2f 0a 23 75 6e 64 65 vention */.#unde
04e0: 66 20 5f 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 f __PCC_STRUCT_R
04f0: 45 54 55 52 4e 5f 5f 0a 2f 2a 20 44 65 66 69 6e ETURN__./* Defin
0500: 65 20 69 66 20 73 6d 61 6c 6c 20 73 74 72 75 63 e if small struc
0510: 74 73 20 61 72 65 20 72 65 74 75 72 6e 65 64 20 ts are returned
0520: 69 6e 20 72 65 67 69 73 74 65 72 73 20 2a 2f 0a in registers */.
0530: 23 64 65 66 69 6e 65 20 5f 5f 53 4d 41 4c 4c 5f #define __SMALL_
0540: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 5f 5f 20 STRUCT_RETURN__
0550: 31 0a 2f 2a 20 44 65 66 69 6e 65 20 69 66 20 66 1./* Define if f
0560: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 20 72 65 loating-point re
0570: 73 75 6c 74 73 20 61 72 65 20 72 65 74 75 72 6e sults are return
0580: 65 64 20 69 6e 20 74 68 65 20 69 6e 74 65 67 65 ed in the intege
0590: 72 20 72 65 67 69 73 74 65 72 73 20 2a 2f 0a 23 r registers */.#
05a0: 75 6e 64 65 66 20 5f 5f 49 52 45 47 5f 46 4c 4f undef __IREG_FLO
05b0: 41 54 5f 52 45 54 55 52 4e 5f 5f 0a 0a 2f 2a 20 AT_RETURN__../*
05c0: 43 4c 5f 4c 4f 4e 47 4c 4f 4e 47 20 2a 2f 0a 2f CL_LONGLONG */./
05d0: 2a 20 44 65 66 69 6e 65 20 69 66 20 79 6f 75 72 * Define if your
05e0: 20 63 6f 6d 70 69 6c 65 72 20 73 75 70 70 6f 72 compiler suppor
05f0: 74 73 20 74 68 65 20 60 6c 6f 6e 67 20 6c 6f 6e ts the `long lon
0600: 67 27 20 74 79 70 65 2e 20 2a 2f 0a 23 69 66 6e g' type. */.#ifn
0610: 64 65 66 20 48 41 56 45 5f 4c 4f 4e 47 4c 4f 4e def HAVE_LONGLON
0620: 47 0a 23 75 6e 64 65 66 20 48 41 56 45 5f 4c 4f G.#undef HAVE_LO
0630: 4e 47 4c 4f 4e 47 0a 23 65 6e 64 69 66 0a 0a 2f NGLONG.#endif../
0640: 2a 20 41 43 5f 43 5f 43 48 41 52 5f 55 4e 53 49 * AC_C_CHAR_UNSI
0650: 47 4e 45 44 20 2a 2f 0a 23 69 66 6e 64 65 66 20 GNED */.#ifndef
0660: 5f 5f 43 48 41 52 5f 55 4e 53 49 47 4e 45 44 5f __CHAR_UNSIGNED_
0670: 5f 0a 23 75 6e 64 65 66 20 5f 5f 43 48 41 52 5f _.#undef __CHAR_
0680: 55 4e 53 49 47 4e 45 44 5f 5f 0a 23 65 6e 64 69 UNSIGNED__.#endi
0690: 66 0a 0a 2f 2a 20 45 6e 64 20 6f 66 20 64 65 66 f../* End of def
06a0: 69 6e 69 74 69 6f 6e 73 20 61 64 6a 75 73 74 65 initions adjuste
06b0: 64 20 62 79 20 60 63 6f 6e 66 69 67 75 72 65 27 d by `configure'
06c0: 2e 20 2a 2f 0a 0a 0a 2f 2a 20 4d 61 78 20 23 20 . */.../* Max #
06d0: 77 6f 72 64 73 20 69 6e 20 61 72 67 75 6d 65 6e words in argumen
06e0: 74 2d 6c 69 73 74 20 61 6e 64 20 74 65 6d 70 6f t-list and tempo
06f0: 72 61 72 79 20 73 74 72 75 63 74 75 72 65 20 73 rary structure s
0700: 74 6f 72 61 67 65 2e 0a 20 2a 2f 0a 23 69 66 6e torage.. */.#ifn
0710: 64 65 66 20 5f 5f 56 41 5f 41 4c 49 53 54 5f 57 def __VA_ALIST_W
0720: 4f 52 44 53 0a 23 64 65 66 69 6e 65 20 5f 5f 56 ORDS.#define __V
0730: 41 5f 41 4c 49 53 54 5f 57 4f 52 44 53 20 20 32 A_ALIST_WORDS 2
0740: 35 36 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 54 68 56.#endif../* Th
0750: 65 20 60 73 69 67 6e 65 64 27 20 6b 65 79 77 6f e `signed' keywo
0760: 72 64 2e 0a 20 2a 2f 0a 23 69 66 20 21 64 65 66 rd.. */.#if !def
0770: 69 6e 65 64 28 5f 5f 53 54 44 43 5f 5f 29 20 26 ined(__STDC__) &
0780: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 43 48 41 & !defined(__CHA
0790: 52 5f 55 4e 53 49 47 4e 45 44 5f 5f 29 20 26 26 R_UNSIGNED__) &&
07a0: 20 21 64 65 66 69 6e 65 64 28 73 69 67 6e 65 64 !defined(signed
07b0: 29 0a 23 64 65 66 69 6e 65 20 73 69 67 6e 65 64 ).#define signed
07c0: 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 44 65 74 65 .#endif../* Dete
07d0: 72 6d 69 6e 65 20 74 68 65 20 61 6c 69 67 6e 6d rmine the alignm
07e0: 65 6e 74 20 6f 66 20 61 20 74 79 70 65 20 61 74 ent of a type at
07f0: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 0a 20 compile time..
0800: 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f */.#if defined(_
0810: 5f 47 4e 55 43 5f 5f 29 0a 23 64 65 66 69 6e 65 _GNUC__).#define
0820: 20 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 20 5f 5f __VA_alignof __
0830: 61 6c 69 67 6e 6f 66 5f 5f 0a 23 65 6c 73 65 0a alignof__.#else.
0840: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
0850: 70 73 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 ps__) || defined
0860: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
0870: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
0880: 34 5f 5f 29 20 2f 2a 20 53 47 49 20 63 6f 6d 70 4__) /* SGI comp
0890: 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 20 iler */.#define
08a0: 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 20 5f 5f 62 __VA_alignof __b
08b0: 75 69 6c 74 69 6e 5f 61 6c 69 67 6e 6f 66 0a 23 uiltin_alignof.#
08c0: 65 6c 73 65 0a 23 64 65 66 69 6e 65 20 5f 5f 56 else.#define __V
08d0: 41 5f 6f 66 66 73 65 74 6f 66 28 74 79 70 65 2c A_offsetof(type,
08e0: 69 64 65 6e 74 29 20 20 28 28 75 6e 73 69 67 6e ident) ((unsign
08f0: 65 64 20 6c 6f 6e 67 29 26 28 28 28 74 79 70 65 ed long)&(((type
0900: 2a 29 30 29 2d 3e 69 64 65 6e 74 29 29 0a 23 64 *)0)->ident)).#d
0910: 65 66 69 6e 65 20 5f 5f 56 41 5f 61 6c 69 67 6e efine __VA_align
0920: 6f 66 28 74 79 70 65 29 20 20 5f 5f 56 41 5f 6f of(type) __VA_o
0930: 66 66 73 65 74 6f 66 28 73 74 72 75 63 74 20 7b ffsetof(struct {
0940: 20 63 68 61 72 20 5f 5f 73 6c 6f 74 31 3b 20 74 char __slot1; t
0950: 79 70 65 20 5f 5f 73 6c 6f 74 32 3b 20 7d 2c 20 ype __slot2; },
0960: 5f 5f 73 6c 6f 74 32 29 0a 23 65 6e 64 69 66 0a __slot2).#endif.
0970: 23 65 6e 64 69 66 0a 0a 2f 2a 20 43 20 62 75 69 #endif../* C bui
0980: 6c 74 69 6e 20 74 79 70 65 73 2e 0a 20 2a 2f 0a ltin types.. */.
0990: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
09a0: 70 73 6e 33 32 5f 5f 29 0a 74 79 70 65 64 65 66 psn32__).typedef
09b0: 20 6c 6f 6e 67 20 6c 6f 6e 67 20 5f 5f 76 61 77 long long __vaw
09c0: 6f 72 64 3b 0a 23 65 6c 73 65 0a 74 79 70 65 64 ord;.#else.typed
09d0: 65 66 20 6c 6f 6e 67 20 5f 5f 76 61 77 6f 72 64 ef long __vaword
09e0: 3b 0a 23 65 6e 64 69 66 0a 0a 65 6e 75 6d 20 5f ;.#endif..enum _
09f0: 5f 56 41 74 79 70 65 0a 7b 0a 20 20 5f 5f 56 41 _VAtype.{. __VA
0a00: 76 6f 69 64 2c 0a 20 20 5f 5f 56 41 63 68 61 72 void,. __VAchar
0a10: 2c 0a 20 20 5f 5f 56 41 73 63 68 61 72 2c 0a 20 ,. __VAschar,.
0a20: 20 5f 5f 56 41 75 63 68 61 72 2c 0a 20 20 5f 5f __VAuchar,. __
0a30: 56 41 73 68 6f 72 74 2c 0a 20 20 5f 5f 56 41 75 VAshort,. __VAu
0a40: 73 68 6f 72 74 2c 0a 20 20 5f 5f 56 41 69 6e 74 short,. __VAint
0a50: 2c 0a 20 20 5f 5f 56 41 75 69 6e 74 2c 0a 20 20 ,. __VAuint,.
0a60: 5f 5f 56 41 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 41 __VAlong,. __VA
0a70: 75 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 41 6c 6f 6e ulong,. __VAlon
0a80: 67 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 41 75 6c 6f glong,. __VAulo
0a90: 6e 67 6c 6f 6e 67 2c 0a 20 20 5f 5f 56 41 66 6c nglong,. __VAfl
0aa0: 6f 61 74 2c 0a 20 20 5f 5f 56 41 64 6f 75 62 6c oat,. __VAdoubl
0ab0: 65 2c 0a 20 20 5f 5f 56 41 76 6f 69 64 70 2c 0a e,. __VAvoidp,.
0ac0: 20 20 5f 5f 56 41 73 74 72 75 63 74 0a 7d 3b 0a __VAstruct.};.
0ad0: 0a 65 6e 75 6d 20 5f 5f 56 41 5f 61 6c 69 73 74 .enum __VA_alist
0ae0: 5f 66 6c 61 67 73 0a 7b 0a 0a 20 20 2f 2a 20 68 _flags.{.. /* h
0af0: 6f 77 20 74 6f 20 72 65 74 75 72 6e 20 73 74 72 ow to return str
0b00: 75 63 74 73 20 2a 2f 0a 20 20 2f 2a 20 54 68 65 ucts */. /* The
0b10: 72 65 20 61 72 65 20 62 61 73 69 63 61 6c 6c 79 re are basically
0b20: 20 33 20 77 61 79 73 20 74 6f 20 72 65 74 75 72 3 ways to retur
0b30: 6e 20 73 74 72 75 63 74 73 3a 0a 20 20 20 2a 20 n structs:. *
0b40: 61 2e 20 54 68 65 20 63 61 6c 6c 65 64 20 66 75 a. The called fu
0b50: 6e 63 74 69 6f 6e 20 72 65 74 75 72 6e 73 20 61 nction returns a
0b60: 20 70 6f 69 6e 74 65 72 20 74 6f 20 73 74 61 74 pointer to stat
0b70: 69 63 20 64 61 74 61 2e 20 4e 6f 74 20 72 65 65 ic data. Not ree
0b80: 6e 74 72 61 6e 74 2e 0a 20 20 20 2a 20 62 2e 20 ntrant.. * b.
0b90: 54 68 65 20 63 61 6c 6c 65 72 20 70 61 73 73 65 The caller passe
0ba0: 73 20 74 68 65 20 72 65 74 75 72 6e 20 73 74 72 s the return str
0bb0: 75 63 74 75 72 65 20 61 64 64 72 65 73 73 20 69 ucture address i
0bc0: 6e 20 61 20 64 65 64 69 63 61 74 65 64 20 72 65 n a dedicated re
0bd0: 67 69 73 74 65 72 0a 20 20 20 2a 20 20 20 20 6f gister. * o
0be0: 72 20 61 73 20 61 20 66 69 72 73 74 20 28 6f 72 r as a first (or
0bf0: 20 6c 61 73 74 29 2c 20 69 6e 76 69 73 69 62 6c last), invisibl
0c00: 65 20 61 72 67 75 6d 65 6e 74 2e 20 54 68 65 20 e argument. The
0c10: 63 61 6c 6c 65 64 20 66 75 6e 63 74 69 6f 6e 20 called function
0c20: 73 74 6f 72 65 73 0a 20 20 20 2a 20 20 20 20 69 stores. * i
0c30: 74 73 20 72 65 73 75 6c 74 20 74 68 65 72 65 2e ts result there.
0c40: 0a 20 20 20 2a 20 63 2e 20 4c 69 6b 65 20 62 2c . * c. Like b,
0c50: 20 61 6e 64 20 74 68 65 20 63 61 6c 6c 65 64 20 and the called
0c60: 66 75 6e 63 74 69 6f 6e 20 61 6c 73 6f 20 72 65 function also re
0c70: 74 75 72 6e 73 20 74 68 65 20 72 65 74 75 72 6e turns the return
0c80: 20 73 74 72 75 63 74 75 72 65 0a 20 20 20 2a 20 structure. *
0c90: 20 20 20 61 64 64 72 65 73 73 20 69 6e 20 74 68 address in th
0ca0: 65 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 72 e return value r
0cb0: 65 67 69 73 74 65 72 2e 20 28 54 68 69 73 20 69 egister. (This i
0cc0: 73 20 6e 6f 74 20 76 65 72 79 20 64 69 73 74 69 s not very disti
0cd0: 6e 67 75 69 73 68 61 62 6c 65 0a 20 20 20 2a 20 nguishable. *
0ce0: 20 20 20 66 72 6f 6d 20 62 2e 29 0a 20 20 20 2a from b.). *
0cf0: 20 49 6e 64 65 70 65 6e 64 65 6e 74 6c 79 20 6f Independently o
0d00: 66 20 74 68 69 73 2c 0a 20 20 20 2a 20 72 2e 20 f this,. * r.
0d10: 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 small structures
0d20: 20 28 3c 3d 20 34 20 6f 72 20 3c 3d 20 38 20 62 (<= 4 or <= 8 b
0d30: 79 74 65 73 29 20 6d 61 79 20 62 65 20 72 65 74 ytes) may be ret
0d40: 75 72 6e 65 64 20 69 6e 20 74 68 65 20 72 65 74 urned in the ret
0d50: 75 72 6e 0a 20 20 20 2a 20 20 20 20 76 61 6c 75 urn. * valu
0d60: 65 20 72 65 67 69 73 74 65 72 28 73 29 2c 20 6f e register(s), o
0d70: 72 0a 20 20 20 2a 20 6d 2e 20 65 76 65 6e 20 73 r. * m. even s
0d80: 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 mall structures
0d90: 61 72 65 20 70 61 73 73 65 64 20 69 6e 20 6d 65 are passed in me
0da0: 6d 6f 72 79 2e 0a 20 20 20 2a 2f 0a 20 20 2f 2a mory.. */. /*
0db0: 20 67 63 63 2d 32 2e 36 2e 33 20 65 6d 70 6c 6f gcc-2.6.3 emplo
0dc0: 79 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 ys the following
0dd0: 20 73 74 72 61 74 65 67 79 3a 0a 20 20 20 2a 20 strategy:. *
0de0: 20 20 2d 20 49 66 20 50 43 43 5f 53 54 41 54 49 - If PCC_STATI
0df0: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 C_STRUCT_RETURN
0e00: 69 73 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 is defined in th
0e10: 65 20 6d 61 63 68 69 6e 65 20 64 65 73 63 72 69 e machine descri
0e20: 70 74 69 6f 6e 0a 20 20 20 2a 20 20 20 20 20 69 ption. * i
0e30: 74 20 75 73 65 73 20 6d 65 74 68 6f 64 20 61 2c t uses method a,
0e40: 20 65 6c 73 65 20 6d 65 74 68 6f 64 20 63 2e 0a else method c..
0e50: 20 20 20 2a 20 20 20 2d 20 49 66 20 66 6c 61 67 * - If flag
0e60: 5f 70 63 63 5f 73 74 72 75 63 74 5f 72 65 74 75 _pcc_struct_retu
0e70: 72 6e 20 69 73 20 73 65 74 20 28 65 69 74 68 65 rn is set (eithe
0e80: 72 20 62 79 20 2d 66 70 63 63 2d 73 74 72 75 63 r by -fpcc-struc
0e90: 74 2d 72 65 74 75 72 6e 20 6f 72 20 69 66 0a 20 t-return or if.
0ea0: 20 20 2a 20 20 20 20 20 44 45 46 41 55 4c 54 5f * DEFAULT_
0eb0: 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 PCC_STRUCT_RETUR
0ec0: 4e 20 69 73 20 64 65 66 69 6e 65 64 20 74 6f 20 N is defined to
0ed0: 31 20 69 6e 20 74 68 65 20 6d 61 63 68 69 6e 65 1 in the machine
0ee0: 20 64 65 73 63 72 69 70 74 69 6f 6e 29 0a 20 20 description).
0ef0: 20 2a 20 20 20 20 20 69 74 20 75 73 65 73 20 6d * it uses m
0f00: 65 74 68 6f 64 20 6d 2c 20 65 6c 73 65 20 28 65 ethod m, else (e
0f10: 69 74 68 65 72 20 62 79 20 2d 66 72 65 67 2d 73 ither by -freg-s
0f20: 74 72 75 63 74 2d 72 65 74 75 72 6e 20 6f 72 20 truct-return or
0f30: 69 66 0a 20 20 20 2a 20 20 20 20 20 44 45 46 41 if. * DEFA
0f40: 55 4c 54 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 ULT_PCC_STRUCT_R
0f50: 45 54 55 52 4e 20 69 73 20 64 65 66 69 6e 65 64 ETURN is defined
0f60: 20 74 6f 20 30 20 69 6e 20 74 68 65 20 6d 61 63 to 0 in the mac
0f70: 68 69 6e 65 20 64 65 73 63 72 69 70 74 69 6f 6e hine description
0f80: 29 0a 20 20 20 2a 20 20 20 20 20 6d 65 74 68 6f ). * metho
0f90: 64 20 72 2e 0a 20 20 20 2a 2f 0a 20 20 5f 5f 56 d r.. */. __V
0fa0: 41 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 A_PCC_STRUCT_RET
0fb0: 55 52 4e 09 3d 20 31 3c 3c 30 2c 09 2f 2a 20 61 URN.= 1<<0,./* a
0fc0: 3a 20 6e 65 65 64 20 74 6f 20 63 6f 70 79 20 74 : need to copy t
0fd0: 68 65 20 73 74 72 75 63 74 20 2a 2f 0a 20 20 5f he struct */. _
0fe0: 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 _VA_SMALL_STRUCT
0ff0: 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 31 2c 09 _RETURN.= 1<<1,.
1000: 2f 2a 20 72 3a 20 73 70 65 63 69 61 6c 20 63 61 /* r: special ca
1010: 73 65 20 66 6f 72 20 73 6d 61 6c 6c 20 73 74 72 se for small str
1020: 75 63 74 73 20 2a 2f 0a 20 20 5f 5f 56 41 5f 47 ucts */. __VA_G
1030: 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e CC_STRUCT_RETURN
1040: 09 3d 20 31 3c 3c 32 2c 09 2f 2a 20 63 6f 6e 73 .= 1<<2,./* cons
1050: 69 64 65 72 20 38 20 62 79 74 65 20 73 74 72 75 ider 8 byte stru
1060: 63 74 73 20 61 73 20 73 6d 61 6c 6c 20 2a 2f 0a cts as small */.
1070: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 #if defined(__sp
1080: 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e arc__) && !defin
1090: 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a ed(__sparc64__).
10a0: 20 20 5f 5f 56 41 5f 53 55 4e 43 43 5f 53 54 52 __VA_SUNCC_STR
10b0: 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c UCT_RETURN.= 1<<
10c0: 33 2c 0a 20 20 5f 5f 56 41 5f 53 55 4e 50 52 4f 3,. __VA_SUNPRO
10d0: 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e CC_STRUCT_RETURN
10e0: 09 3d 20 31 3c 3c 34 2c 0a 23 65 6c 73 65 0a 20 .= 1<<4,.#else.
10f0: 20 5f 5f 56 41 5f 53 55 4e 43 43 5f 53 54 52 55 __VA_SUNCC_STRU
1100: 43 54 5f 52 45 54 55 52 4e 09 3d 20 30 2c 0a 20 CT_RETURN.= 0,.
1110: 20 5f 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 __VA_SUNPROCC_S
1120: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 30 TRUCT_RETURN.= 0
1130: 2c 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ,.#endif.#if def
1140: 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 0a 20 ined(__i386__).
1150: 20 5f 5f 56 41 5f 4e 45 58 54 47 43 43 5f 53 54 __VA_NEXTGCC_ST
1160: 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c RUCT_RETURN.= 1<
1170: 3c 33 2c 0a 20 20 5f 5f 56 41 5f 4d 53 56 43 5f <3,. __VA_MSVC_
1180: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 STRUCT_RETURN.=
1190: 31 3c 3c 34 2c 0a 23 65 6e 64 69 66 0a 23 69 66 1<<4,.#endif.#if
11a0: 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f defined(__hppa_
11b0: 5f 29 0a 20 20 5f 5f 56 41 5f 4f 4c 44 47 43 43 _). __VA_OLDGCC
11c0: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d _STRUCT_RETURN.=
11d0: 20 31 3c 3c 33 2c 0a 23 65 6e 64 69 66 0a 20 20 1<<3,.#endif.
11e0: 2f 2a 20 74 68 65 20 64 65 66 61 75 6c 74 20 77 /* the default w
11f0: 61 79 20 74 6f 20 72 65 74 75 72 6e 20 73 74 72 ay to return str
1200: 75 63 74 73 20 2a 2f 0a 20 20 2f 2a 20 54 68 69 ucts */. /* Thi
1210: 73 20 63 68 6f 69 63 65 20 68 65 72 65 20 69 73 s choice here is
1220: 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 61 73 based on the as
1230: 73 75 6d 70 74 69 6f 6e 20 74 68 61 74 20 74 68 sumption that th
1240: 65 20 66 75 6e 63 74 69 6f 6e 20 79 6f 75 20 61 e function you a
1250: 72 65 0a 20 20 20 2a 20 67 6f 69 6e 67 20 74 6f re. * going to
1260: 20 63 61 6c 6c 20 68 61 73 20 62 65 65 6e 20 63 call has been c
1270: 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 74 68 65 ompiled with the
1280: 20 73 61 6d 65 20 63 6f 6d 70 69 6c 65 72 20 79 same compiler y
1290: 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 6f 0a ou are using to.
12a0: 20 20 20 2a 20 69 6e 63 6c 75 64 65 20 74 68 69 * include thi
12b0: 73 20 66 69 6c 65 2e 0a 20 20 20 2a 20 49 66 20 s file.. * If
12c0: 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 61 6c 6c you want to call
12d0: 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 74 68 20 functions with
12e0: 61 6e 6f 74 68 65 72 20 73 74 72 75 63 74 20 72 another struct r
12f0: 65 74 75 72 6e 69 6e 67 20 63 6f 6e 76 65 6e 74 eturning convent
1300: 69 6f 6e 2c 0a 20 20 20 2a 20 6a 75 73 74 20 20 ion,. * just
1310: 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f 53 54 52 #define __VA_STR
1320: 55 43 54 5f 52 45 54 55 52 4e 20 2e 2e 2e 0a 20 UCT_RETURN ....
1330: 20 20 2a 20 62 65 66 6f 72 65 20 6f 72 20 61 66 * before or af
1340: 74 65 72 20 23 69 6e 63 6c 75 64 69 6e 67 20 3c ter #including <
1350: 76 61 63 61 6c 6c 5f 72 2e 68 3e 2e 0a 20 20 20 vacall_r.h>..
1360: 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 56 41 5f */.#ifndef __VA_
1370: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 0a 20 20 STRUCT_RETURN.
1380: 5f 5f 56 41 5f 53 54 52 55 43 54 5f 52 45 54 55 __VA_STRUCT_RETU
1390: 52 4e 09 09 3d 0a 23 69 66 20 64 65 66 69 6e 65 RN..=.#if define
13a0: 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 d(__sparc__) &&
13b0: 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 !defined(__sparc
13c0: 36 34 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 64__) && defined
13d0: 28 73 75 6e 29 20 26 26 20 64 65 66 69 6e 65 64 (sun) && defined
13e0: 28 5f 5f 53 55 4e 50 52 4f 5f 43 29 20 2f 2a 20 (__SUNPRO_C) /*
13f0: 53 55 4e 57 73 70 72 6f 20 63 63 20 2a 2f 0a 09 SUNWspro cc */..
1400: 09 09 09 20 20 5f 5f 56 41 5f 53 55 4e 50 52 4f ... __VA_SUNPRO
1410: 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e CC_STRUCT_RETURN
1420: 2c 0a 23 65 6c 73 65 0a 23 69 66 20 64 65 66 69 ,.#else.#if defi
1430: 6e 65 64 28 5f 5f 50 43 43 5f 53 54 52 55 43 54 ned(__PCC_STRUCT
1440: 5f 52 45 54 55 52 4e 5f 5f 29 20 2f 2a 20 64 65 _RETURN__) /* de
1450: 66 69 6e 65 64 20 74 68 72 6f 75 67 68 20 63 6f fined through co
1460: 6e 66 69 67 75 72 65 2c 20 73 65 65 20 61 62 6f nfigure, see abo
1470: 76 65 20 2a 2f 0a 09 09 09 09 20 20 5f 5f 56 41 ve */..... __VA
1480: 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 _PCC_STRUCT_RETU
1490: 52 4e 20 7c 0a 23 69 66 20 64 65 66 69 6e 65 64 RN |.#if defined
14a0: 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 (__sparc__) && !
14b0: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
14c0: 34 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 4__) && defined(
14d0: 73 75 6e 29 20 26 26 20 21 28 64 65 66 69 6e 65 sun) && !(define
14e0: 64 28 5f 5f 53 54 44 43 5f 5f 29 20 7c 7c 20 64 d(__STDC__) || d
14f0: 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 efined(__GNUC__)
1500: 29 20 2f 2a 20 73 75 6e 20 63 63 20 2a 2f 0a 20 ) /* sun cc */.
1510: 20 09 09 09 09 20 20 5f 5f 56 41 5f 53 55 4e 43 .... __VA_SUNC
1520: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 2c C_STRUCT_RETURN,
1530: 0a 23 65 6c 73 65 0a 20 20 09 09 09 09 20 20 30 .#else. .... 0
1540: 2c 0a 23 65 6e 64 69 66 0a 23 65 6c 73 65 0a 23 ,.#endif.#else.#
1550: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 53 4d 41 if defined(__SMA
1560: 4c 4c 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e LL_STRUCT_RETURN
1570: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
1580: 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 _mipsn32__) || d
1590: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f efined(__mips64_
15a0: 5f 29 20 2f 2a 20 64 65 66 69 6e 65 64 20 74 68 _) /* defined th
15b0: 72 6f 75 67 68 20 63 6f 6e 66 69 67 75 72 65 2c rough configure,
15c0: 20 73 65 65 20 61 62 6f 76 65 20 2a 2f 0a 09 09 see above */...
15d0: 09 09 20 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 .. __VA_SMALL_S
15e0: 54 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 0a 23 TRUCT_RETURN |.#
15f0: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
1600: 64 28 5f 5f 47 4e 55 43 5f 5f 29 0a 09 09 09 09 d(__GNUC__).....
1610: 20 20 5f 5f 56 41 5f 47 43 43 5f 53 54 52 55 43 __VA_GCC_STRUC
1620: 54 5f 52 45 54 55 52 4e 20 7c 0a 23 65 6e 64 69 T_RETURN |.#endi
1630: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
1640: 69 33 38 36 5f 5f 29 20 26 26 20 64 65 66 69 6e i386__) && defin
1650: 65 64 28 4e 65 58 54 29 20 26 26 20 64 65 66 69 ed(NeXT) && defi
1660: 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 2f 2a ned(__GNUC__) /*
1670: 20 4e 65 58 54 20 67 63 63 2d 32 2e 35 2e 38 20 NeXT gcc-2.5.8
1680: 2a 2f 0a 09 09 09 09 20 20 5f 5f 56 41 5f 4e 45 */..... __VA_NE
1690: 58 54 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 XTGCC_STRUCT_RET
16a0: 55 52 4e 20 7c 0a 23 65 6e 64 69 66 0a 23 69 66 URN |.#endif.#if
16b0: 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f defined(__i386_
16c0: 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f 4d _) && defined(_M
16d0: 53 43 5f 56 45 52 29 20 2f 2a 20 4d 53 56 43 20 SC_VER) /* MSVC
16e0: 34 2e 30 20 2a 2f 0a 09 09 09 09 20 20 5f 5f 56 4.0 */..... __V
16f0: 41 5f 4d 53 56 43 5f 53 54 52 55 43 54 5f 52 45 A_MSVC_STRUCT_RE
1700: 54 55 52 4e 20 7c 0a 23 65 6e 64 69 66 0a 23 69 TURN |.#endif.#i
1710: 66 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 f defined(__hppa
1720: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
1730: 5f 47 4e 55 43 5f 5f 29 20 26 26 20 28 5f 5f 47 _GNUC__) && (__G
1740: 4e 55 43 5f 5f 20 3c 20 33 29 20 26 26 20 28 5f NUC__ < 3) && (_
1750: 5f 47 4e 55 43 5f 4d 49 4e 4f 52 5f 5f 20 3c 20 _GNUC_MINOR__ <
1760: 37 29 0a 09 09 09 09 20 20 5f 5f 56 41 5f 4f 4c 7)..... __VA_OL
1770: 44 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 DGCC_STRUCT_RETU
1780: 52 4e 20 7c 0a 23 65 6e 64 69 66 0a 20 20 09 09 RN |.#endif. ..
1790: 09 09 20 20 30 2c 0a 23 65 6e 64 69 66 0a 23 65 .. 0,.#endif.#e
17a0: 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0a 20 20 2f ndif.#endif.. /
17b0: 2a 20 68 6f 77 20 74 6f 20 72 65 74 75 72 6e 20 * how to return
17c0: 66 6c 6f 61 74 73 20 2a 2f 0a 23 69 66 20 64 65 floats */.#if de
17d0: 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 fined(__m68k__)
17e0: 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 || (defined(__sp
17f0: 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e arc__) && !defin
1800: 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 ed(__sparc64__))
1810: 0a 20 20 5f 5f 56 41 5f 53 55 4e 43 43 5f 46 4c . __VA_SUNCC_FL
1820: 4f 41 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c OAT_RETURN.= 1<<
1830: 35 2c 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 5,.#endif.#if de
1840: 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 0a fined(__m68k__).
1850: 20 20 5f 5f 56 41 5f 46 52 45 47 5f 46 4c 4f 41 __VA_FREG_FLOA
1860: 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 36 2c T_RETURN.= 1<<6,
1870: 0a 23 65 6e 64 69 66 0a 20 20 2f 2a 20 74 68 65 .#endif. /* the
1880: 20 64 65 66 61 75 6c 74 20 77 61 79 20 74 6f 20 default way to
1890: 72 65 74 75 72 6e 20 66 6c 6f 61 74 73 20 2a 2f return floats */
18a0: 0a 20 20 2f 2a 20 54 68 69 73 20 63 68 6f 69 63 . /* This choic
18b0: 65 20 68 65 72 65 20 69 73 20 62 61 73 65 64 20 e here is based
18c0: 6f 6e 20 74 68 65 20 61 73 73 75 6d 70 74 69 6f on the assumptio
18d0: 6e 20 74 68 61 74 20 74 68 65 20 66 75 6e 63 74 n that the funct
18e0: 69 6f 6e 20 79 6f 75 20 61 72 65 0a 20 20 20 2a ion you are. *
18f0: 20 67 6f 69 6e 67 20 74 6f 20 63 61 6c 6c 20 68 going to call h
1900: 61 73 20 62 65 65 6e 20 63 6f 6d 70 69 6c 65 64 as been compiled
1910: 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 20 63 with the same c
1920: 6f 6d 70 69 6c 65 72 20 79 6f 75 20 61 72 65 20 ompiler you are
1930: 75 73 69 6e 67 20 74 6f 0a 20 20 20 2a 20 69 6e using to. * in
1940: 63 6c 75 64 65 20 74 68 69 73 20 66 69 6c 65 2e clude this file.
1950: 0a 20 20 20 2a 20 49 66 20 79 6f 75 20 77 61 6e . * If you wan
1960: 74 20 74 6f 20 63 61 6c 6c 20 66 75 6e 63 74 69 t to call functi
1970: 6f 6e 73 20 77 69 74 68 20 61 6e 6f 74 68 65 72 ons with another
1980: 20 66 6c 6f 61 74 20 72 65 74 75 72 6e 69 6e 67 float returning
1990: 20 63 6f 6e 76 65 6e 74 69 6f 6e 2c 0a 20 20 20 convention,.
19a0: 2a 20 6a 75 73 74 20 20 23 64 65 66 69 6e 65 20 * just #define
19b0: 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 45 54 55 52 __VA_FLOAT_RETUR
19c0: 4e 20 2e 2e 2e 0a 20 20 20 2a 20 62 65 66 6f 72 N .... * befor
19d0: 65 20 6f 72 20 61 66 74 65 72 20 23 69 6e 63 6c e or after #incl
19e0: 75 64 69 6e 67 20 3c 76 61 63 61 6c 6c 5f 72 2e uding <vacall_r.
19f0: 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 6e 64 65 h>.. */.#ifnde
1a00: 66 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 45 54 f __VA_FLOAT_RET
1a10: 55 52 4e 0a 23 69 66 20 28 64 65 66 69 6e 65 64 URN.#if (defined
1a20: 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 (__m68k__) || (d
1a30: 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f efined(__sparc__
1a40: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
1a50: 73 70 61 72 63 36 34 5f 5f 29 29 29 20 26 26 20 sparc64__))) &&
1a60: 21 64 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f !defined(__GNUC_
1a70: 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 73 75 _) && defined(su
1a80: 6e 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f n) && !defined(_
1a90: 5f 53 55 4e 50 52 4f 5f 43 29 20 20 2f 2a 20 73 _SUNPRO_C) /* s
1aa0: 75 6e 20 63 63 20 2a 2f 0a 20 20 5f 5f 56 41 5f un cc */. __VA_
1ab0: 46 4c 4f 41 54 5f 52 45 54 55 52 4e 09 09 3d 20 FLOAT_RETURN..=
1ac0: 5f 5f 56 41 5f 53 55 4e 43 43 5f 46 4c 4f 41 54 __VA_SUNCC_FLOAT
1ad0: 5f 52 45 54 55 52 4e 2c 0a 23 65 6c 69 66 20 28 _RETURN,.#elif (
1ae0: 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f defined(__m68k__
1af0: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
1b00: 49 52 45 47 5f 46 4c 4f 41 54 5f 52 45 54 55 52 IREG_FLOAT_RETUR
1b10: 4e 5f 5f 29 29 0a 20 20 5f 5f 56 41 5f 46 4c 4f N__)). __VA_FLO
1b20: 41 54 5f 52 45 54 55 52 4e 09 09 3d 20 5f 5f 56 AT_RETURN..= __V
1b30: 41 5f 46 52 45 47 5f 46 4c 4f 41 54 5f 52 45 54 A_FREG_FLOAT_RET
1b40: 55 52 4e 2c 0a 23 65 6c 73 65 0a 20 20 5f 5f 56 URN,.#else. __V
1b50: 41 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 09 09 A_FLOAT_RETURN..
1b60: 3d 20 30 2c 0a 23 65 6e 64 69 66 0a 23 65 6e 64 = 0,.#endif.#end
1b70: 69 66 0a 0a 20 20 2f 2a 20 68 6f 77 20 74 6f 20 if.. /* how to
1b80: 70 61 73 73 20 73 74 72 75 63 74 73 20 2a 2f 0a pass structs */.
1b90: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
1ba0: 70 73 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 ps__) || defined
1bb0: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
1bc0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
1bd0: 34 5f 5f 29 0a 20 20 5f 5f 56 41 5f 53 47 49 43 4__). __VA_SGIC
1be0: 43 5f 53 54 52 55 43 54 5f 41 52 47 53 09 3d 20 C_STRUCT_ARGS.=
1bf0: 31 3c 3c 37 2c 0a 23 65 6e 64 69 66 0a 23 69 66 1<<7,.#endif.#if
1c00: 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 30 30 defined(__rs600
1c10: 30 5f 5f 29 0a 20 20 5f 5f 56 41 5f 41 49 58 43 0__). __VA_AIXC
1c20: 43 5f 53 54 52 55 43 54 5f 41 52 47 53 09 3d 20 C_STRUCT_ARGS.=
1c30: 31 3c 3c 37 2c 0a 23 65 6e 64 69 66 0a 20 20 2f 1<<7,.#endif. /
1c40: 2a 20 74 68 65 20 64 65 66 61 75 6c 74 20 77 61 * the default wa
1c50: 79 20 74 6f 20 70 61 73 73 20 66 6c 6f 61 74 73 y to pass floats
1c60: 20 2a 2f 0a 20 20 2f 2a 20 54 68 69 73 20 63 68 */. /* This ch
1c70: 6f 69 63 65 20 68 65 72 65 20 69 73 20 62 61 73 oice here is bas
1c80: 65 64 20 6f 6e 20 74 68 65 20 61 73 73 75 6d 70 ed on the assump
1c90: 74 69 6f 6e 20 74 68 61 74 20 74 68 65 20 66 75 tion that the fu
1ca0: 6e 63 74 69 6f 6e 20 79 6f 75 20 61 72 65 0a 20 nction you are.
1cb0: 20 20 2a 20 67 6f 69 6e 67 20 74 6f 20 63 61 6c * going to cal
1cc0: 6c 20 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 69 l has been compi
1cd0: 6c 65 64 20 77 69 74 68 20 74 68 65 20 73 61 6d led with the sam
1ce0: 65 20 63 6f 6d 70 69 6c 65 72 20 79 6f 75 20 61 e compiler you a
1cf0: 72 65 20 75 73 69 6e 67 20 74 6f 0a 20 20 20 2a re using to. *
1d00: 20 69 6e 63 6c 75 64 65 20 74 68 69 73 20 66 69 include this fi
1d10: 6c 65 2e 0a 20 20 20 2a 20 49 66 20 79 6f 75 20 le.. * If you
1d20: 77 61 6e 74 20 74 6f 20 63 61 6c 6c 20 66 75 6e want to call fun
1d30: 63 74 69 6f 6e 73 20 77 69 74 68 20 61 6e 6f 74 ctions with anot
1d40: 68 65 72 20 66 6c 6f 61 74 20 70 61 73 73 69 6e her float passin
1d50: 67 20 63 6f 6e 76 65 6e 74 69 6f 6e 2c 0a 20 20 g convention,.
1d60: 20 2a 20 6a 75 73 74 20 20 23 64 65 66 69 6e 65 * just #define
1d70: 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 52 47 __VA_STRUCT_ARG
1d80: 53 20 2e 2e 2e 0a 20 20 20 2a 20 62 65 66 6f 72 S .... * befor
1d90: 65 20 6f 72 20 61 66 74 65 72 20 23 69 6e 63 6c e or after #incl
1da0: 75 64 69 6e 67 20 3c 76 61 63 61 6c 6c 5f 72 2e uding <vacall_r.
1db0: 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 6e 64 65 h>.. */.#ifnde
1dc0: 66 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 52 f __VA_STRUCT_AR
1dd0: 47 53 0a 23 69 66 20 28 64 65 66 69 6e 65 64 28 GS.#if (defined(
1de0: 5f 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 64 65 66 __mips__) || def
1df0: 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f ined(__mipsn32__
1e00: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d ) || defined(__m
1e10: 69 70 73 36 34 5f 5f 29 29 20 26 26 20 21 64 65 ips64__)) && !de
1e20: 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 fined(__GNUC__)
1e30: 2f 2a 20 53 47 49 20 6d 69 70 73 20 63 63 20 2a /* SGI mips cc *
1e40: 2f 0a 20 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f /. __VA_STRUCT_
1e50: 41 52 47 53 09 09 3d 20 5f 5f 56 41 5f 53 47 49 ARGS..= __VA_SGI
1e60: 43 43 5f 53 54 52 55 43 54 5f 41 52 47 53 2c 0a CC_STRUCT_ARGS,.
1e70: 23 65 6c 73 65 0a 23 69 66 20 64 65 66 69 6e 65 #else.#if define
1e80: 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 20 26 26 d(__rs6000__) &&
1e90: 20 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 26 defined(_AIX) &
1ea0: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 47 4e 55 & !defined(__GNU
1eb0: 43 5f 5f 29 20 2f 2a 20 41 49 58 20 63 63 2c 20 C__) /* AIX cc,
1ec0: 78 6c 63 20 2a 2f 0a 20 20 5f 5f 56 41 5f 53 54 xlc */. __VA_ST
1ed0: 52 55 43 54 5f 41 52 47 53 09 09 3d 20 5f 5f 56 RUCT_ARGS..= __V
1ee0: 41 5f 41 49 58 43 43 5f 53 54 52 55 43 54 5f 41 A_AIXCC_STRUCT_A
1ef0: 52 47 53 2c 0a 23 65 6c 73 65 0a 20 20 5f 5f 56 RGS,.#else. __V
1f00: 41 5f 53 54 52 55 43 54 5f 41 52 47 53 09 09 3d A_STRUCT_ARGS..=
1f10: 20 30 2c 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 0,.#endif.#endi
1f20: 66 0a 23 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 68 f.#endif.. /* h
1f30: 6f 77 20 74 6f 20 70 61 73 73 20 66 6c 6f 61 74 ow to pass float
1f40: 73 20 2a 2f 0a 20 20 2f 2a 20 41 4e 53 49 20 43 s */. /* ANSI C
1f50: 20 63 6f 6d 70 69 6c 65 72 73 20 61 6e 64 20 47 compilers and G
1f60: 4e 55 20 67 63 63 20 70 61 73 73 20 66 6c 6f 61 NU gcc pass floa
1f70: 74 73 20 61 73 20 66 6c 6f 61 74 73 2e 0a 20 20 ts as floats..
1f80: 20 2a 20 4b 26 52 20 43 20 63 6f 6d 70 69 6c 65 * K&R C compile
1f90: 72 73 20 70 61 73 73 20 66 6c 6f 61 74 73 20 61 rs pass floats a
1fa0: 73 20 64 6f 75 62 6c 65 73 2e 0a 20 20 20 2a 20 s doubles.. *
1fb0: 28 45 78 63 65 70 74 20 73 6f 6d 65 20 63 6f 6d (Except some com
1fc0: 70 69 6c 65 72 73 20 6c 69 6b 65 20 53 47 49 20 pilers like SGI
1fd0: 4d 49 50 53 20 22 63 63 22 20 61 6e 64 20 22 63 MIPS "cc" and "c
1fe0: 63 20 2d 63 63 6b 72 22 20 69 66 20 61 20 70 72 c -cckr" if a pr
1ff0: 6f 74 6f 74 79 70 65 20 69 73 0a 20 20 20 2a 20 ototype is. *
2000: 6b 6e 6f 77 6e 20 66 6f 72 20 74 68 65 20 63 61 known for the ca
2010: 6c 6c 65 64 20 66 75 6e 63 74 69 6f 6e 73 2e 20 lled functions.
2020: 42 75 74 20 74 6f 20 63 6f 6d 70 69 6c 65 20 61 But to compile a
2030: 20 70 72 6f 67 72 61 6d 20 77 69 74 68 20 70 72 program with pr
2040: 6f 74 6f 74 79 70 65 73 2c 0a 20 20 20 2a 20 22 ototypes,. * "
2050: 63 63 20 2d 61 6e 73 69 22 20 69 73 20 62 65 74 cc -ansi" is bet
2060: 74 65 72 20 61 6e 79 77 61 79 2e 0a 20 20 20 2a ter anyway.. *
2070: 2f 0a 20 20 5f 5f 56 41 5f 41 4e 53 49 5f 46 4c /. __VA_ANSI_FL
2080: 4f 41 54 5f 41 52 47 53 09 09 3d 20 30 2c 20 20 OAT_ARGS..= 0,
2090: 20 20 2f 2a 20 70 61 73 73 20 66 6c 6f 61 74 73 /* pass floats
20a0: 20 61 73 20 66 6c 6f 61 74 73 20 2a 2f 0a 20 20 as floats */.
20b0: 5f 5f 56 41 5f 54 52 41 44 49 54 49 4f 4e 41 4c __VA_TRADITIONAL
20c0: 5f 46 4c 4f 41 54 5f 41 52 47 53 09 3d 20 31 3c _FLOAT_ARGS.= 1<
20d0: 3c 38 2c 20 2f 2a 20 70 61 73 73 20 66 6c 6f 61 <8, /* pass floa
20e0: 74 73 20 61 73 20 64 6f 75 62 6c 65 73 20 2a 2f ts as doubles */
20f0: 0a 20 20 2f 2a 20 74 68 65 20 64 65 66 61 75 6c . /* the defaul
2100: 74 20 77 61 79 20 74 6f 20 70 61 73 73 20 66 6c t way to pass fl
2110: 6f 61 74 73 20 2a 2f 0a 20 20 2f 2a 20 54 68 69 oats */. /* Thi
2120: 73 20 63 68 6f 69 63 65 20 68 65 72 65 20 69 73 s choice here is
2130: 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 61 73 based on the as
2140: 73 75 6d 70 74 69 6f 6e 20 74 68 61 74 20 74 68 sumption that th
2150: 65 20 66 75 6e 63 74 69 6f 6e 20 79 6f 75 20 61 e function you a
2160: 72 65 0a 20 20 20 2a 20 67 6f 69 6e 67 20 74 6f re. * going to
2170: 20 63 61 6c 6c 20 68 61 73 20 62 65 65 6e 20 63 call has been c
2180: 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 74 68 65 ompiled with the
2190: 20 73 61 6d 65 20 63 6f 6d 70 69 6c 65 72 20 79 same compiler y
21a0: 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 6f 0a ou are using to.
21b0: 20 20 20 2a 20 69 6e 63 6c 75 64 65 20 74 68 69 * include thi
21c0: 73 20 66 69 6c 65 2e 0a 20 20 20 2a 20 49 66 20 s file.. * If
21d0: 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 61 6c 6c you want to call
21e0: 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 74 68 20 functions with
21f0: 61 6e 6f 74 68 65 72 20 66 6c 6f 61 74 20 70 61 another float pa
2200: 73 73 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e ssing convention
2210: 2c 0a 20 20 20 2a 20 6a 75 73 74 20 20 23 64 65 ,. * just #de
2220: 66 69 6e 65 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f fine __VA_FLOAT_
2230: 41 52 47 53 20 2e 2e 2e 0a 20 20 20 2a 20 62 65 ARGS .... * be
2240: 66 6f 72 65 20 6f 72 20 61 66 74 65 72 20 23 69 fore or after #i
2250: 6e 63 6c 75 64 69 6e 67 20 3c 76 61 63 61 6c 6c ncluding <vacall
2260: 5f 72 2e 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 _r.h>.. */.#if
2270: 6e 64 65 66 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f ndef __VA_FLOAT_
2280: 41 52 47 53 0a 23 69 66 20 64 65 66 69 6e 65 64 ARGS.#if defined
2290: 28 5f 5f 53 54 44 43 5f 5f 29 20 7c 7c 20 64 65 (__STDC__) || de
22a0: 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 fined(__GNUC__)
22b0: 2f 2a 20 77 68 61 74 20 61 62 6f 75 74 20 68 70 /* what about hp
22c0: 70 61 20 22 63 63 20 2d 41 61 22 20 3f 3f 20 2a pa "cc -Aa" ?? *
22d0: 2f 0a 20 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 41 /. __VA_FLOAT_A
22e0: 52 47 53 09 09 3d 20 5f 5f 56 41 5f 41 4e 53 49 RGS..= __VA_ANSI
22f0: 5f 46 4c 4f 41 54 5f 41 52 47 53 2c 0a 23 65 6c _FLOAT_ARGS,.#el
2300: 73 65 0a 20 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f se. __VA_FLOAT_
2310: 41 52 47 53 09 09 3d 20 5f 5f 56 41 5f 54 52 41 ARGS..= __VA_TRA
2320: 44 49 54 49 4f 4e 41 4c 5f 46 4c 4f 41 54 5f 41 DITIONAL_FLOAT_A
2330: 52 47 53 2c 0a 23 65 6e 64 69 66 0a 23 65 6e 64 RGS,.#endif.#end
2340: 69 66 0a 0a 20 20 2f 2a 20 68 6f 77 20 74 6f 20 if.. /* how to
2350: 70 61 73 73 20 61 6e 64 20 72 65 74 75 72 6e 20 pass and return
2360: 73 6d 61 6c 6c 20 69 6e 74 65 67 65 72 20 61 72 small integer ar
2370: 67 75 6d 65 6e 74 73 20 2a 2f 0a 20 20 5f 5f 56 guments */. __V
2380: 41 5f 41 4e 53 49 5f 49 4e 54 45 47 45 52 53 09 A_ANSI_INTEGERS.
2390: 09 3d 20 30 2c 20 2f 2a 20 6e 6f 20 70 72 6f 6d .= 0, /* no prom
23a0: 6f 74 69 6f 6e 73 20 2a 2f 0a 20 20 5f 5f 56 41 otions */. __VA
23b0: 5f 54 52 41 44 49 54 49 4f 4e 41 4c 5f 49 4e 54 _TRADITIONAL_INT
23c0: 45 47 45 52 53 09 3d 20 30 2c 20 2f 2a 20 70 72 EGERS.= 0, /* pr
23d0: 6f 6d 6f 74 65 20 5b 75 5d 63 68 61 72 2c 20 5b omote [u]char, [
23e0: 75 5d 73 68 6f 72 74 20 74 6f 20 5b 75 5d 69 6e u]short to [u]in
23f0: 74 20 2a 2f 0a 20 20 2f 2a 20 46 6f 72 74 75 6e t */. /* Fortun
2400: 61 74 65 6c 79 20 74 68 65 73 65 20 74 77 6f 20 ately these two
2410: 6d 65 74 68 6f 64 73 20 61 72 65 20 63 6f 6d 70 methods are comp
2420: 61 74 69 62 6c 65 2e 20 4f 75 72 20 6d 61 63 72 atible. Our macr
2430: 6f 73 20 77 6f 72 6b 20 77 69 74 68 20 62 6f 74 os work with bot
2440: 68 2e 20 2a 2f 0a 20 20 2f 2a 20 74 68 65 20 64 h. */. /* the d
2450: 65 66 61 75 6c 74 20 77 61 79 20 74 6f 20 70 61 efault way to pa
2460: 73 73 20 61 6e 64 20 72 65 74 75 72 6e 20 73 6d ss and return sm
2470: 61 6c 6c 20 69 6e 74 65 67 65 72 20 61 72 67 75 all integer argu
2480: 6d 65 6e 74 73 20 2a 2f 0a 20 20 2f 2a 20 54 68 ments */. /* Th
2490: 69 73 20 63 68 6f 69 63 65 20 68 65 72 65 20 69 is choice here i
24a0: 73 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 61 s based on the a
24b0: 73 73 75 6d 70 74 69 6f 6e 20 74 68 61 74 20 74 ssumption that t
24c0: 68 65 20 66 75 6e 63 74 69 6f 6e 20 79 6f 75 20 he function you
24d0: 61 72 65 0a 20 20 20 2a 20 67 6f 69 6e 67 20 74 are. * going t
24e0: 6f 20 63 61 6c 6c 20 68 61 73 20 62 65 65 6e 20 o call has been
24f0: 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 74 68 compiled with th
2500: 65 20 73 61 6d 65 20 63 6f 6d 70 69 6c 65 72 20 e same compiler
2510: 79 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 6f you are using to
2520: 0a 20 20 20 2a 20 69 6e 63 6c 75 64 65 20 74 68 . * include th
2530: 69 73 20 66 69 6c 65 2e 0a 20 20 20 2a 20 49 66 is file.. * If
2540: 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 61 6c you want to cal
2550: 6c 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 74 68 l functions with
2560: 20 61 6e 6f 74 68 65 72 20 66 6c 6f 61 74 20 70 another float p
2570: 61 73 73 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f assing conventio
2580: 6e 2c 0a 20 20 20 2a 20 6a 75 73 74 20 20 23 64 n,. * just #d
2590: 65 66 69 6e 65 20 5f 5f 56 41 5f 49 4e 54 45 47 efine __VA_INTEG
25a0: 45 52 53 20 2e 2e 2e 0a 20 20 20 2a 20 62 65 66 ERS .... * bef
25b0: 6f 72 65 20 6f 72 20 61 66 74 65 72 20 23 69 6e ore or after #in
25c0: 63 6c 75 64 69 6e 67 20 3c 76 61 63 61 6c 6c 5f cluding <vacall_
25d0: 72 2e 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 6e r.h>.. */.#ifn
25e0: 64 65 66 20 5f 5f 56 41 5f 49 4e 54 45 47 45 52 def __VA_INTEGER
25f0: 53 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f S.#if defined(__
2600: 53 54 44 43 5f 5f 29 20 7c 7c 20 64 65 66 69 6e STDC__) || defin
2610: 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 0a 20 20 5f ed(__GNUC__). _
2620: 5f 56 41 5f 49 4e 54 45 47 45 52 53 09 09 09 3d _VA_INTEGERS...=
2630: 20 5f 5f 56 41 5f 41 4e 53 49 5f 49 4e 54 45 47 __VA_ANSI_INTEG
2640: 45 52 53 2c 0a 23 65 6c 73 65 0a 20 20 5f 5f 56 ERS,.#else. __V
2650: 41 5f 49 4e 54 45 47 45 52 53 09 09 09 3d 20 5f A_INTEGERS...= _
2660: 5f 56 41 5f 54 52 41 44 49 54 49 4f 4e 41 4c 5f _VA_TRADITIONAL_
2670: 49 4e 54 45 47 45 52 53 2c 0a 23 65 6e 64 69 66 INTEGERS,.#endif
2680: 0a 23 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 73 74 .#endif.. /* st
2690: 61 63 6b 20 63 6c 65 61 6e 75 70 20 70 6f 6c 69 ack cleanup poli
26a0: 63 79 20 2a 2f 0a 20 20 5f 5f 56 41 5f 43 44 45 cy */. __VA_CDE
26b0: 43 4c 5f 43 4c 45 41 4e 55 50 09 09 3d 20 30 2c CL_CLEANUP..= 0,
26c0: 20 2f 2a 20 63 61 6c 6c 65 72 20 70 6f 70 73 20 /* caller pops
26d0: 61 72 67 73 20 61 66 74 65 72 20 72 65 74 75 72 args after retur
26e0: 6e 20 2a 2f 0a 20 20 5f 5f 56 41 5f 53 54 44 43 n */. __VA_STDC
26f0: 41 4c 4c 5f 43 4c 45 41 4e 55 50 09 09 3d 20 31 ALL_CLEANUP..= 1
2700: 3c 3c 39 2c 20 2f 2a 20 63 61 6c 6c 65 65 20 70 <<9, /* callee p
2710: 6f 70 73 20 61 72 67 73 20 62 65 66 6f 72 65 20 ops args before
2720: 72 65 74 75 72 6e 20 2a 2f 0a 09 09 09 09 20 20 return */.....
2730: 20 20 20 2f 2a 20 63 75 72 72 65 6e 74 6c 79 20 /* currently
2740: 6f 6e 6c 79 20 73 75 70 70 6f 72 74 65 64 20 6f only supported o
2750: 6e 20 5f 5f 69 33 38 36 5f 5f 20 2a 2f 0a 23 69 n __i386__ */.#i
2760: 66 6e 64 65 66 20 5f 5f 56 41 5f 43 4c 45 41 4e fndef __VA_CLEAN
2770: 55 50 0a 20 20 5f 5f 56 41 5f 43 4c 45 41 4e 55 UP. __VA_CLEANU
2780: 50 09 09 09 3d 20 5f 5f 56 41 5f 43 44 45 43 4c P...= __VA_CDECL
2790: 5f 43 4c 45 41 4e 55 50 2c 0a 23 65 6e 64 69 66 _CLEANUP,.#endif
27a0: 0a 0a 20 20 2f 2a 20 54 68 65 73 65 20 61 72 65 .. /* These are
27b0: 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 20 75 73 for internal us
27c0: 65 20 6f 6e 6c 79 20 2a 2f 0a 23 69 66 20 64 65 e only */.#if de
27d0: 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 fined(__i386__)
27e0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 || defined(__m68
27f0: 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 k__) || defined(
2800: 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 __mipsn32__) ||
2810: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 defined(__mips64
2820: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
2830: 5f 73 70 61 72 63 36 34 5f 5f 29 20 7c 7c 20 64 _sparc64__) || d
2840: 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 5f 5f efined(__alpha__
2850: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 ) || defined(__a
2860: 72 6d 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 rm__) || defined
2870: 28 5f 5f 72 73 36 30 30 30 5f 5f 29 20 7c 7c 20 (__rs6000__) ||
2880: 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 defined(__convex
2890: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
28a0: 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 _ia64__) || defi
28b0: 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 20 ned(__x86_64__)
28c0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 || defined(__s39
28d0: 30 5f 5f 29 0a 20 20 5f 5f 56 41 5f 52 45 47 49 0__). __VA_REGI
28e0: 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 STER_STRUCT_RETU
28f0: 52 4e 09 3d 20 31 3c 3c 31 30 2c 0a 23 65 6e 64 RN.= 1<<10,.#end
2900: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
2910: 5f 6d 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 _mips__) && !def
2920: 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f ined(__mipsn32__
2930: 29 0a 20 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 31 ). __VA_FLOAT_1
2940: 09 09 09 3d 20 31 3c 3c 31 31 2c 0a 20 20 5f 5f ...= 1<<11,. __
2950: 56 41 5f 46 4c 4f 41 54 5f 32 09 09 09 3d 20 31 VA_FLOAT_2...= 1
2960: 3c 3c 31 32 2c 0a 23 65 6e 64 69 66 0a 23 69 66 <<12,.#endif.#if
2970: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e defined(__mipsn
2980: 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 32__) || defined
2990: 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 20 5f (__mips64__). _
29a0: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 46 4c 4f _VA_REGISTER_FLO
29b0: 41 54 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 ATSTRUCT_RETURN.
29c0: 3d 20 31 3c 3c 31 33 2c 0a 20 20 5f 5f 56 41 5f = 1<<13,. __VA_
29d0: 52 45 47 49 53 54 45 52 5f 44 4f 55 42 4c 45 53 REGISTER_DOUBLES
29e0: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 TRUCT_RETURN.= 1
29f0: 3c 3c 31 34 2c 0a 23 65 6e 64 69 66 0a 0a 20 20 <<14,.#endif..
2a00: 5f 5f 56 41 5f 66 6c 61 67 5f 66 6f 72 5f 62 72 __VA_flag_for_br
2a10: 6f 6b 65 6e 5f 63 6f 6d 70 69 6c 65 72 73 5f 74 oken_compilers_t
2a20: 68 61 74 5f 64 6f 6e 74 5f 6c 69 6b 65 5f 74 72 hat_dont_like_tr
2a30: 61 69 6c 69 6e 67 5f 63 6f 6d 6d 61 73 0a 7d 3b ailing_commas.};
2a40: 0a 0a 2f 2a 0a 20 2a 20 44 65 66 69 6e 69 74 69 ../*. * Definiti
2a50: 6f 6e 20 6f 66 20 74 68 65 20 60 76 61 5f 61 6c on of the `va_al
2a60: 69 73 74 27 20 74 79 70 65 2e 0a 20 2a 2f 0a 74 ist' type.. */.t
2a70: 79 70 65 64 65 66 20 73 74 72 75 63 74 0a 7b 0a ypedef struct.{.
2a80: 20 20 2f 2a 20 73 6f 6d 65 20 76 61 5f 2e 2e 2e /* some va_...
2a90: 20 6d 61 63 72 6f 73 20 6e 65 65 64 20 74 68 65 macros need the
2aa0: 73 65 20 66 6c 61 67 73 20 2a 2f 0a 20 20 69 6e se flags */. in
2ab0: 74 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 t fla
2ac0: 67 73 3b 0a 20 20 2f 2a 20 63 75 72 72 65 6e 74 gs;. /* current
2ad0: 20 70 6f 69 6e 74 65 72 20 69 6e 74 6f 20 74 68 pointer into th
2ae0: 65 20 61 72 67 75 6d 65 6e 74 20 61 72 72 61 79 e argument array
2af0: 20 2a 2f 0a 20 20 75 6e 73 69 67 6e 65 64 20 6c */. unsigned l
2b00: 6f 6e 67 20 20 61 70 74 72 3b 0a 20 20 2f 2a 20 ong aptr;. /*
2b10: 73 74 72 75 63 74 75 72 65 20 72 65 74 75 72 6e structure return
2b20: 20 70 6f 69 6e 74 65 72 2c 20 72 65 74 75 72 6e pointer, return
2b30: 20 74 79 70 65 2c 20 72 65 74 75 72 6e 20 74 79 type, return ty
2b40: 70 65 20 73 69 7a 65 20 2a 2f 0a 20 20 76 6f 69 pe size */. voi
2b50: 64 2a 20 20 20 20 20 20 20 20 20 20 72 61 64 64 d* radd
2b60: 72 3b 0a 20 20 65 6e 75 6d 20 5f 5f 56 41 74 79 r;. enum __VAty
2b70: 70 65 20 20 72 74 79 70 65 3b 0a 20 20 75 6e 73 pe rtype;. uns
2b80: 69 67 6e 65 64 20 6c 6f 6e 67 20 20 72 73 69 7a igned long rsiz
2b90: 65 3b 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f e;.#if defined(_
2ba0: 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 28 64 65 66 _i386__) || (def
2bb0: 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 ined(__rs6000__)
2bc0: 20 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 4d 41 && defined(__MA
2bd0: 43 48 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 CH__) && defined
2be0: 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 0a 20 20 2f (__APPLE__)). /
2bf0: 2a 20 46 69 6c 6c 65 72 20 77 6f 72 64 2c 20 6e * Filler word, n
2c00: 65 65 64 65 64 20 69 66 20 74 68 65 20 6e 75 6d eeded if the num
2c10: 62 65 72 73 20 6f 66 20 77 6f 72 64 73 20 75 70 bers of words up
2c20: 20 74 6f 20 6e 6f 77 20 69 6e 20 74 68 69 73 20 to now in this
2c30: 73 74 72 75 63 74 75 72 65 20 2a 2f 0a 20 20 2f structure */. /
2c40: 2a 20 69 73 20 6f 64 64 20 28 62 65 63 61 75 73 * is odd (becaus
2c50: 65 20 6f 6e 20 4d 53 56 43 2c 20 61 6c 69 67 6e e on MSVC, align
2c60: 6f 66 28 64 6f 75 62 6c 65 29 20 3d 20 38 2c 20 of(double) = 8,
2c70: 6e 6f 72 6d 61 6c 6c 79 20 3d 20 34 3b 20 73 69 normally = 4; si
2c80: 6d 69 6c 61 72 6c 79 2c 20 20 2a 2f 0a 20 20 2f milarly, */. /
2c90: 2a 20 6f 6e 20 4d 61 63 4f 53 20 58 2c 20 74 68 * on MacOS X, th
2ca0: 65 20 41 70 70 6c 65 20 63 6f 6d 70 69 6c 65 72 e Apple compiler
2cb0: 20 68 61 73 20 61 6c 69 67 6e 6f 66 28 64 6f 75 has alignof(dou
2cc0: 62 6c 65 29 20 3d 20 38 20 77 68 65 72 65 61 73 ble) = 8 whereas
2cd0: 20 74 68 65 20 20 20 20 20 20 2a 2f 0a 20 20 2f the */. /
2ce0: 2a 20 73 74 61 6e 64 61 72 64 20 47 43 43 20 68 * standard GCC h
2cf0: 61 73 20 61 6c 69 67 6e 6f 66 28 64 6f 75 62 6c as alignof(doubl
2d00: 65 29 20 3d 20 34 2e 20 20 20 20 20 20 20 20 20 e) = 4.
2d10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2d20: 20 20 20 20 20 20 20 20 20 20 2a 2f 0a 20 20 5f */. _
2d30: 5f 76 61 77 6f 72 64 20 20 20 20 20 20 20 66 69 _vaword fi
2d40: 6c 6c 65 72 31 3b 0a 23 65 6e 64 69 66 0a 20 20 ller1;.#endif.
2d50: 2f 2a 20 74 65 6d 70 6f 72 61 72 79 20 73 74 6f /* temporary sto
2d60: 72 61 67 65 20 66 6f 72 20 72 65 74 75 72 6e 20 rage for return
2d70: 76 61 6c 75 65 20 2a 2f 0a 20 20 75 6e 69 6f 6e value */. union
2d80: 20 7b 0a 20 20 20 20 63 68 61 72 20 20 20 20 20 {. char
2d90: 20 20 20 20 20 20 20 20 20 20 20 5f 63 68 61 72 _char
2da0: 3b 0a 20 20 20 20 73 69 67 6e 65 64 20 63 68 61 ;. signed cha
2db0: 72 20 20 20 20 20 20 20 20 20 5f 73 63 68 61 72 r _schar
2dc0: 3b 0a 20 20 20 20 75 6e 73 69 67 6e 65 64 20 63 ;. unsigned c
2dd0: 68 61 72 20 20 20 20 20 20 20 5f 75 63 68 61 72 har _uchar
2de0: 3b 0a 20 20 20 20 73 68 6f 72 74 20 20 20 20 20 ;. short
2df0: 20 20 20 20 20 20 20 20 20 20 5f 73 68 6f 72 74 _short
2e00: 3b 0a 20 20 20 20 75 6e 73 69 67 6e 65 64 20 73 ;. unsigned s
2e10: 68 6f 72 74 20 20 20 20 20 20 5f 75 73 68 6f 72 hort _ushor
2e20: 74 3b 0a 20 20 20 20 69 6e 74 20 20 20 20 20 20 t;. int
2e30: 20 20 20 20 20 20 20 20 20 20 20 5f 69 6e 74 3b _int;
2e40: 0a 20 20 20 20 75 6e 73 69 67 6e 65 64 20 69 6e . unsigned in
2e50: 74 20 20 20 20 20 20 20 20 5f 75 69 6e 74 3b 0a t _uint;.
2e60: 20 20 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 long
2e70: 20 20 20 20 20 20 20 20 5f 6c 6f 6e 67 3b 0a 20 _long;.
2e80: 20 20 20 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 unsigned long
2e90: 20 20 20 20 20 20 20 5f 75 6c 6f 6e 67 3b 0a 23 _ulong;.#
2ea0: 69 66 20 21 28 64 65 66 69 6e 65 64 28 5f 5f 6d if !(defined(__m
2eb0: 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 ips64__) || defi
2ec0: 6e 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 29 20 ned(__alpha__))
2ed0: 26 26 20 64 65 66 69 6e 65 64 28 48 41 56 45 5f && defined(HAVE_
2ee0: 4c 4f 4e 47 4c 4f 4e 47 29 0a 20 20 20 20 6c 6f LONGLONG). lo
2ef0: 6e 67 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 20 ng long
2f00: 20 20 5f 6c 6f 6e 67 6c 6f 6e 67 3b 0a 20 20 20 _longlong;.
2f10: 20 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 6c unsigned long l
2f20: 6f 6e 67 20 20 5f 75 6c 6f 6e 67 6c 6f 6e 67 3b ong _ulonglong;
2f30: 0a 23 65 6e 64 69 66 0a 20 20 20 20 66 6c 6f 61 .#endif. floa
2f40: 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t
2f50: 5f 66 6c 6f 61 74 3b 0a 20 20 20 20 64 6f 75 62 _float;. doub
2f60: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le
2f70: 5f 64 6f 75 62 6c 65 3b 0a 20 20 20 20 76 6f 69 _double;. voi
2f80: 64 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 d*
2f90: 20 5f 70 74 72 3b 0a 20 20 20 20 5f 5f 76 61 77 _ptr;. __vaw
2fa0: 6f 72 64 20 20 20 20 20 20 20 20 20 20 20 20 5f ord _
2fb0: 77 6f 72 64 73 5b 32 5d 3b 0a 20 20 7d 20 20 20 words[2];. }
2fc0: 20 20 20 20 20 20 20 20 20 20 20 74 6d 70 3b 0a tmp;.
2fd0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 #if defined(__i3
2fe0: 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 86__) || defined
2ff0: 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 (__m68k__) || (d
3000: 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f efined(__sparc__
3010: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
3020: 73 70 61 72 63 36 34 5f 5f 29 29 20 7c 7c 20 64 sparc64__)) || d
3030: 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 efined(__hppa__)
3040: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 || defined(__m8
3050: 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 8k__) || defined
3060: 28 5f 5f 69 61 36 34 5f 5f 29 0a 20 20 76 6f 69 (__ia64__). voi
3070: 64 2a 20 20 20 20 20 20 20 20 20 20 73 74 72 75 d* stru
3080: 63 74 72 61 64 64 72 3b 0a 23 65 6e 64 69 66 0a ctraddr;.#endif.
3090: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
30a0: 70 73 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 ps__) || defined
30b0: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
30c0: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
30d0: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
30e0: 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 __alpha__) || de
30f0: 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a fined(__hppa__).
3100: 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 20 20 long
3110: 20 6d 65 6d 61 72 67 70 74 72 3b 0a 23 65 6e 64 memargptr;.#end
3120: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
3130: 5f 68 70 70 61 5f 5f 29 0a 20 20 6c 6f 6e 67 20 _hppa__). long
3140: 20 20 20 20 20 20 20 20 20 20 66 61 72 67 5f 6f farg_o
3150: 66 66 73 65 74 3b 0a 20 20 6c 6f 6e 67 20 20 20 ffset;. long
3160: 20 20 20 20 20 20 20 20 64 61 72 67 5f 6f 66 66 darg_off
3170: 73 65 74 3b 0a 20 20 66 6c 6f 61 74 20 20 20 20 set;. float
3180: 20 20 20 20 20 20 66 61 72 67 5b 34 5d 3b 0a 20 farg[4];.
3190: 20 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 double
31a0: 64 61 72 67 5b 32 5d 3b 0a 23 65 6e 64 69 66 0a darg[2];.#endif.
31b0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
31c0: 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 ps__) && !define
31d0: 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 0a 20 d(__mipsn32__).
31e0: 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 int
31f0: 61 6e 75 6d 3b 0a 20 20 66 6c 6f 61 74 20 20 20 anum;. float
3200: 20 20 20 20 20 20 20 66 61 72 67 5b 32 5d 3b 0a farg[2];.
3210: 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 double
3220: 20 64 61 72 67 5b 32 5d 3b 0a 23 65 6e 64 69 66 darg[2];.#endif
3230: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
3240: 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 ipsn32__) || def
3250: 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 ined(__mips64__)
3260: 0a 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 . int
3270: 20 20 61 6e 75 6d 3b 0a 20 20 66 6c 6f 61 74 20 anum;. float
3280: 20 20 20 20 20 20 20 20 20 66 61 72 67 5b 38 5d farg[8]
3290: 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 ;. double
32a0: 20 20 20 64 61 72 67 5b 38 5d 3b 0a 23 65 6e 64 darg[8];.#end
32b0: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
32c0: 5f 73 70 61 72 63 36 34 5f 5f 29 0a 20 20 69 6e _sparc64__). in
32d0: 74 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 75 t anu
32e0: 6d 3b 0a 20 20 66 6c 6f 61 74 20 20 20 20 20 20 m;. float
32f0: 20 20 20 20 66 61 72 67 5b 31 36 5d 3b 0a 20 20 farg[16];.
3300: 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 64 double d
3310: 61 72 67 5b 31 36 5d 3b 0a 23 65 6e 64 69 66 0a arg[16];.#endif.
3320: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 #if defined(__rs
3330: 36 30 30 30 5f 5f 29 0a 20 20 64 6f 75 62 6c 65 6000__). double
3340: 2a 20 20 20 20 20 20 20 20 6d 65 6d 66 61 72 67 * memfarg
3350: 70 74 72 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 ptr;. double
3360: 20 20 20 20 20 20 66 61 72 67 5b 31 33 5d 3b 0a farg[13];.
3370: 23 69 66 20 21 28 64 65 66 69 6e 65 64 28 5f 41 #if !(defined(_A
3380: 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 IX) || (defined(
3390: 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 __MACH__) && def
33a0: 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 ined(__APPLE__))
33b0: 29 0a 20 20 5f 5f 76 61 77 6f 72 64 20 20 20 20 ). __vaword
33c0: 20 20 20 72 65 67 61 72 67 5b 38 5d 3b 0a 20 20 regarg[8];.
33d0: 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 20 73 unsigned long s
33e0: 61 70 74 72 3b 0a 20 20 69 6e 74 20 20 20 20 20 aptr;. int
33f0: 20 20 20 20 20 20 20 6f 6e 73 74 61 63 6b 3b 0a onstack;.
3400: 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 23 69 #endif.#endif.#i
3410: 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 30 f defined(__s390
3420: 5f 5f 29 0a 20 20 66 6c 6f 61 74 2a 20 20 20 20 __). float*
3430: 20 20 20 20 20 6d 65 6d 66 61 72 67 70 74 72 3b memfargptr;
3440: 0a 20 20 64 6f 75 62 6c 65 2a 20 20 20 20 20 20 . double*
3450: 20 20 6d 65 6d 64 61 72 67 70 74 72 3b 0a 20 20 memdargptr;.
3460: 66 6c 6f 61 74 20 20 20 20 20 20 20 20 20 20 66 float f
3470: 61 72 67 5b 32 5d 3b 0a 20 20 64 6f 75 62 6c 65 arg[2];. double
3480: 20 20 20 20 20 20 20 20 20 64 61 72 67 5b 32 5d darg[2]
3490: 3b 0a 20 20 5f 5f 76 61 77 6f 72 64 20 20 20 20 ;. __vaword
34a0: 20 20 20 72 65 67 61 72 67 5b 35 5d 3b 0a 20 20 regarg[5];.
34b0: 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 20 73 unsigned long s
34c0: 61 70 74 72 3b 0a 20 20 69 6e 74 20 20 20 20 20 aptr;. int
34d0: 20 20 20 20 20 20 20 6f 6e 73 74 61 63 6b 3b 0a onstack;.
34e0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
34f0: 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 20 20 5f ed(__ia64__). _
3500: 5f 76 61 77 6f 72 64 2a 20 20 20 20 20 20 73 61 _vaword* sa
3510: 70 74 72 3b 0a 20 20 64 6f 75 62 6c 65 2a 20 20 ptr;. double*
3520: 20 20 20 20 20 20 6d 65 6d 66 61 72 67 70 74 72 memfargptr
3530: 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 ;. double
3540: 20 20 20 66 61 72 67 5b 38 5d 3b 0a 23 65 6e 64 farg[8];.#end
3550: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
3560: 5f 78 38 36 5f 36 34 5f 5f 29 0a 20 20 64 6f 75 _x86_64__). dou
3570: 62 6c 65 2a 20 20 20 20 20 20 20 20 6d 65 6d 66 ble* memf
3580: 61 72 67 70 74 72 3b 0a 20 20 64 6f 75 62 6c 65 argptr;. double
3590: 20 20 20 20 20 20 20 20 20 66 61 72 67 5b 38 5d farg[8]
35a0: 3b 0a 20 20 5f 5f 76 61 77 6f 72 64 2a 20 20 20 ;. __vaword*
35b0: 20 20 20 6d 65 6d 69 61 72 67 70 74 72 3b 0a 20 memiargptr;.
35c0: 20 5f 5f 76 61 77 6f 72 64 20 20 20 20 20 20 20 __vaword
35d0: 69 61 72 67 5b 36 5d 3b 0a 23 65 6e 64 69 66 0a iarg[6];.#endif.
35e0: 7d 20 5f 5f 76 61 5f 61 6c 69 73 74 3b 0a 0a 74 } __va_alist;..t
35f0: 79 70 65 64 65 66 20 5f 5f 76 61 5f 61 6c 69 73 ypedef __va_alis
3600: 74 2a 20 76 61 5f 61 6c 69 73 74 3b 0a 0a 0a 2f t* va_alist;.../
3610: 2a 0a 20 2a 20 44 65 66 69 6e 69 74 69 6f 6e 20 *. * Definition
3620: 6f 66 20 74 68 65 20 76 61 5f 73 74 61 72 74 5f of the va_start_
3630: 78 78 78 20 6d 61 63 72 6f 73 2e 0a 20 2a 2f 0a xxx macros.. */.
3640: 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f 53 54 41 #define __VA_STA
3650: 52 54 5f 46 4c 41 47 53 20 20 5c 0a 20 20 5f 5f RT_FLAGS \. __
3660: 56 41 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e VA_STRUCT_RETURN
3670: 20 7c 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 45 | __VA_FLOAT_RE
3680: 54 55 52 4e 20 7c 20 5f 5f 56 41 5f 53 54 52 55 TURN | __VA_STRU
3690: 43 54 5f 41 52 47 53 20 7c 20 5f 5f 56 41 5f 46 CT_ARGS | __VA_F
36a0: 4c 4f 41 54 5f 41 52 47 53 20 7c 20 5f 5f 56 41 LOAT_ARGS | __VA
36b0: 5f 49 4e 54 45 47 45 52 53 20 7c 20 5f 5f 56 41 _INTEGERS | __VA
36c0: 5f 43 4c 45 41 4e 55 50 0a 23 64 65 66 69 6e 65 _CLEANUP.#define
36d0: 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 __va_start(LIST
36e0: 2c 52 45 54 54 59 50 45 29 20 20 5c 0a 20 20 28 ,RETTYPE) \. (
36f0: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 3d 20 (LIST)->flags =
3700: 5f 5f 56 41 5f 53 54 41 52 54 5f 46 4c 41 47 53 __VA_START_FLAGS
3710: 2c 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 ,.....\. (LIST
3720: 29 2d 3e 72 74 79 70 65 20 3d 20 28 52 45 54 54 )->rtype = (RETT
3730: 59 50 45 29 09 09 09 09 09 09 5c 0a 20 20 29 0a YPE)......\. ).
3740: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3750: 5f 76 6f 69 64 28 4c 49 53 54 29 09 20 5f 5f 76 _void(LIST). __v
3760: 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 a_start(LIST,__V
3770: 41 76 6f 69 64 29 0a 23 64 65 66 69 6e 65 20 76 Avoid).#define v
3780: 61 5f 73 74 61 72 74 5f 63 68 61 72 28 4c 49 53 a_start_char(LIS
3790: 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c T). __va_start(L
37a0: 49 53 54 2c 5f 5f 56 41 63 68 61 72 29 0a 23 64 IST,__VAchar).#d
37b0: 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 5f 73 efine va_start_s
37c0: 63 68 61 72 28 4c 49 53 54 29 09 20 5f 5f 76 61 char(LIST). __va
37d0: 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 _start(LIST,__VA
37e0: 73 63 68 61 72 29 0a 23 64 65 66 69 6e 65 20 76 schar).#define v
37f0: 61 5f 73 74 61 72 74 5f 75 63 68 61 72 28 4c 49 a_start_uchar(LI
3800: 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 28 ST). __va_start(
3810: 4c 49 53 54 2c 5f 5f 56 41 75 63 68 61 72 29 0a LIST,__VAuchar).
3820: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3830: 5f 73 68 6f 72 74 28 4c 49 53 54 29 09 20 5f 5f _short(LIST). __
3840: 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f va_start(LIST,__
3850: 56 41 73 68 6f 72 74 29 0a 23 64 65 66 69 6e 65 VAshort).#define
3860: 20 76 61 5f 73 74 61 72 74 5f 75 73 68 6f 72 74 va_start_ushort
3870: 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 (LIST). __va_sta
3880: 72 74 28 4c 49 53 54 2c 5f 5f 56 41 75 73 68 6f rt(LIST,__VAusho
3890: 72 74 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 rt).#define va_s
38a0: 74 61 72 74 5f 69 6e 74 28 4c 49 53 54 29 09 20 tart_int(LIST).
38b0: 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c __va_start(LIST,
38c0: 5f 5f 56 41 69 6e 74 29 0a 23 64 65 66 69 6e 65 __VAint).#define
38d0: 20 76 61 5f 73 74 61 72 74 5f 75 69 6e 74 28 4c va_start_uint(L
38e0: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
38f0: 28 4c 49 53 54 2c 5f 5f 56 41 75 69 6e 74 29 0a (LIST,__VAuint).
3900: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3910: 5f 6c 6f 6e 67 28 4c 49 53 54 29 09 20 5f 5f 76 _long(LIST). __v
3920: 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 a_start(LIST,__V
3930: 41 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 20 76 Along).#define v
3940: 61 5f 73 74 61 72 74 5f 75 6c 6f 6e 67 28 4c 49 a_start_ulong(LI
3950: 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 28 ST). __va_start(
3960: 4c 49 53 54 2c 5f 5f 56 41 75 6c 6f 6e 67 29 0a LIST,__VAulong).
3970: 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 #define va_start
3980: 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 29 09 _longlong(LIST).
3990: 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 __va_start(LIST
39a0: 2c 5f 5f 56 41 6c 6f 6e 67 6c 6f 6e 67 29 0a 23 ,__VAlonglong).#
39b0: 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 5f define va_start_
39c0: 75 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 29 20 ulonglong(LIST)
39d0: 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c __va_start(LIST,
39e0: 5f 5f 56 41 75 6c 6f 6e 67 6c 6f 6e 67 29 0a 23 __VAulonglong).#
39f0: 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 5f define va_start_
3a00: 66 6c 6f 61 74 28 4c 49 53 54 29 09 20 5f 5f 76 float(LIST). __v
3a10: 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 a_start(LIST,__V
3a20: 41 66 6c 6f 61 74 29 0a 23 64 65 66 69 6e 65 20 Afloat).#define
3a30: 76 61 5f 73 74 61 72 74 5f 64 6f 75 62 6c 65 28 va_start_double(
3a40: 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 LIST). __va_star
3a50: 74 28 4c 49 53 54 2c 5f 5f 56 41 64 6f 75 62 6c t(LIST,__VAdoubl
3a60: 65 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 e).#define va_st
3a70: 61 72 74 5f 70 74 72 28 4c 49 53 54 2c 54 59 50 art_ptr(LIST,TYP
3a80: 45 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c E). __va_start(L
3a90: 49 53 54 2c 5f 5f 56 41 76 6f 69 64 70 29 0a 0a IST,__VAvoidp)..
3aa0: 2f 2a 0a 20 2a 20 76 61 5f 73 74 61 72 74 5f 73 /*. * va_start_s
3ab0: 74 72 75 63 74 3a 20 50 72 65 70 61 72 69 6e 67 truct: Preparing
3ac0: 20 73 74 72 75 63 74 75 72 65 20 72 65 74 75 72 structure retur
3ad0: 6e 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 n.. */.#define v
3ae0: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 28 4c a_start_struct(L
3af0: 49 53 54 2c 54 59 50 45 2c 54 59 50 45 5f 53 50 IST,TYPE,TYPE_SP
3b00: 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 5f LITTABLE) \. _
3b10: 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 28 va_start_struct(
3b20: 4c 49 53 54 2c 73 69 7a 65 6f 66 28 54 59 50 45 LIST,sizeof(TYPE
3b30: 29 2c 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 ),__VA_alignof(T
3b40: 59 50 45 29 2c 54 59 50 45 5f 53 50 4c 49 54 54 YPE),TYPE_SPLITT
3b50: 41 42 4c 45 29 0a 2f 2a 20 5f 76 61 5f 73 74 61 ABLE)./* _va_sta
3b60: 72 74 5f 73 74 72 75 63 74 28 29 20 69 73 20 6c rt_struct() is l
3b70: 69 6b 65 20 76 61 5f 73 74 61 72 74 5f 73 74 72 ike va_start_str
3b80: 75 63 74 28 29 2c 20 65 78 63 65 70 74 20 74 68 uct(), except th
3b90: 61 74 20 79 6f 75 20 70 61 73 73 0a 20 2a 20 74 at you pass. * t
3ba0: 68 65 20 74 79 70 65 27 73 20 73 69 7a 65 20 61 he type's size a
3bb0: 6e 64 20 61 6c 69 67 6e 6d 65 6e 74 20 69 6e 73 nd alignment ins
3bc0: 74 65 61 64 20 6f 66 20 74 68 65 20 74 79 70 65 tead of the type
3bd0: 20 69 74 73 65 6c 66 2e 0a 20 2a 2f 0a 23 64 65 itself.. */.#de
3be0: 66 69 6e 65 20 5f 76 61 5f 73 74 61 72 74 5f 73 fine _va_start_s
3bf0: 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f truct(LIST,TYPE_
3c00: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c SIZE,TYPE_ALIGN,
3c10: 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 TYPE_SPLITTABLE)
3c20: 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 73 74 61 72 \. (__va_star
3c30: 74 28 4c 49 53 54 2c 5f 5f 56 41 73 74 72 75 63 t(LIST,__VAstruc
3c40: 74 29 2c 09 09 09 09 09 09 5c 0a 20 20 20 28 4c t),......\. (L
3c50: 49 53 54 29 2d 3e 72 73 69 7a 65 20 3d 20 28 54 IST)->rsize = (T
3c60: 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 09 09 YPE_SIZE),......
3c70: 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c \. ((LIST)->fl
3c80: 61 67 73 20 26 20 5f 5f 56 41 5f 53 55 4e 50 52 ags & __VA_SUNPR
3c90: 4f 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 OCC_STRUCT_RETUR
3ca0: 4e 09 09 09 09 5c 0a 20 20 20 20 3f 20 5f 5f 76 N....\. ? __v
3cb0: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 a_start_struct2(
3cc0: 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 LIST)......\.
3cd0: 20 3a 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 : ((LIST)->flag
3ce0: 73 20 26 20 28 5f 5f 56 41 5f 50 43 43 5f 53 54 s & (__VA_PCC_ST
3cf0: 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 20 5f 5f RUCT_RETURN | __
3d00: 56 41 5f 53 55 4e 43 43 5f 53 54 52 55 43 54 5f VA_SUNCC_STRUCT_
3d10: 52 45 54 55 52 4e 29 20 5c 0a 20 20 20 20 20 20 RETURN) \.
3d20: 20 3f 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 ? ((TYPE_SIZE)
3d30: 3c 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 5f 73 <= sizeof(__va_s
3d40: 74 72 75 63 74 5f 62 75 66 66 65 72 29 20 7c 7c truct_buffer) ||
3d50: 20 5f 5f 76 61 5f 65 72 72 6f 72 32 28 54 59 50 __va_error2(TYP
3d60: 45 5f 53 49 5a 45 29 2c 20 5c 0a 20 20 20 20 20 E_SIZE), \.
3d70: 20 20 20 20 20 28 4c 49 53 54 29 2d 3e 72 61 64 (LIST)->rad
3d80: 64 72 20 3d 20 26 5f 5f 76 61 5f 73 74 72 75 63 dr = &__va_struc
3d90: 74 5f 62 75 66 66 65 72 2c 09 09 09 09 5c 0a 20 t_buffer,....\.
3da0: 20 20 20 20 20 20 20 20 20 30 09 09 09 09 09 09 0......
3db0: 09 09 5c 0a 20 20 20 20 20 20 20 20 20 29 09 09 ..\. )..
3dc0: 09 09 09 09 09 09 5c 0a 20 20 20 20 20 20 20 3a ......\. :
3dd0: 20 28 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 (((LIST)->flags
3de0: 20 26 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 & __VA_SMALL_ST
3df0: 52 55 43 54 5f 52 45 54 55 52 4e 29 09 09 09 5c RUCT_RETURN)...\
3e00: 0a 20 20 20 20 20 20 20 20 20 20 26 26 20 5f 5f . && __
3e10: 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 65 va_reg_struct_re
3e20: 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f 53 turn(LIST,TYPE_S
3e30: 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 IZE,TYPE_SPLITTA
3e40: 42 4c 45 29 09 5c 0a 20 20 20 20 20 20 20 20 20 BLE).\.
3e50: 20 3f 20 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 ? ((LIST)->radd
3e60: 72 20 3d 20 26 28 4c 49 53 54 29 2d 3e 74 6d 70 r = &(LIST)->tmp
3e70: 2c 09 09 09 09 5c 0a 20 20 20 20 20 20 20 20 20 ,....\.
3e80: 20 20 20 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 __va_start_s
3e90: 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 45 truct1(LIST,TYPE
3ea0: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
3eb0: 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 ,TYPE_SPLITTABLE
3ec0: 29 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 ) \.
3ed0: 29 09 09 09 09 09 09 09 09 5c 0a 20 20 20 20 20 )........\.
3ee0: 20 20 20 20 20 3a 20 5f 5f 76 61 5f 73 74 61 72 : __va_star
3ef0: 74 5f 73 74 72 75 63 74 32 28 4c 49 53 54 29 09 t_struct2(LIST).
3f00: 09 09 09 09 5c 0a 20 20 29 29 20 20 29 20 20 29 ....\. )) ) )
3f10: 0a 2f 2a 20 44 65 74 65 72 6d 69 6e 65 73 20 77 ./* Determines w
3f20: 68 65 74 68 65 72 20 61 20 73 74 72 75 63 74 75 hether a structu
3f30: 72 65 20 69 73 20 72 65 74 75 72 6e 65 64 20 69 re is returned i
3f40: 6e 20 72 65 67 69 73 74 65 72 73 2c 0a 20 2a 20 n registers,. *
3f50: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 69 74 73 depending on its
3f60: 20 73 69 7a 65 20 61 6e 64 20 69 74 73 20 77 6f size and its wo
3f70: 72 64 2d 73 70 6c 69 74 74 61 62 6c 65 20 66 6c rd-splittable fl
3f80: 61 67 2e 0a 20 2a 2f 0a 23 69 66 20 28 64 65 66 ag.. */.#if (def
3f90: 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 26 ined(__i386__) &
3fa0: 26 20 64 65 66 69 6e 65 64 28 5f 57 49 4e 33 32 & defined(_WIN32
3fb0: 29 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f )).#define __va_
3fc0: 72 65 67 5f 73 74 72 75 63 74 5f 72 65 74 75 72 reg_struct_retur
3fd0: 6e 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 n(LIST,TYPE_SIZE
3fe0: 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 ,TYPE_SPLITTABLE
3ff0: 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 ) \. ((TYPE_SI
4000: 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 28 54 59 50 ZE) == 1 || (TYP
4010: 45 5f 53 49 5a 45 29 20 3d 3d 20 32 20 7c 7c 20 E_SIZE) == 2 ||
4020: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 34 (TYPE_SIZE) == 4
4030: 09 09 5c 0a 20 20 20 7c 7c 20 28 28 54 59 50 45 ..\. || ((TYPE
4040: 5f 53 49 5a 45 29 20 3d 3d 20 38 09 09 09 09 09 _SIZE) == 8.....
4050: 09 09 5c 0a 20 20 20 20 20 20 20 26 26 20 28 28 ..\. && ((
4060: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 (LIST)->flags &
4070: 5f 5f 56 41 5f 4d 53 56 43 5f 53 54 52 55 43 54 __VA_MSVC_STRUCT
4080: 5f 52 45 54 55 52 4e 29 09 09 09 5c 0a 20 20 20 _RETURN)...\.
4090: 20 20 20 20 20 20 20 20 7c 7c 20 28 28 54 59 50 || ((TYP
40a0: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 09 09 E_SPLITTABLE)...
40b0: 09 09 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..\.
40c0: 20 20 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 && ((LIST)->f
40d0: 6c 61 67 73 20 26 20 5f 5f 56 41 5f 47 43 43 5f lags & __VA_GCC_
40e0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 09 09 STRUCT_RETURN)..
40f0: 5c 0a 20 20 29 20 20 20 29 20 20 20 29 20 20 20 \. ) ) )
4100: 29 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f 56 )./* Turn on __V
4110: 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 43 A_REGISTER_STRUC
4120: 54 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f 56 41 T_RETURN if __VA
4130: 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 _SMALL_STRUCT_RE
4140: 54 55 52 4e 20 77 61 73 20 73 65 74 0a 20 2a 20 TURN was set. *
4150: 61 6e 64 20 74 68 65 20 73 74 72 75 63 74 20 77 and the struct w
4160: 69 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 20 ill actually be
4170: 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 returned in regi
4180: 73 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 sters.. */.#defi
4190: 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 ne __va_start_st
41a0: 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 45 5f ruct1(LIST,TYPE_
41b0: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c SIZE,TYPE_ALIGN,
41c0: 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 TYPE_SPLITTABLE)
41d0: 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 66 \. ((LIST)->f
41e0: 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 lags |= __VA_REG
41f0: 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 ISTER_STRUCT_RET
4200: 55 52 4e 2c 20 30 29 0a 23 65 6e 64 69 66 0a 23 URN, 0).#endif.#
4210: 69 66 20 28 64 65 66 69 6e 65 64 28 5f 5f 69 33 if (defined(__i3
4220: 38 36 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 86__) && !define
4230: 64 28 5f 57 49 4e 33 32 29 29 20 7c 7c 20 64 65 d(_WIN32)) || de
4240: 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 fined(__m68k__)
4250: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 72 6d || defined(__arm
4260: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
4270: 5f 72 73 36 30 30 30 5f 5f 29 20 7c 7c 20 64 65 _rs6000__) || de
4280: 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f fined(__convex__
4290: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
42a0: 33 39 30 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 390__).#define _
42b0: 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 _va_reg_struct_r
42c0: 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f eturn(LIST,TYPE_
42d0: 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 SIZE,TYPE_SPLITT
42e0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 50 ABLE) \. ((TYP
42f0: 45 5f 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 E_SIZE) == 1 ||
4300: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 (TYPE_SIZE) == 2
4310: 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 || (TYPE_SIZE)
4320: 3d 3d 20 34 09 09 5c 0a 20 20 20 7c 7c 20 28 28 == 4..\. || ((
4330: 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 38 20 TYPE_SIZE) == 8
4340: 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 54 41 && (TYPE_SPLITTA
4350: 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 20 20 BLE)....\.
4360: 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 && ((LIST)->fla
4370: 67 73 20 26 20 5f 5f 56 41 5f 47 43 43 5f 53 54 gs & __VA_GCC_ST
4380: 52 55 43 54 5f 52 45 54 55 52 4e 29 09 09 09 5c RUCT_RETURN)...\
4390: 0a 20 20 29 20 20 20 29 0a 2f 2a 20 54 75 72 6e . ) )./* Turn
43a0: 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 on __VA_REGISTE
43b0: 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 R_STRUCT_RETURN
43c0: 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 if __VA_SMALL_ST
43d0: 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 73 20 RUCT_RETURN was
43e0: 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 20 73 set. * and the s
43f0: 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 75 61 truct will actua
4400: 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 64 20 lly be returned
4410: 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a in registers.. *
4420: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 /.#define __va_s
4430: 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 tart_struct1(LIS
4440: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
4450: 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 _ALIGN,TYPE_SPLI
4460: 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c TTABLE) \. ((L
4470: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
4480: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 _VA_REGISTER_STR
4490: 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 29 0a 23 UCT_RETURN, 0).#
44a0: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
44b0: 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 0a 23 64 65 d(__alpha__).#de
44c0: 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 74 fine __va_reg_st
44d0: 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 54 ruct_return(LIST
44e0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
44f0: 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 SPLITTABLE) \.
4500: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d ((TYPE_SIZE) ==
4510: 20 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 1 || (TYPE_SIZE
4520: 29 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f ) == 2 || (TYPE_
4530: 53 49 5a 45 29 20 3d 3d 20 34 20 7c 7c 20 28 54 SIZE) == 4 || (T
4540: 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 38 09 5c YPE_SIZE) == 8.\
4550: 0a 20 20 20 7c 7c 20 28 28 54 59 50 45 5f 53 49 . || ((TYPE_SI
4560: 5a 45 29 20 3d 3d 20 31 36 20 26 26 20 28 54 59 ZE) == 16 && (TY
4570: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 09 PE_SPLITTABLE)..
4580: 09 09 5c 0a 20 20 20 20 20 20 20 26 26 20 28 28 ..\. && ((
4590: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f LIST)->flags & _
45a0: 5f 56 41 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 _VA_GCC_STRUCT_R
45b0: 45 54 55 52 4e 29 09 09 09 5c 0a 20 20 29 20 20 ETURN)...\. )
45c0: 20 29 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f )./* Turn on __
45d0: 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 VA_REGISTER_STRU
45e0: 43 54 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f 56 CT_RETURN if __V
45f0: 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 A_SMALL_STRUCT_R
4600: 45 54 55 52 4e 20 77 61 73 20 73 65 74 0a 20 2a ETURN was set. *
4610: 20 61 6e 64 20 74 68 65 20 73 74 72 75 63 74 20 and the struct
4620: 77 69 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 will actually be
4630: 20 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 returned in reg
4640: 69 73 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 isters.. */.#def
4650: 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 ine __va_start_s
4660: 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 45 truct1(LIST,TYPE
4670: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
4680: 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 ,TYPE_SPLITTABLE
4690: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
46a0: 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 flags |= __VA_RE
46b0: 47 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 GISTER_STRUCT_RE
46c0: 54 55 52 4e 2c 20 30 29 0a 23 65 6e 64 69 66 0a TURN, 0).#endif.
46d0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 #if defined(__hp
46e0: 70 61 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f pa__).#define __
46f0: 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 65 va_reg_struct_re
4700: 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f 53 turn(LIST,TYPE_S
4710: 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 IZE,TYPE_SPLITTA
4720: 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 BLE) \. ((LIST
4730: 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f )->flags & __VA_
4740: 4f 4c 44 47 43 43 5f 53 54 52 55 43 54 5f 52 45 OLDGCC_STRUCT_RE
4750: 54 55 52 4e 09 09 09 09 5c 0a 20 20 20 3f 20 28 TURN....\. ? (
4760: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 31 (TYPE_SIZE) == 1
4770: 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 || (TYPE_SIZE)
4780: 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f 53 49 == 2 || (TYPE_SI
4790: 5a 45 29 20 3d 3d 20 34 29 09 09 5c 0a 20 20 20 ZE) == 4)..\.
47a0: 3a 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3c : ((TYPE_SIZE) <
47b0: 3d 20 38 29 09 09 09 09 09 09 09 5c 0a 20 20 29 = 8).......\. )
47c0: 0a 2f 2a 20 54 65 73 74 20 62 6f 74 68 20 5f 5f ./* Test both __
47d0: 56 41 5f 4f 4c 44 47 43 43 5f 53 54 52 55 43 54 VA_OLDGCC_STRUCT
47e0: 5f 52 45 54 55 52 4e 20 61 6e 64 20 5f 5f 56 41 _RETURN and __VA
47f0: 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 _SMALL_STRUCT_RE
4800: 54 55 52 4e 20 61 74 20 72 75 6e 20 74 69 6d 65 TURN at run time
4810: 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
4820: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 a_start_struct1(
4830: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
4840: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
4850: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
4860: 30 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 0.#endif.#if def
4870: 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 ined(__mips__) &
4880: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 & !defined(__mip
4890: 73 6e 33 32 5f 5f 29 20 7c 7c 20 28 64 65 66 69 sn32__) || (defi
48a0: 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 ned(__sparc__) &
48b0: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 & !defined(__spa
48c0: 72 63 36 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 rc64__)) || defi
48d0: 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 0a 23 64 ned(__m88k__).#d
48e0: 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 efine __va_reg_s
48f0: 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 truct_return(LIS
4900: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
4910: 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a _SPLITTABLE) \.
4920: 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d ((TYPE_SIZE) =
4930: 3d 20 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a = 1 || (TYPE_SIZ
4940: 45 29 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 E) == 2 || (TYPE
4950: 5f 53 49 5a 45 29 20 3d 3d 20 34 29 0a 2f 2a 20 _SIZE) == 4)./*
4960: 54 65 73 74 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f Test __VA_SMALL_
4970: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 69 6e STRUCT_RETURN in
4980: 73 74 65 61 64 20 6f 66 20 5f 5f 56 41 5f 52 45 stead of __VA_RE
4990: 47 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 GISTER_STRUCT_RE
49a0: 54 55 52 4e 2e 20 2a 2f 0a 23 69 66 20 64 65 66 TURN. */.#if def
49b0: 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 ined(__mips__) &
49c0: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 & !defined(__mip
49d0: 73 6e 33 32 5f 5f 29 0a 23 64 65 66 69 6e 65 20 sn32__).#define
49e0: 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 __va_start_struc
49f0: 74 31 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a t1(LIST,TYPE_SIZ
4a00: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 E,TYPE_ALIGN,TYP
4a10: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c E_SPLITTABLE) \
4a20: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d . ((LIST)->anum
4a30: 2b 2b 2c 09 09 09 09 09 09 09 5c 0a 20 20 20 30 ++,.......\. 0
4a40: 09 09 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 .........\. ).#
4a50: 65 6c 73 65 0a 23 64 65 66 69 6e 65 20 5f 5f 76 else.#define __v
4a60: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 a_start_struct1(
4a70: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
4a80: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
4a90: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
4aa0: 30 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0.#endif.#endif.
4ab0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
4ac0: 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 psn32__) || defi
4ad0: 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a ned(__mips64__).
4ae0: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 #define __va_reg
4af0: 5f 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c _struct_return(L
4b00: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
4b10: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 PE_SPLITTABLE)
4b20: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 \. ((LIST)->fla
4b30: 67 73 20 26 20 5f 5f 56 41 5f 47 43 43 5f 53 54 gs & __VA_GCC_ST
4b40: 52 55 43 54 5f 52 45 54 55 52 4e 09 09 09 09 5c RUCT_RETURN....\
4b50: 0a 20 20 20 3f 20 28 28 54 59 50 45 5f 53 49 5a . ? ((TYPE_SIZ
4b60: 45 29 20 3d 3d 20 31 20 7c 7c 20 28 54 59 50 45 E) == 1 || (TYPE
4b70: 5f 53 49 5a 45 29 20 3d 3d 20 32 20 7c 7c 20 28 _SIZE) == 2 || (
4b80: 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 34 20 TYPE_SIZE) == 4
4b90: 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d || (TYPE_SIZE) =
4ba0: 3d 20 38 29 20 5c 0a 20 20 20 3a 20 28 28 54 59 = 8) \. : ((TY
4bb0: 50 45 5f 53 49 5a 45 29 20 3c 3d 20 31 36 29 09 PE_SIZE) <= 16).
4bc0: 09 09 09 09 09 5c 0a 20 20 29 0a 2f 2a 20 54 75 .....\. )./* Tu
4bd0: 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 rn on __VA_REGIS
4be0: 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 TER_STRUCT_RETUR
4bf0: 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f N if __VA_SMALL_
4c00: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 STRUCT_RETURN wa
4c10: 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 s set. * and the
4c20: 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 struct will act
4c30: 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 ually be returne
4c40: 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e 20 d in registers.
4c50: 41 6c 73 6f 20 74 75 72 6e 20 6f 6e 0a 20 2a 20 Also turn on. *
4c60: 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 46 4c __VA_REGISTER_FL
4c70: 4f 41 54 53 54 52 55 43 54 5f 52 45 54 55 52 4e OATSTRUCT_RETURN
4c80: 20 6f 72 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 or __VA_REGISTE
4c90: 52 5f 44 4f 55 42 4c 45 53 54 52 55 43 54 5f 52 R_DOUBLESTRUCT_R
4ca0: 45 54 55 52 4e 20 69 66 0a 20 2a 20 74 68 65 20 ETURN if. * the
4cb0: 73 74 72 75 63 74 20 77 69 6c 6c 20 62 65 20 72 struct will be r
4cc0: 65 74 75 72 6e 65 64 20 69 6e 20 66 6c 6f 61 74 eturned in float
4cd0: 69 6e 67 2d 70 6f 69 6e 74 20 72 65 67 69 73 74 ing-point regist
4ce0: 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 ers.. */.#define
4cf0: 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 __va_start_stru
4d00: 63 74 31 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ct1(LIST,TYPE_SI
4d10: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c 54 59 ZE,TYPE_ALIGN,TY
4d20: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 PE_SPLITTABLE)
4d30: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 \. ((LIST)->fla
4d40: 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 53 gs |= __VA_REGIS
4d50: 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 TER_STRUCT_RETUR
4d60: 4e 2c 09 09 09 09 5c 0a 20 20 20 28 54 59 50 45 N,....\. (TYPE
4d70: 5f 41 4c 49 47 4e 29 20 3d 3d 20 73 69 7a 65 6f _ALIGN) == sizeo
4d80: 66 28 66 6c 6f 61 74 29 20 26 26 20 28 54 59 50 f(float) && (TYP
4d90: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 09 09 E_SPLITTABLE)...
4da0: 09 5c 0a 20 20 20 20 26 26 20 28 28 54 59 50 45 .\. && ((TYPE
4db0: 5f 53 49 5a 45 29 20 3d 3d 20 73 69 7a 65 6f 66 _SIZE) == sizeof
4dc0: 28 66 6c 6f 61 74 29 20 7c 7c 20 28 54 59 50 45 (float) || (TYPE
4dd0: 5f 53 49 5a 45 29 20 3d 3d 20 32 2a 73 69 7a 65 _SIZE) == 2*size
4de0: 6f 66 28 66 6c 6f 61 74 29 29 09 09 5c 0a 20 20 of(float))..\.
4df0: 20 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c && ((LIST)->fl
4e00: 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 ags |= __VA_REGI
4e10: 53 54 45 52 5f 46 4c 4f 41 54 53 54 52 55 43 54 STER_FLOATSTRUCT
4e20: 5f 52 45 54 55 52 4e 29 2c 09 09 09 5c 0a 20 20 _RETURN),...\.
4e30: 20 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 3d 3d (TYPE_ALIGN) ==
4e40: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 20 sizeof(double)
4e50: 26 26 20 28 54 59 50 45 5f 53 50 4c 49 54 54 41 && (TYPE_SPLITTA
4e60: 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 20 26 26 BLE)....\. &&
4e70: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d ((TYPE_SIZE) ==
4e80: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 20 sizeof(double)
4e90: 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d || (TYPE_SIZE) =
4ea0: 3d 20 32 2a 73 69 7a 65 6f 66 28 64 6f 75 62 6c = 2*sizeof(doubl
4eb0: 65 29 29 09 5c 0a 20 20 20 20 26 26 20 28 28 4c e)).\. && ((L
4ec0: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
4ed0: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 44 4f 55 _VA_REGISTER_DOU
4ee0: 42 4c 45 53 54 52 55 43 54 5f 52 45 54 55 52 4e BLESTRUCT_RETURN
4ef0: 29 2c 09 09 09 5c 0a 20 20 20 30 29 0a 23 65 6e ),...\. 0).#en
4f00: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
4f10: 5f 5f 73 70 61 72 63 36 34 5f 5f 29 20 7c 7c 20 __sparc64__) ||
4f20: 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f defined(__ia64__
4f30: 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 ).#define __va_r
4f40: 65 67 5f 73 74 72 75 63 74 5f 72 65 74 75 72 6e eg_struct_return
4f50: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
4f60: 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 TYPE_SPLITTABLE)
4f70: 20 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 5a \. ((TYPE_SIZ
4f80: 45 29 20 3c 3d 20 33 32 29 0a 2f 2a 20 54 75 72 E) <= 32)./* Tur
4f90: 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 54 n on __VA_REGIST
4fa0: 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e ER_STRUCT_RETURN
4fb0: 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 if __VA_SMALL_S
4fc0: 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 73 TRUCT_RETURN was
4fd0: 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 20 set. * and the
4fe0: 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 75 struct will actu
4ff0: 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 64 ally be returned
5000: 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a 20 in registers..
5010: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
5020: 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 start_struct1(LI
5030: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
5040: 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c E_ALIGN,TYPE_SPL
5050: 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 ITTABLE) \. ((
5060: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 LIST)->flags |=
5070: 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 __VA_REGISTER_ST
5080: 52 55 43 54 5f 52 45 54 55 52 4e 2c 09 09 09 09 RUCT_RETURN,....
5090: 5c 0a 20 20 20 30 29 0a 23 65 6e 64 69 66 0a 23 \. 0).#endif.#
50a0: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 if defined(__x86
50b0: 5f 36 34 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f _64__).#define _
50c0: 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 _va_reg_struct_r
50d0: 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f eturn(LIST,TYPE_
50e0: 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 SIZE,TYPE_SPLITT
50f0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 50 ABLE) \. ((TYP
5100: 45 5f 53 49 5a 45 29 20 3c 3d 20 31 36 29 0a 2f E_SIZE) <= 16)./
5110: 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 * Turn on __VA_R
5120: 45 47 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 EGISTER_STRUCT_R
5130: 45 54 55 52 4e 20 69 66 20 5f 5f 56 41 5f 53 4d ETURN if __VA_SM
5140: 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 54 55 52 ALL_STRUCT_RETUR
5150: 4e 20 77 61 73 20 73 65 74 0a 20 2a 20 61 6e 64 N was set. * and
5160: 20 74 68 65 20 73 74 72 75 63 74 20 77 69 6c 6c the struct will
5170: 20 61 63 74 75 61 6c 6c 79 20 62 65 20 72 65 74 actually be ret
5180: 75 72 6e 65 64 20 69 6e 20 72 65 67 69 73 74 65 urned in registe
5190: 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 rs.. */.#define
51a0: 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 __va_start_struc
51b0: 74 31 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a t1(LIST,TYPE_SIZ
51c0: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 E,TYPE_ALIGN,TYP
51d0: 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c E_SPLITTABLE) \
51e0: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 . ((LIST)->flag
51f0: 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 53 54 s |= __VA_REGIST
5200: 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e ER_STRUCT_RETURN
5210: 2c 09 09 09 09 5c 0a 20 20 20 30 29 0a 23 65 6e ,....\. 0).#en
5220: 64 69 66 0a 2f 2a 0a 20 2a 20 50 72 65 70 61 72 dif./*. * Prepar
5230: 69 6e 67 20 73 74 72 75 63 74 75 72 65 20 72 65 ing structure re
5240: 74 75 72 6e 20 69 6e 20 6d 65 6d 6f 72 79 2e 0a turn in memory..
5250: 20 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 */.#if defined(
5260: 5f 5f 69 33 38 36 5f 5f 29 0a 2f 2a 20 52 65 74 __i386__)./* Ret
5270: 75 72 6e 20 73 74 72 75 63 74 75 72 65 20 70 6f urn structure po
5280: 69 6e 74 65 72 20 69 73 20 70 61 73 73 65 64 20 inter is passed
5290: 69 6e 20 61 20 73 70 65 63 69 61 6c 20 72 65 67 in a special reg
52a0: 69 73 74 65 72 20 6f 72 20 61 73 20 66 69 72 73 ister or as firs
52b0: 74 20 61 72 67 2e 20 2a 2f 0a 23 64 65 66 69 6e t arg. */.#defin
52c0: 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 e __va_start_str
52d0: 75 63 74 32 28 4c 49 53 54 29 20 20 5c 0a 20 20 uct2(LIST) \.
52e0: 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 ((LIST)->flags &
52f0: 20 5f 5f 56 41 5f 4e 45 58 54 47 43 43 5f 53 54 __VA_NEXTGCC_ST
5300: 52 55 43 54 5f 52 45 54 55 52 4e 09 09 09 09 5c RUCT_RETURN....\
5310: 0a 20 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 72 . ? ((LIST)->r
5320: 61 64 64 72 20 3d 20 28 4c 49 53 54 29 2d 3e 73 addr = (LIST)->s
5330: 74 72 75 63 74 72 61 64 64 72 2c 20 30 29 09 20 tructraddr, 0).
5340: 2f 2a 20 73 70 65 63 69 61 6c 20 72 65 67 69 73 /* special regis
5350: 74 65 72 20 2a 2f 09 5c 0a 20 20 20 3a 20 28 28 ter */.\. : ((
5360: 4c 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 2a LIST)->raddr = *
5370: 28 76 6f 69 64 2a 20 2a 29 28 28 4c 49 53 54 29 (void* *)((LIST)
5380: 2d 3e 61 70 74 72 29 2c 09 09 2f 2a 20 66 69 72 ->aptr),../* fir
5390: 73 74 20 61 72 67 20 2a 2f 09 5c 0a 20 20 20 20 st arg */.\.
53a0: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
53b0: 3d 20 73 69 7a 65 6f 66 28 76 6f 69 64 2a 29 2c = sizeof(void*),
53c0: 09 09 09 09 09 5c 0a 20 20 20 20 20 20 30 09 09 .....\. 0..
53d0: 09 09 09 09 09 09 09 5c 0a 20 20 29 20 20 29 0a .......\. ) ).
53e0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
53f0: 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c ed(__alpha__) ||
5400: 20 64 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f defined(__arm__
5410: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 72 ) || defined(__r
5420: 73 36 30 30 30 5f 5f 29 20 7c 7c 20 64 65 66 69 s6000__) || defi
5430: 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 ned(__convex__)
5440: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 || defined(__s3
5450: 39 30 5f 5f 29 0a 2f 2a 20 52 65 74 75 72 6e 20 90__)./* Return
5460: 73 74 72 75 63 74 75 72 65 20 70 6f 69 6e 74 65 structure pointe
5470: 72 20 69 73 20 70 61 73 73 65 64 20 61 73 20 66 r is passed as f
5480: 69 72 73 74 20 61 72 67 2e 20 2a 2f 0a 23 64 65 irst arg. */.#de
5490: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
54a0: 73 74 72 75 63 74 32 28 4c 49 53 54 29 20 20 5c struct2(LIST) \
54b0: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 . ((LIST)->radd
54c0: 72 20 3d 20 2a 28 76 6f 69 64 2a 20 2a 29 28 28 r = *(void* *)((
54d0: 4c 49 53 54 29 2d 3e 61 70 74 72 29 2c 09 09 09 LIST)->aptr),...
54e0: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 .\. (LIST)->ap
54f0: 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 76 6f 69 tr += sizeof(voi
5500: 64 2a 29 2c 09 09 09 09 09 5c 0a 20 20 20 30 09 d*),.....\. 0.
5510: 09 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 ........\. ).#e
5520: 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 ndif.#if defined
5530: 28 5f 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 64 65 (__mips__) || de
5540: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f fined(__mipsn32_
5550: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
5560: 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 66 mips64__) || def
5570: 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f ined(__sparc64__
5580: 29 0a 2f 2a 20 52 65 74 75 72 6e 20 73 74 72 75 )./* Return stru
5590: 63 74 75 72 65 20 70 6f 69 6e 74 65 72 20 69 73 cture pointer is
55a0: 20 70 61 73 73 65 64 20 61 73 20 66 69 72 73 74 passed as first
55b0: 20 61 72 67 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 arg. */.#define
55c0: 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 __va_start_stru
55d0: 63 74 32 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 ct2(LIST) \. (
55e0: 28 4c 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 (LIST)->raddr =
55f0: 2a 28 76 6f 69 64 2a 20 2a 29 28 28 4c 49 53 54 *(void* *)((LIST
5600: 29 2d 3e 61 70 74 72 29 2c 09 09 09 09 5c 0a 20 )->aptr),....\.
5610: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
5620: 3d 20 73 69 7a 65 6f 66 28 76 6f 69 64 2a 29 2c = sizeof(void*),
5630: 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 .....\. (LIST)
5640: 2d 3e 61 6e 75 6d 2b 2b 2c 09 09 09 09 09 09 09 ->anum++,.......
5650: 5c 0a 20 20 20 30 09 09 09 09 09 09 09 09 09 5c \. 0.........\
5660: 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 . ).#endif.#if
5670: 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 defined(__x86_64
5680: 5f 5f 29 0a 2f 2a 20 52 65 74 75 72 6e 20 73 74 __)./* Return st
5690: 72 75 63 74 75 72 65 20 70 6f 69 6e 74 65 72 20 ructure pointer
56a0: 69 73 20 70 61 73 73 65 64 20 61 73 20 66 69 72 is passed as fir
56b0: 73 74 20 61 72 67 2e 20 2a 2f 0a 23 64 65 66 69 st arg. */.#defi
56c0: 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 ne __va_start_st
56d0: 72 75 63 74 32 28 4c 49 53 54 29 20 20 5c 0a 20 ruct2(LIST) \.
56e0: 20 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 72 20 ((LIST)->raddr
56f0: 3d 20 28 76 6f 69 64 20 2a 29 28 2a 28 4c 49 53 = (void *)(*(LIS
5700: 54 29 2d 3e 6d 65 6d 69 61 72 67 70 74 72 2b 2b T)->memiargptr++
5710: 29 2c 09 09 09 5c 0a 20 20 20 30 09 09 09 09 09 ),...\. 0.....
5720: 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 ....\. ).#endif
5730: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
5740: 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 68k__) || (defin
5750: 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 ed(__sparc__) &&
5760: 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 !defined(__spar
5770: 63 36 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e c64__)) || defin
5780: 65 64 28 5f 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 ed(__hppa__) ||
5790: 64 65 66 69 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f defined(__m88k__
57a0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 69 ) || defined(__i
57b0: 61 36 34 5f 5f 29 0a 2f 2a 20 52 65 74 75 72 6e a64__)./* Return
57c0: 20 73 74 72 75 63 74 75 72 65 20 70 6f 69 6e 74 structure point
57d0: 65 72 20 69 73 20 70 61 73 73 65 64 20 69 6e 20 er is passed in
57e0: 61 20 73 70 65 63 69 61 6c 20 72 65 67 69 73 74 a special regist
57f0: 65 72 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f er. */.#define _
5800: 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 _va_start_struct
5810: 32 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 2(LIST) \. ((L
5820: 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 28 4c IST)->raddr = (L
5830: 49 53 54 29 2d 3e 73 74 72 75 63 74 72 61 64 64 IST)->structradd
5840: 72 2c 20 30 29 0a 23 65 6e 64 69 66 0a 0a 0a 2f r, 0).#endif.../
5850: 2a 0a 20 2a 20 44 65 66 69 6e 69 74 69 6f 6e 20 *. * Definition
5860: 6f 66 20 74 68 65 20 76 61 5f 61 72 67 5f 78 78 of the va_arg_xx
5870: 78 20 6d 61 63 72 6f 73 2e 0a 20 2a 2f 0a 0a 2f x macros.. */../
5880: 2a 20 50 61 64 64 69 6e 67 20 6f 66 20 6e 6f 6e * Padding of non
5890: 2d 73 74 72 75 63 74 20 61 72 67 75 6d 65 6e 74 -struct argument
58a0: 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f s. */.#define __
58b0: 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f va_argsize(TYPE_
58c0: 53 49 5a 45 29 20 20 5c 0a 20 20 28 28 28 54 59 SIZE) \. (((TY
58d0: 50 45 5f 53 49 5a 45 29 20 2b 20 73 69 7a 65 6f PE_SIZE) + sizeo
58e0: 66 28 5f 5f 76 61 77 6f 72 64 29 2d 31 29 20 26 f(__vaword)-1) &
58f0: 20 2d 28 6c 6f 6e 67 29 73 69 7a 65 6f 66 28 5f -(long)sizeof(_
5900: 5f 76 61 77 6f 72 64 29 29 0a 23 69 66 20 64 65 _vaword)).#if de
5910: 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 fined(__i386__)
5920: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 || defined(__m68
5930: 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 k__) || defined(
5940: 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 20 21 64 65 __mips__) && !de
5950: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f fined(__mipsn32_
5960: 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f _) || (defined(_
5970: 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 _sparc__) && !de
5980: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
5990: 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f _)) || defined(_
59a0: 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 _alpha__) || def
59b0: 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c ined(__arm__) ||
59c0: 20 28 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 30 (defined(__rs60
59d0: 30 30 5f 5f 29 20 26 26 20 28 64 65 66 69 6e 65 00__) && (define
59e0: 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 69 d(_AIX) || (defi
59f0: 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 ned(__MACH__) &&
5a00: 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 defined(__APPLE
5a10: 5f 5f 29 29 29 29 20 7c 7c 20 64 65 66 69 6e 65 __)))) || define
5a20: 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 d(__m88k__) || d
5a30: 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 5f efined(__convex_
5a40: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
5a50: 69 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e ia64__) || defin
5a60: 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a 2f ed(__x86_64__)./
5a70: 2a 20 61 72 67 73 20 67 72 6f 77 20 75 70 20 2a * args grow up *
5a80: 2f 0a 2f 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 /./* small struc
5a90: 74 75 72 65 73 20 3c 20 31 20 77 6f 72 64 20 61 tures < 1 word a
5aa0: 72 65 20 61 64 6a 75 73 74 65 64 20 64 65 70 65 re adjusted depe
5ab0: 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 nding on compile
5ac0: 72 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 r */.#define __v
5ad0: 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 a_arg_leftadjust
5ae0: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
5af0: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
5b00: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 . ((LIST)->aptr
5b10: 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 += __va_argsize
5b20: 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 (TYPE_SIZE),....
5b30: 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 \. (LIST)->apt
5b40: 72 20 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 r - __va_argsize
5b50: 28 54 59 50 45 5f 53 49 5a 45 29 09 09 09 09 5c (TYPE_SIZE)....\
5b60: 0a 20 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . ).#define __v
5b70: 61 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 a_arg_rightadjus
5b80: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
5b90: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 ZE,TYPE_ALIGN)
5ba0: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 \. ((LIST)->apt
5bb0: 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a r += __va_argsiz
5bc0: 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 e(TYPE_SIZE),...
5bd0: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 .\. (LIST)->ap
5be0: 74 72 20 2d 20 28 28 54 59 50 45 5f 53 49 5a 45 tr - ((TYPE_SIZE
5bf0: 29 20 3c 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 ) < sizeof(__vaw
5c00: 6f 72 64 29 09 09 09 5c 0a 09 09 20 20 20 3f 20 ord)...\... ?
5c10: 28 54 59 50 45 5f 53 49 5a 45 29 09 09 09 09 09 (TYPE_SIZE).....
5c20: 5c 0a 09 09 20 20 20 3a 20 5f 5f 76 61 5f 61 72 \... : __va_ar
5c30: 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 gsize(TYPE_SIZE)
5c40: 09 09 09 09 5c 0a 09 09 20 20 29 09 09 09 09 09 ....\... ).....
5c50: 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 ..\. ).#endif.#
5c60: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 if defined(__rs6
5c70: 30 30 30 5f 5f 29 20 26 26 20 21 28 64 65 66 69 000__) && !(defi
5c80: 6e 65 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 ned(_AIX) || (de
5c90: 66 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 fined(__MACH__)
5ca0: 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 && defined(__APP
5cb0: 4c 45 5f 5f 29 29 29 0a 2f 2a 20 61 72 67 73 20 LE__)))./* args
5cc0: 67 72 6f 77 20 75 70 20 2a 2f 0a 2f 2a 20 73 6d grow up */./* sm
5cd0: 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 3c all structures <
5ce0: 20 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a 75 1 word are adju
5cf0: 73 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 6f sted depending o
5d00: 6e 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 2f 2a n compiler */./*
5d10: 20 41 6c 73 6f 20 6d 61 6b 65 20 73 75 72 65 20 Also make sure
5d20: 77 65 20 73 77 69 74 63 68 20 74 6f 20 74 68 65 we switch to the
5d30: 20 73 74 61 63 6b 20 70 6f 69 6e 74 65 72 20 61 stack pointer a
5d40: 66 74 65 72 20 38 20 61 72 67 73 20 2a 2f 0a 23 fter 8 args */.#
5d50: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
5d60: 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 leftadjusted(LIS
5d70: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
5d80: 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 28 _ALIGN) \. (((
5d90: 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 (LIST)->onstack
5da0: 3d 3d 20 30 20 26 26 20 28 4c 49 53 54 29 2d 3e == 0 && (LIST)->
5db0: 61 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 aptr >= (long)&(
5dc0: 4c 49 53 54 29 2d 3e 72 65 67 61 72 67 5b 38 5d LIST)->regarg[8]
5dd0: 29 09 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 ).\. ? ((LIST
5de0: 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c )->onstack=1, (L
5df0: 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 IST)->aptr = (LI
5e00: 53 54 29 2d 3e 73 61 70 74 72 29 20 3a 20 30 29 ST)->saptr) : 0)
5e10: 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ,..\. (LIST)->
5e20: 61 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 aptr += __va_arg
5e30: 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2c size(TYPE_SIZE),
5e40: 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d ....\. (LIST)-
5e50: 3e 61 70 74 72 20 2d 20 5f 5f 76 61 5f 61 72 67 >aptr - __va_arg
5e60: 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 09 size(TYPE_SIZE).
5e70: 09 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 ...\. ).#define
5e80: 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 61 __va_arg_righta
5e90: 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 djusted(LIST,TYP
5ea0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
5eb0: 4e 29 20 20 5c 0a 20 20 28 28 28 28 4c 49 53 54 N) \. ((((LIST
5ec0: 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 20 )->onstack == 0
5ed0: 26 26 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 && (LIST)->aptr
5ee0: 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c 49 53 54 29 >= (long)&(LIST)
5ef0: 2d 3e 72 65 67 61 72 67 5b 38 5d 29 09 5c 0a 20 ->regarg[8]).\.
5f00: 20 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6f 6e ? ((LIST)->on
5f10: 73 74 61 63 6b 3d 31 2c 20 28 4c 49 53 54 29 2d stack=1, (LIST)-
5f20: 3e 61 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e >aptr = (LIST)->
5f30: 73 61 70 74 72 29 20 3a 20 30 29 2c 09 09 5c 0a saptr) : 0),..\.
5f40: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
5f50: 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 += __va_argsize(
5f60: 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 5c TYPE_SIZE),....\
5f70: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
5f80: 20 2d 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 - ((TYPE_SIZE)
5f90: 3c 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 < sizeof(__vawor
5fa0: 64 29 09 09 09 5c 0a 09 09 20 20 20 3f 20 28 54 d)...\... ? (T
5fb0: 59 50 45 5f 53 49 5a 45 29 09 09 09 09 09 5c 0a YPE_SIZE).....\.
5fc0: 09 09 20 20 20 3a 20 5f 5f 76 61 5f 61 72 67 73 .. : __va_args
5fd0: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 09 09 ize(TYPE_SIZE)..
5fe0: 09 09 5c 0a 09 09 20 20 29 09 09 09 09 09 09 09 ..\... ).......
5ff0: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
6000: 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f defined(__s390_
6010: 5f 29 0a 2f 2a 20 61 72 67 73 20 67 72 6f 77 20 _)./* args grow
6020: 75 70 20 2a 2f 0a 2f 2a 20 73 6d 61 6c 6c 20 73 up */./* small s
6030: 74 72 75 63 74 75 72 65 73 20 3c 20 31 20 77 6f tructures < 1 wo
6040: 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 rd are adjusted
6050: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d depending on com
6060: 70 69 6c 65 72 20 2a 2f 0a 2f 2a 20 41 6c 73 6f piler */./* Also
6070: 20 6d 61 6b 65 20 73 75 72 65 20 77 65 20 73 77 make sure we sw
6080: 69 74 63 68 20 74 6f 20 74 68 65 20 73 74 61 63 itch to the stac
6090: 6b 20 70 6f 69 6e 74 65 72 20 61 66 74 65 72 20 k pointer after
60a0: 35 20 61 72 67 73 20 2a 2f 0a 23 64 65 66 69 6e 5 args */.#defin
60b0: 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 e __va_arg_lefta
60c0: 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 djusted(LIST,TYP
60d0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
60e0: 4e 29 20 20 5c 0a 20 20 28 28 28 28 4c 49 53 54 N) \. ((((LIST
60f0: 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 20 )->onstack == 0
6100: 26 26 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 && (LIST)->aptr
6110: 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c 49 53 54 29 >= (long)&(LIST)
6120: 2d 3e 72 65 67 61 72 67 5b 35 5d 29 09 5c 0a 20 ->regarg[5]).\.
6130: 20 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6f 6e ? ((LIST)->on
6140: 73 74 61 63 6b 3d 31 2c 20 28 4c 49 53 54 29 2d stack=1, (LIST)-
6150: 3e 61 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e >aptr = (LIST)->
6160: 73 61 70 74 72 29 20 3a 20 30 29 2c 09 09 5c 0a saptr) : 0),..\.
6170: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
6180: 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 += __va_argsize(
6190: 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 5c TYPE_SIZE),....\
61a0: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
61b0: 20 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 - __va_argsize(
61c0: 54 59 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a TYPE_SIZE)....\.
61d0: 20 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 ).#define __va
61e0: 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 _arg_rightadjust
61f0: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
6200: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
6210: 0a 20 20 28 28 28 28 28 4c 49 53 54 29 2d 3e 6f . (((((LIST)->o
6220: 6e 73 74 61 63 6b 20 3d 3d 20 30 20 26 26 20 28 nstack == 0 && (
6230: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3e 3d 20 (LIST)->aptr >=
6240: 28 6c 6f 6e 67 29 26 28 4c 49 53 54 29 2d 3e 72 (long)&(LIST)->r
6250: 65 67 61 72 67 5b 35 5d 29 29 20 5c 0a 20 20 20 egarg[5])) \.
6260: 7c 7c 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 || ((TYPE_SIZE)
6270: 3e 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 > sizeof(__vawor
6280: 64 29 20 26 26 20 28 4c 49 53 54 29 2d 3e 61 70 d) && (LIST)->ap
6290: 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 26 28 4c 49 tr >= (long)&(LI
62a0: 53 54 29 2d 3e 72 65 67 61 72 67 5b 34 5d 29 29 ST)->regarg[4]))
62b0: 20 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 \. ? ((LIST)
62c0: 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 4c 49 ->onstack=1, (LI
62d0: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 53 ST)->aptr = (LIS
62e0: 54 29 2d 3e 73 61 70 74 72 29 20 3a 20 30 29 2c T)->saptr) : 0),
62f0: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
6300: 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 73 ptr += __va_args
6310: 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 ize(TYPE_SIZE),.
6320: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
6330: 61 70 74 72 20 2d 20 28 28 54 59 50 45 5f 53 49 aptr - ((TYPE_SI
6340: 5a 45 29 20 3c 20 73 69 7a 65 6f 66 28 5f 5f 76 ZE) < sizeof(__v
6350: 61 77 6f 72 64 29 09 09 09 5c 0a 09 09 20 20 20 aword)...\...
6360: 3f 20 28 54 59 50 45 5f 53 49 5a 45 29 09 09 09 ? (TYPE_SIZE)...
6370: 09 09 5c 0a 09 09 20 20 20 3a 20 5f 5f 76 61 5f ..\... : __va_
6380: 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a argsize(TYPE_SIZ
6390: 45 29 09 09 09 09 5c 0a 09 09 20 20 29 09 09 09 E)....\... )...
63a0: 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 ....\. ).#endif
63b0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d .#if defined(__m
63c0: 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 ipsn32__) || def
63d0: 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 ined(__mips64__)
63e0: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 || defined(__sp
63f0: 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 61 72 67 73 arc64__)./* args
6400: 20 67 72 6f 77 20 75 70 20 2a 2f 0a 2f 2a 20 73 grow up */./* s
6410: 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 mall structures
6420: 3c 20 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a < 1 word are adj
6430: 75 73 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 usted depending
6440: 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 23 on compiler */.#
6450: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
6460: 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 leftadjusted(LIS
6470: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
6480: 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c _ALIGN) \. ((L
6490: 49 53 54 29 2d 3e 61 6e 75 6d 20 2b 3d 20 5f 5f IST)->anum += __
64a0: 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f va_argsize(TYPE_
64b0: 53 49 5a 45 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 SIZE)/sizeof(__v
64c0: 61 77 6f 72 64 29 2c 09 09 5c 0a 20 20 20 28 4c aword),..\. (L
64d0: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f IST)->aptr += __
64e0: 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f va_argsize(TYPE_
64f0: 53 49 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 SIZE),....\. (
6500: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f LIST)->aptr - __
6510: 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f va_argsize(TYPE_
6520: 53 49 5a 45 29 09 09 09 09 5c 0a 20 20 29 0a 23 SIZE)....\. ).#
6530: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
6540: 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 rightadjusted(LI
6550: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
6560: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 E_ALIGN) \. ((
6570: 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2b 3d 20 5f LIST)->anum += _
6580: 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 _va_argsize(TYPE
6590: 5f 53 49 5a 45 29 2f 73 69 7a 65 6f 66 28 5f 5f _SIZE)/sizeof(__
65a0: 76 61 77 6f 72 64 29 2c 09 09 5c 0a 20 20 20 28 vaword),..\. (
65b0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 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 09 09 5c 0a 20 20 20 _SIZE),....\.
65e0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 (LIST)->aptr - (
65f0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3c 20 73 69 (TYPE_SIZE) < si
6600: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 09 09 zeof(__vaword)..
6610: 09 5c 0a 09 09 20 20 20 3f 20 28 54 59 50 45 5f .\... ? (TYPE_
6620: 53 49 5a 45 29 09 09 09 09 09 5c 0a 09 09 20 20 SIZE).....\...
6630: 20 3a 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 : __va_argsize(
6640: 54 59 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a TYPE_SIZE)....\.
6650: 09 09 20 20 29 09 09 09 09 09 09 09 5c 0a 20 20 .. ).......\.
6660: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
6670: 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a 2f ined(__hppa__)./
6680: 2a 20 61 72 67 73 20 67 72 6f 77 20 64 6f 77 6e * args grow down
6690: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
66a0: 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 _arg_leftadjuste
66b0: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
66c0: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
66d0: 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 ((LIST)->aptr
66e0: 3d 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d = (LIST)->aptr -
66f0: 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 __va_argsize(TY
6700: 50 45 5f 53 49 5a 45 29 2c 09 09 5c 0a 20 20 20 PE_SIZE),..\.
6710: 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3e 20 34 ((TYPE_SIZE) > 4
6720: 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 && ((LIST)->apt
6730: 72 20 26 3d 20 2d 38 29 29 2c 09 09 09 09 5c 0a r &= -8)),....\.
6740: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 09 (LIST)->aptr.
6750: 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 64 65 .......\. ).#de
6760: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 72 69 fine __va_arg_ri
6770: 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 ghtadjusted(LIST
6780: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
6790: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c 49 ALIGN) \. ((LI
67a0: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 53 ST)->aptr = (LIS
67b0: 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f 76 61 5f T)->aptr - __va_
67c0: 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a argsize(TYPE_SIZ
67d0: 45 29 2c 09 09 5c 0a 20 20 20 28 28 54 59 50 45 E),..\. ((TYPE
67e0: 5f 53 49 5a 45 29 20 3e 20 34 20 26 26 20 28 28 _SIZE) > 4 && ((
67f0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 26 3d 20 2d LIST)->aptr &= -
6800: 38 29 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 8)),....\. (LI
6810: 53 54 29 2d 3e 61 70 74 72 20 2b 20 28 28 2d 28 ST)->aptr + ((-(
6820: 54 59 50 45 5f 53 49 5a 45 29 29 20 26 20 33 29 TYPE_SIZE)) & 3)
6830: 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 .....\. ).#endi
6840: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
6850: 69 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e i386__) || defin
6860: 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c ed(__alpha__) ||
6870: 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f defined(__ia64_
6880: 5f 29 0a 2f 2a 20 6c 69 74 74 6c 65 20 65 6e 64 _)./* little end
6890: 69 61 6e 20 2d 3e 20 73 6d 61 6c 6c 20 61 72 67 ian -> small arg
68a0: 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 61 s < 1 word are a
68b0: 64 6a 75 73 74 65 64 20 74 6f 20 74 68 65 20 6c djusted to the l
68c0: 65 66 74 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f eft */.#define _
68d0: 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 65 64 _va_arg_adjusted
68e0: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
68f0: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
6900: 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 __va_arg_leftad
6910: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
6920: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
6930: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
6940: 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c ined(__m68k__) |
6950: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 | defined(__mips
6960: 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 n32__) || define
6970: 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c d(__mips64__) ||
6980: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
6990: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
69a0: 5f 73 70 61 72 63 36 34 5f 5f 29 20 7c 7c 20 64 _sparc64__) || d
69b0: 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 efined(__hppa__)
69c0: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 72 || defined(__ar
69d0: 6d 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 m__) || defined(
69e0: 5f 5f 72 73 36 30 30 30 5f 5f 29 20 7c 7c 20 64 __rs6000__) || d
69f0: 65 66 69 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 efined(__m88k__)
6a00: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f || defined(__co
6a10: 6e 76 65 78 5f 5f 29 20 7c 7c 20 64 65 66 69 6e nvex__) || defin
6a20: 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 ed(__s390__)./*
6a30: 62 69 67 20 65 6e 64 69 61 6e 20 2d 3e 20 73 6d big endian -> sm
6a40: 61 6c 6c 20 61 72 67 73 20 3c 20 31 20 77 6f 72 all args < 1 wor
6a50: 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 74 d are adjusted t
6a60: 6f 20 74 68 65 20 72 69 67 68 74 20 2a 2f 0a 23 o the right */.#
6a70: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
6a80: 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 adjusted(LIST,TY
6a90: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 PE_SIZE,TYPE_ALI
6aa0: 47 4e 29 20 20 5c 0a 20 20 5f 5f 76 61 5f 61 72 GN) \. __va_ar
6ab0: 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 g_rightadjusted(
6ac0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
6ad0: 59 50 45 5f 41 4c 49 47 4e 29 0a 23 65 6e 64 69 YPE_ALIGN).#endi
6ae0: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
6af0: 6d 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 mips__) && !defi
6b00: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
6b10: 0a 2f 2a 20 62 69 67 20 65 6e 64 69 61 6e 20 2d ./* big endian -
6b20: 3e 20 73 6d 61 6c 6c 20 61 72 67 73 20 3c 20 31 > small args < 1
6b30: 20 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 74 word are adjust
6b40: 65 64 20 74 6f 20 74 68 65 20 72 69 67 68 74 20 ed to the right
6b50: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
6b60: 61 72 67 5f 61 64 6a 75 73 74 65 64 28 4c 49 53 arg_adjusted(LIS
6b70: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
6b80: 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c _ALIGN) \. ((L
6b90: 49 53 54 29 2d 3e 61 6e 75 6d 2b 2b 2c 20 5f 5f IST)->anum++, __
6ba0: 76 61 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 va_arg_rightadju
6bb0: 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 sted(LIST,TYPE_S
6bc0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 29 IZE,TYPE_ALIGN))
6bd0: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
6be0: 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a ned(__x86_64__).
6bf0: 2f 2a 20 74 68 65 20 66 69 72 73 74 20 36 20 61 /* the first 6 a
6c00: 72 67 75 6d 65 6e 74 20 77 6f 72 64 73 20 61 72 rgument words ar
6c10: 65 20 70 61 73 73 65 64 20 69 6e 20 72 65 67 69 e passed in regi
6c20: 73 74 65 72 73 20 2a 2f 0a 23 64 65 66 69 6e 65 sters */.#define
6c30: 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 __va_arg_adjust
6c40: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
6c50: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
6c60: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 69 . ((LIST)->memi
6c70: 61 72 67 70 74 72 20 2b 20 28 28 54 59 50 45 5f argptr + ((TYPE_
6c80: 53 49 5a 45 29 20 2b 20 73 69 7a 65 6f 66 28 5f SIZE) + sizeof(_
6c90: 5f 76 61 77 6f 72 64 29 2d 31 29 20 2f 20 73 69 _vaword)-1) / si
6ca0: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3c zeof(__vaword) <
6cb0: 3d 20 26 28 4c 49 53 54 29 2d 3e 69 61 72 67 5b = &(LIST)->iarg[
6cc0: 36 5d 20 5c 0a 20 20 20 3f 20 28 28 4c 49 53 54 6] \. ? ((LIST
6cd0: 29 2d 3e 6d 65 6d 69 61 72 67 70 74 72 20 2b 3d )->memiargptr +=
6ce0: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 2b 20 ((TYPE_SIZE) +
6cf0: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
6d00: 2d 31 29 20 2f 20 73 69 7a 65 6f 66 28 5f 5f 76 -1) / sizeof(__v
6d10: 61 77 6f 72 64 29 2c 20 5c 0a 20 20 20 20 20 20 aword), \.
6d20: 28 4c 49 53 54 29 2d 3e 6d 65 6d 69 61 72 67 70 (LIST)->memiargp
6d30: 74 72 20 2d 20 28 28 54 59 50 45 5f 53 49 5a 45 tr - ((TYPE_SIZE
6d40: 29 20 2b 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 ) + sizeof(__vaw
6d50: 6f 72 64 29 2d 31 29 20 2f 20 73 69 7a 65 6f 66 ord)-1) / sizeof
6d60: 28 5f 5f 76 61 77 6f 72 64 29 20 5c 0a 20 20 20 (__vaword) \.
6d70: 20 20 29 09 09 09 09 09 09 09 09 09 5c 0a 20 20 ).........\.
6d80: 20 3a 20 28 76 6f 69 64 2a 29 5f 5f 76 61 5f 61 : (void*)__va_a
6d90: 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 rg_leftadjusted(
6da0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
6db0: 59 50 45 5f 41 4c 49 47 4e 29 09 09 5c 0a 20 20 YPE_ALIGN)..\.
6dc0: 29 0a 23 65 6e 64 69 66 0a 23 64 65 66 69 6e 65 ).#endif.#define
6dd0: 20 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 54 __va_arg(LIST,T
6de0: 59 50 45 29 20 20 5c 0a 20 20 2a 28 54 59 50 45 YPE) \. *(TYPE
6df0: 2a 29 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 *)__va_arg_adjus
6e00: 74 65 64 28 4c 49 53 54 2c 73 69 7a 65 6f 66 28 ted(LIST,sizeof(
6e10: 54 59 50 45 29 2c 5f 5f 56 41 5f 61 6c 69 67 6e TYPE),__VA_align
6e20: 6f 66 28 54 59 50 45 29 29 0a 0a 2f 2a 20 49 6e of(TYPE))../* In
6e30: 74 65 67 65 72 20 61 72 67 75 6d 65 6e 74 73 2e teger arguments.
6e40: 20 2a 2f 0a 0a 23 64 65 66 69 6e 65 20 76 61 5f */..#define va_
6e50: 61 72 67 5f 63 68 61 72 28 4c 49 53 54 29 09 5f arg_char(LIST)._
6e60: 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 63 68 61 _va_arg(LIST,cha
6e70: 72 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 r).#define va_ar
6e80: 67 5f 73 63 68 61 72 28 4c 49 53 54 29 09 5f 5f g_schar(LIST).__
6e90: 76 61 5f 61 72 67 28 4c 49 53 54 2c 73 69 67 6e va_arg(LIST,sign
6ea0: 65 64 20 63 68 61 72 29 0a 23 64 65 66 69 6e 65 ed char).#define
6eb0: 20 76 61 5f 61 72 67 5f 75 63 68 61 72 28 4c 49 va_arg_uchar(LI
6ec0: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
6ed0: 54 2c 75 6e 73 69 67 6e 65 64 20 63 68 61 72 29 T,unsigned char)
6ee0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
6ef0: 73 68 6f 72 74 28 4c 49 53 54 29 09 5f 5f 76 61 short(LIST).__va
6f00: 5f 61 72 67 28 4c 49 53 54 2c 73 68 6f 72 74 29 _arg(LIST,short)
6f10: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
6f20: 75 73 68 6f 72 74 28 4c 49 53 54 29 09 5f 5f 76 ushort(LIST).__v
6f30: 61 5f 61 72 67 28 4c 49 53 54 2c 75 6e 73 69 67 a_arg(LIST,unsig
6f40: 6e 65 64 20 73 68 6f 72 74 29 0a 23 64 65 66 69 ned short).#defi
6f50: 6e 65 20 76 61 5f 61 72 67 5f 69 6e 74 28 4c 49 ne va_arg_int(LI
6f60: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
6f70: 54 2c 69 6e 74 29 0a 23 64 65 66 69 6e 65 20 76 T,int).#define v
6f80: 61 5f 61 72 67 5f 75 69 6e 74 28 4c 49 53 54 29 a_arg_uint(LIST)
6f90: 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 75 .__va_arg(LIST,u
6fa0: 6e 73 69 67 6e 65 64 20 69 6e 74 29 0a 23 64 65 nsigned int).#de
6fb0: 66 69 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 fine va_arg_long
6fc0: 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 (LIST).__va_arg(
6fd0: 4c 49 53 54 2c 6c 6f 6e 67 29 0a 23 64 65 66 69 LIST,long).#defi
6fe0: 6e 65 20 76 61 5f 61 72 67 5f 75 6c 6f 6e 67 28 ne va_arg_ulong(
6ff0: 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c LIST).__va_arg(L
7000: 49 53 54 2c 75 6e 73 69 67 6e 65 64 20 6c 6f 6e IST,unsigned lon
7010: 67 29 0a 0a 23 69 66 20 64 65 66 69 6e 65 64 28 g)..#if defined(
7020: 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 __mips64__) || d
7030: 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 efined(__sparc64
7040: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7050: 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 _alpha__) || def
7060: 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 7c ined(__ia64__) |
7070: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f | defined(__x86_
7080: 36 34 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 64__)./* `long l
7090: 6f 6e 67 27 20 61 6e 64 20 60 6c 6f 6e 67 27 20 ong' and `long'
70a0: 61 72 65 20 69 64 65 6e 74 69 63 61 6c 2e 20 2a are identical. *
70b0: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
70c0: 5f 6c 6f 6e 67 6c 6f 6e 67 09 09 76 61 5f 61 72 _longlong..va_ar
70d0: 67 5f 6c 6f 6e 67 0a 23 64 65 66 69 6e 65 20 76 g_long.#define v
70e0: 61 5f 61 72 67 5f 75 6c 6f 6e 67 6c 6f 6e 67 09 a_arg_ulonglong.
70f0: 76 61 5f 61 72 67 5f 75 6c 6f 6e 67 0a 23 65 6c va_arg_ulong.#el
7100: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
7110: 73 6e 33 32 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 sn32__)./* `long
7120: 20 6c 6f 6e 67 27 20 66 69 74 73 20 69 6e 20 5f long' fits in _
7130: 5f 76 61 77 6f 72 64 2e 20 2a 2f 0a 23 64 65 66 _vaword. */.#def
7140: 69 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c ine va_arg_longl
7150: 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 ong(LIST).__va_a
7160: 72 67 28 4c 49 53 54 2c 6c 6f 6e 67 20 6c 6f 6e rg(LIST,long lon
7170: 67 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 g).#define va_ar
7180: 67 5f 75 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 g_ulonglong(LIST
7190: 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c ).__va_arg(LIST,
71a0: 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 6c 6f unsigned long lo
71b0: 6e 67 29 0a 23 65 6c 69 66 20 64 65 66 69 6e 65 ng).#elif define
71c0: 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 d(__i386__) || d
71d0: 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 efined(__m68k__)
71e0: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
71f0: 70 73 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 ps__) || (define
7200: 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 d(__sparc__) &&
7210: 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 !defined(__sparc
7220: 36 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64__)) || define
7230: 64 28 5f 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 64 d(__hppa__) || d
7240: 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 efined(__arm__)
7250: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 || defined(__rs6
7260: 30 30 30 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 000__) || define
7270: 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 d(__m88k__) || d
7280: 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 5f efined(__convex_
7290: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
72a0: 73 33 39 30 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 s390__)./* `long
72b0: 20 6c 6f 6e 67 27 73 20 61 72 65 20 70 61 73 73 long's are pass
72c0: 65 64 20 65 6d 62 65 64 64 65 64 20 6f 6e 20 74 ed embedded on t
72d0: 68 65 20 61 72 67 20 73 74 61 63 6b 2e 20 2a 2f he arg stack. */
72e0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
72f0: 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 29 09 5f longlong(LIST)._
7300: 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 _va_arg_longlong
7310: 28 4c 49 53 54 2c 6c 6f 6e 67 20 6c 6f 6e 67 29 (LIST,long long)
7320: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
7330: 75 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 29 09 ulonglong(LIST).
7340: 5f 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e __va_arg_longlon
7350: 67 28 4c 49 53 54 2c 75 6e 73 69 67 6e 65 64 20 g(LIST,unsigned
7360: 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 69 66 20 64 long long).#if d
7370: 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 efined(__i386__)
7380: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 || defined(__m6
7390: 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 8k__) || defined
73a0: 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 28 64 65 (__arm__) || (de
73b0: 66 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f fined(__rs6000__
73c0: 29 20 26 26 20 28 64 65 66 69 6e 65 64 28 5f 41 ) && (defined(_A
73d0: 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 IX) || (defined(
73e0: 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 __MACH__) && def
73f0: 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 ined(__APPLE__))
7400: 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f )) || defined(__
7410: 63 6f 6e 76 65 78 5f 5f 29 0a 2f 2a 20 60 6c 6f convex__)./* `lo
7420: 6e 67 20 6c 6f 6e 67 27 73 20 61 72 65 20 28 61 ng long's are (a
7430: 74 20 6d 6f 73 74 29 20 77 6f 72 64 2d 61 6c 69 t most) word-ali
7440: 67 6e 65 64 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 gned. */.#define
7450: 20 5f 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f __va_arg_longlo
7460: 6e 67 28 4c 49 53 54 2c 54 59 50 45 29 09 5f 5f ng(LIST,TYPE).__
7470: 76 61 5f 61 72 67 28 4c 49 53 54 2c 54 59 50 45 va_arg(LIST,TYPE
7480: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
7490: 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 7c ined(__mips__) |
74a0: 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 | (defined(__rs6
74b0: 30 30 30 5f 5f 29 20 26 26 20 21 28 64 65 66 69 000__) && !(defi
74c0: 6e 65 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 ned(_AIX) || (de
74d0: 66 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 fined(__MACH__)
74e0: 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 && defined(__APP
74f0: 4c 45 5f 5f 29 29 29 29 20 7c 7c 20 64 65 66 69 LE__)))) || defi
7500: 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 0a 2f 2a ned(__m88k__)./*
7510: 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 73 20 68 61 `long long's ha
7520: 76 65 20 61 6c 69 67 6e 6d 65 6e 74 20 38 2e 20 ve alignment 8.
7530: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
7540: 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 arg_longlong(LIS
7550: 54 2c 54 59 50 45 29 09 09 09 09 09 5c 0a 20 20 T,TYPE).....\.
7560: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 ((LIST)->aptr =
7570: 28 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 2b 5f (((LIST)->aptr+_
7580: 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 59 50 45 _VA_alignof(TYPE
7590: 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 5f 5f )-1) & -(long)__
75a0: 56 41 5f 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 VA_alignof(TYPE)
75b0: 29 2c 20 5c 0a 20 20 20 5f 5f 76 61 5f 61 72 67 ), \. __va_arg
75c0: 28 4c 49 53 54 2c 54 59 50 45 29 29 0a 23 65 6e (LIST,TYPE)).#en
75d0: 64 69 66 0a 23 69 66 20 28 64 65 66 69 6e 65 64 dif.#if (defined
75e0: 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 (__sparc__) && !
75f0: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
7600: 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 4__)) || defined
7610: 28 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 57 69 (__s390__)./* Wi
7620: 74 68 69 6e 20 74 68 65 20 61 72 67 20 73 74 61 thin the arg sta
7630: 63 6b 2c 20 74 68 65 20 61 6c 69 67 6e 6d 65 6e ck, the alignmen
7640: 74 20 69 73 20 6f 6e 6c 79 20 34 2c 20 6e 6f 74 t is only 4, not
7650: 20 38 2e 20 2a 2f 0a 2f 2a 20 42 65 77 61 72 65 8. */./* Beware
7660: 20 61 67 61 69 6e 73 74 20 75 6e 61 6c 69 67 6e against unalign
7670: 65 64 20 61 63 63 65 73 73 65 73 21 20 2a 2f 0a ed accesses! */.
7680: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 #define __va_arg
7690: 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c 54 _longlong(LIST,T
76a0: 59 50 45 29 09 09 09 09 09 5c 0a 20 20 28 28 4c YPE).....\. ((L
76b0: 49 53 54 29 2d 3e 74 6d 70 2e 5f 77 6f 72 64 73 IST)->tmp._words
76c0: 5b 30 5d 20 3d 20 28 28 5f 5f 76 61 77 6f 72 64 [0] = ((__vaword
76d0: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 *)((LIST)->aptr)
76e0: 29 5b 30 5d 2c 09 09 5c 0a 20 20 20 28 4c 49 53 )[0],..\. (LIS
76f0: 54 29 2d 3e 74 6d 70 2e 5f 77 6f 72 64 73 5b 31 T)->tmp._words[1
7700: 5d 20 3d 20 28 28 5f 5f 76 61 77 6f 72 64 2a 29 ] = ((__vaword*)
7710: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 29 5b ((LIST)->aptr))[
7720: 31 5d 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 1],..\. (LIST)
7730: 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 ->aptr += sizeof
7740: 28 54 59 50 45 29 2c 09 09 09 09 09 5c 0a 20 20 (TYPE),.....\.
7750: 20 28 54 59 50 45 29 28 28 4c 49 53 54 29 2d 3e (TYPE)((LIST)->
7760: 74 6d 70 2e 5f 6c 6f 6e 67 6c 6f 6e 67 29 09 09 tmp._longlong)..
7770: 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a ...\. ).#endif.
7780: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 #if defined(__hp
7790: 70 61 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c pa__)./* `long l
77a0: 6f 6e 67 27 73 20 68 61 76 65 20 61 6c 69 67 6e ong's have align
77b0: 6d 65 6e 74 20 38 2e 20 2a 2f 0a 23 64 65 66 69 ment 8. */.#defi
77c0: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 ne __va_arg_long
77d0: 6c 6f 6e 67 28 4c 49 53 54 2c 54 59 50 45 29 09 long(LIST,TYPE).
77e0: 09 09 09 09 5c 0a 20 20 28 28 4c 49 53 54 29 2d ....\. ((LIST)-
77f0: 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 54 29 2d >aptr = ((LIST)-
7800: 3e 61 70 74 72 20 26 20 2d 28 6c 6f 6e 67 29 5f >aptr & -(long)_
7810: 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 59 50 45 _VA_alignof(TYPE
7820: 29 29 2c 09 09 5c 0a 20 20 20 5f 5f 76 61 5f 61 )),..\. __va_a
7830: 72 67 28 4c 49 53 54 2c 54 59 50 45 29 29 0a 23 rg(LIST,TYPE)).#
7840: 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0a 2f 2a endif.#endif../*
7850: 20 46 6c 6f 61 74 69 6e 67 20 70 6f 69 6e 74 20 Floating point
7860: 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 0a 23 arguments. */..#
7870: 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 66 6c define va_arg_fl
7880: 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 oat(LIST) \. (
7890: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 (LIST)->flags &
78a0: 5f 5f 56 41 5f 54 52 41 44 49 54 49 4f 4e 41 4c __VA_TRADITIONAL
78b0: 5f 46 4c 4f 41 54 5f 41 52 47 53 09 09 09 09 5c _FLOAT_ARGS....\
78c0: 0a 20 20 20 3f 20 28 66 6c 6f 61 74 29 76 61 5f . ? (float)va_
78d0: 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 arg_double(LIST)
78e0: 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 5f 5f 76 ......\. : __v
78f0: 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 a_arg_float(LIST
7900: 29 09 09 09 09 09 09 5c 0a 20 20 29 0a 0a 23 69 )......\. )..#i
7910: 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 f defined(__i386
7920: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7930: 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 _m68k__) || defi
7940: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
7950: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
7960: 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e ps64__) || defin
7970: 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 7c 7c ed(__sparc__) ||
7980: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
7990: 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 64__) || defined
79a0: 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 (__alpha__) || d
79b0: 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 efined(__arm__)
79c0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 || defined(__rs6
79d0: 30 30 30 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 000__) || define
79e0: 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c d(__convex__) ||
79f0: 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f defined(__ia64_
7a00: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
7a10: 78 38 36 5f 36 34 5f 5f 29 20 7c 7c 20 64 65 66 x86_64__) || def
7a20: 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 23 ined(__s390__).#
7a30: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 6c 69 67 define __va_alig
7a40: 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 0a 23 n_double(LIST).#
7a50: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
7a60: 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 26 20 21 d(__mips__) && !
7a70: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 defined(__mipsn3
7a80: 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 2__) || defined(
7a90: 5f 5f 6d 38 38 6b 5f 5f 29 0a 2f 2a 20 5f 5f 56 __m88k__)./* __V
7aa0: 41 5f 61 6c 69 67 6e 6f 66 28 64 6f 75 62 6c 65 A_alignof(double
7ab0: 29 20 3e 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 ) > sizeof(__vaw
7ac0: 6f 72 64 29 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ord) */.#define
7ad0: 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c __va_align_doubl
7ae0: 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 4c 49 e(LIST) \. (LI
7af0: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 ST)->aptr = ((LI
7b00: 53 54 29 2d 3e 61 70 74 72 20 2b 20 73 69 7a 65 ST)->aptr + size
7b10: 6f 66 28 64 6f 75 62 6c 65 29 2d 31 29 20 26 20 of(double)-1) &
7b20: 2d 28 6c 6f 6e 67 29 73 69 7a 65 6f 66 28 64 6f -(long)sizeof(do
7b30: 75 62 6c 65 29 2c 0a 23 65 6e 64 69 66 0a 23 69 uble),.#endif.#i
7b40: 66 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 f defined(__hppa
7b50: 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 __).#define __va
7b60: 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 _align_double(LI
7b70: 53 54 29 20 20 5c 0a 20 20 28 4c 49 53 54 29 2d ST) \. (LIST)-
7b80: 3e 61 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e >aptr = (LIST)->
7b90: 61 70 74 72 20 26 20 2d 28 6c 6f 6e 67 29 73 69 aptr & -(long)si
7ba0: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 0a 23 65 zeof(double),.#e
7bb0: 6e 64 69 66 0a 0a 23 69 66 20 64 65 66 69 6e 65 ndif..#if define
7bc0: 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 d(__sparc__) &&
7bd0: 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 !defined(__sparc
7be0: 36 34 5f 5f 29 0a 2f 2a 20 42 65 77 61 72 65 20 64__)./* Beware
7bf0: 61 67 61 69 6e 73 74 20 75 6e 61 6c 69 67 6e 65 against unaligne
7c00: 64 20 60 64 6f 75 62 6c 65 27 20 61 63 63 65 73 d `double' acces
7c10: 73 65 73 21 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ses! */.#define
7c20: 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 va_arg_double(LI
7c30: 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 ST) \. (__va_a
7c40: 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 lign_double(LIST
7c50: 29 09 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 )......\. (LIS
7c60: 54 29 2d 3e 74 6d 70 2e 5f 77 6f 72 64 73 5b 30 T)->tmp._words[0
7c70: 5d 20 3d 20 28 28 5f 5f 76 61 77 6f 72 64 2a 29 ] = ((__vaword*)
7c80: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 29 29 5b ((LIST)->aptr))[
7c90: 30 5d 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 0],..\. (LIST)
7ca0: 2d 3e 74 6d 70 2e 5f 77 6f 72 64 73 5b 31 5d 20 ->tmp._words[1]
7cb0: 3d 20 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 28 = ((__vaword*)((
7cc0: 4c 49 53 54 29 2d 3e 61 70 74 72 29 29 5b 31 5d LIST)->aptr))[1]
7cd0: 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ,..\. (LIST)->
7ce0: 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 aptr += sizeof(d
7cf0: 6f 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 ouble),.....\.
7d00: 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 64 6f (LIST)->tmp._do
7d10: 75 62 6c 65 09 09 09 09 09 09 09 5c 0a 20 20 29 uble.......\. )
7d20: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
7d30: 6e 65 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 0a 2f ned(__alpha__)./
7d40: 2a 20 54 68 65 20 66 69 72 73 74 20 36 20 66 6c * The first 6 fl
7d50: 6f 61 74 69 6e 67 20 70 6f 69 6e 74 20 72 65 67 oating point reg
7d60: 69 73 74 65 72 73 20 68 61 76 65 20 62 65 65 6e isters have been
7d70: 20 73 74 6f 72 65 64 20 69 6e 20 61 6e 6f 74 68 stored in anoth
7d80: 65 72 20 70 6c 61 63 65 2e 20 2a 2f 0a 23 64 65 er place. */.#de
7d90: 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 fine va_arg_doub
7da0: 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 le(LIST) \. ((
7db0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 (LIST)->aptr +=
7dc0: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 20 sizeof(double))
7dd0: 3c 3d 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 61 72 <= (LIST)->memar
7de0: 67 70 74 72 09 09 5c 0a 20 20 20 3f 20 2a 28 64 gptr..\. ? *(d
7df0: 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e ouble*)((LIST)->
7e00: 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f aptr - sizeof(do
7e10: 75 62 6c 65 29 20 2d 20 36 2a 73 69 7a 65 6f 66 uble) - 6*sizeof
7e20: 28 64 6f 75 62 6c 65 29 29 09 5c 0a 20 20 20 3a (double)).\. :
7e30: 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 *(double*)((LIS
7e40: 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f T)->aptr - sizeo
7e50: 66 28 64 6f 75 62 6c 65 29 29 09 09 09 09 5c 0a f(double))....\.
7e60: 20 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 ).#define __va
7e70: 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 _arg_float(LIST)
7e80: 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 29 2d 3e \. (((LIST)->
7e90: 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 aptr += sizeof(d
7ea0: 6f 75 62 6c 65 29 29 20 3c 3d 20 28 4c 49 53 54 ouble)) <= (LIST
7eb0: 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 5c 0a )->memargptr..\.
7ec0: 20 20 20 3f 20 2f 2a 20 54 68 65 20 66 69 72 73 ? /* The firs
7ed0: 74 20 36 20 61 72 67 73 20 68 61 76 65 20 62 65 t 6 args have be
7ee0: 65 6e 20 70 75 74 20 69 6e 74 6f 20 6d 65 6d 6f en put into memo
7ef0: 72 79 20 62 79 20 22 73 74 74 22 20 69 6e 73 74 ry by "stt" inst
7f00: 72 75 63 74 69 6f 6e 73 20 2a 2f 5c 0a 20 20 20 ructions */\.
7f10: 20 20 2f 2a 20 28 73 65 65 20 76 61 63 61 6c 6c /* (see vacall
7f20: 2d 61 6c 70 68 61 2e 73 21 29 2e 20 54 68 65 72 -alpha.s!). Ther
7f30: 65 66 6f 72 65 20 6c 6f 61 64 20 74 68 65 6d 20 efore load them
7f40: 61 73 20 64 6f 75 62 6c 65 73 2e 20 2a 2f 09 5c as doubles. */.\
7f50: 0a 20 20 20 20 20 2f 2a 20 57 68 65 6e 20 76 69 . /* When vi
7f60: 65 77 65 64 20 61 73 20 66 6c 6f 61 74 73 2c 20 ewed as floats,
7f70: 74 68 65 20 76 61 6c 75 65 20 77 69 6c 6c 20 62 the value will b
7f80: 65 20 74 68 65 20 63 6f 72 72 65 63 74 20 6f 6e e the correct on
7f90: 65 2e 20 2a 2f 09 5c 0a 20 20 20 20 20 28 66 6c e. */.\. (fl
7fa0: 6f 61 74 29 2a 28 64 6f 75 62 6c 65 2a 29 28 28 oat)*(double*)((
7fb0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 LIST)->aptr - si
7fc0: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 20 2d 20 36 zeof(double) - 6
7fd0: 2a 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 *sizeof(double))
7fe0: 20 5c 0a 20 20 20 3a 20 2f 2a 20 54 68 65 73 65 \. : /* These
7ff0: 20 61 72 67 73 20 68 61 76 65 20 62 65 65 6e 20 args have been
8000: 70 75 74 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 put into memory
8010: 62 79 20 22 73 74 73 22 20 69 6e 73 74 72 75 63 by "sts" instruc
8020: 74 69 6f 6e 73 2c 20 2a 2f 09 5c 0a 20 20 20 20 tions, */.\.
8030: 20 2f 2a 20 74 68 65 72 65 66 6f 72 65 20 6c 6f /* therefore lo
8040: 61 64 20 74 68 65 6d 20 61 73 20 66 6c 6f 61 74 ad them as float
8050: 73 2e 20 2a 2f 09 09 09 09 5c 0a 20 20 20 20 20 s. */....\.
8060: 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 *(float*)((LIST)
8070: 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 ->aptr - sizeof(
8080: 64 6f 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 double))....\.
8090: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
80a0: 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a 2f ined(__hppa__)./
80b0: 2a 20 54 68 65 20 66 69 72 73 74 20 34 20 66 6c * The first 4 fl
80c0: 6f 61 74 20 72 65 67 69 73 74 65 72 73 20 61 6e oat registers an
80d0: 64 20 74 68 65 20 66 69 72 73 74 20 32 20 64 6f d the first 2 do
80e0: 75 62 6c 65 20 72 65 67 69 73 74 65 72 73 20 61 uble registers a
80f0: 72 65 20 73 74 6f 72 65 64 0a 20 2a 20 65 6c 73 re stored. * els
8100: 65 77 68 65 72 65 2e 0a 20 2a 2f 0a 23 69 66 20 ewhere.. */.#if
8110: 31 20 2f 2a 20 67 63 63 2d 32 2e 35 2e 32 20 70 1 /* gcc-2.5.2 p
8120: 61 73 73 65 73 20 74 68 65 73 65 20 61 72 67 73 asses these args
8130: 20 69 6e 20 67 65 6e 65 72 61 6c 20 72 65 67 69 in general regi
8140: 73 74 65 72 73 21 20 41 20 62 75 67 2c 20 49 20 sters! A bug, I
8150: 74 68 69 6e 6b 2e 20 2a 2f 0a 23 64 65 66 69 6e think. */.#defin
8160: 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 74 e __va_arg_float
8170: 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 2a 28 66 (LIST) \. (*(f
8180: 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 loat*)((LIST)->a
8190: 70 74 72 20 2d 3d 20 73 69 7a 65 6f 66 28 66 6c ptr -= sizeof(fl
81a0: 6f 61 74 29 29 29 0a 23 64 65 66 69 6e 65 20 76 oat))).#define v
81b0: 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 a_arg_double(LIS
81c0: 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c T) \. (__va_al
81d0: 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 ign_double(LIST)
81e0: 09 09 09 09 09 09 5c 0a 20 20 20 2a 28 64 6f 75 ......\. *(dou
81f0: 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 ble*)((LIST)->ap
8200: 74 72 20 2d 3d 20 73 69 7a 65 6f 66 28 64 6f 75 tr -= sizeof(dou
8210: 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 0a 23 ble))....\. ).#
8220: 65 6c 73 65 20 2f 2a 20 74 68 69 73 20 77 6f 75 else /* this wou
8230: 6c 64 20 62 65 20 63 6f 72 72 65 63 74 20 69 66 ld be correct if
8240: 20 74 68 65 20 61 72 67 73 20 77 65 72 65 20 70 the args were p
8250: 61 73 73 65 64 20 69 6e 20 66 6c 6f 61 74 20 72 assed in float r
8260: 65 67 69 73 74 65 72 73 2e 20 2a 2f 0a 23 64 65 egisters. */.#de
8270: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c fine __va_arg_fl
8280: 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 oat(LIST) \. (
8290: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 3d ((LIST)->aptr -=
82a0: 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 20 sizeof(float))
82b0: 3e 3d 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 61 72 >= (LIST)->memar
82c0: 67 70 74 72 09 09 09 5c 0a 20 20 20 3f 20 2f 2a gptr...\. ? /*
82d0: 20 54 68 65 20 66 69 72 73 74 20 34 20 66 6c 6f The first 4 flo
82e0: 61 74 20 61 72 67 73 20 61 72 65 20 73 74 6f 72 at args are stor
82f0: 65 64 20 73 65 70 61 72 61 74 65 6c 79 2e 20 2a ed separately. *
8300: 2f 09 09 5c 0a 20 20 20 20 20 2a 28 66 6c 6f 61 /..\. *(floa
8310: 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 t*)((LIST)->aptr
8320: 20 2b 20 28 4c 49 53 54 29 2d 3e 66 61 72 67 5f + (LIST)->farg_
8330: 6f 66 66 73 65 74 29 09 09 09 5c 0a 20 20 20 3a offset)...\. :
8340: 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 *(float*)((LIST
8350: 29 2d 3e 61 70 74 72 29 09 09 09 09 09 09 5c 0a )->aptr)......\.
8360: 20 20 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 ).#define va_a
8370: 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 rg_double(LIST)
8380: 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e \. (__va_align
8390: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 _double(LIST)...
83a0: 09 09 09 5c 0a 20 20 20 28 28 28 4c 49 53 54 29 ...\. (((LIST)
83b0: 2d 3e 61 70 74 72 20 2d 3d 20 73 69 7a 65 6f 66 ->aptr -= sizeof
83c0: 28 64 6f 75 62 6c 65 29 29 20 3e 3d 20 28 4c 49 (double)) >= (LI
83d0: 53 54 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 ST)->memargptr..
83e0: 5c 0a 20 20 20 20 3f 20 2f 2a 20 54 68 65 20 66 \. ? /* The f
83f0: 69 72 73 74 20 32 20 64 6f 75 62 6c 65 20 61 72 irst 2 double ar
8400: 67 73 20 61 72 65 20 73 74 6f 72 65 64 20 73 65 gs are stored se
8410: 70 61 72 61 74 65 6c 79 2e 20 2a 2f 09 09 5c 0a parately. */..\.
8420: 20 20 20 20 20 20 2a 28 64 6f 75 62 6c 65 2a 29 *(double*)
8430: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 20 ((LIST)->aptr +
8440: 28 4c 49 53 54 29 2d 3e 64 61 72 67 5f 6f 66 66 (LIST)->darg_off
8450: 73 65 74 29 09 09 09 5c 0a 20 20 20 20 3a 20 2a set)...\. : *
8460: 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 (double*)((LIST)
8470: 2d 3e 61 70 74 72 29 09 09 09 09 09 09 5c 0a 20 ->aptr)......\.
8480: 20 29 29 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 )).#endif.#endi
8490: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
84a0: 6d 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 mips__) && !defi
84b0: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
84c0: 0a 2f 2a 20 54 68 65 20 66 69 72 73 74 20 30 2c ./* The first 0,
84d0: 31 2c 32 20 72 65 67 69 73 74 65 72 73 20 61 72 1,2 registers ar
84e0: 65 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 65 e stored elsewhe
84f0: 72 65 20 69 66 20 74 68 65 79 20 61 72 65 20 66 re if they are f
8500: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 0a 20 2a loating-point. *
8510: 20 70 61 72 61 6d 65 74 65 72 73 2e 0a 20 2a 2f parameters.. */
8520: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
8530: 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c g_float(LIST) \
8540: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 . ((LIST)->aptr
8550: 20 2b 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 += sizeof(float
8560: 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 ),.....\. (LIS
8570: 54 29 2d 3e 61 6e 75 6d 2b 2b 2c 09 09 09 09 09 T)->anum++,.....
8580: 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e ..\. ((LIST)->
8590: 61 6e 75 6d 20 3d 3d 20 31 09 09 09 09 09 09 09 anum == 1.......
85a0: 5c 0a 20 20 20 20 3f 20 28 28 4c 49 53 54 29 2d \. ? ((LIST)-
85b0: 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 46 >flags |= __VA_F
85c0: 4c 4f 41 54 5f 31 2c 20 28 4c 49 53 54 29 2d 3e LOAT_1, (LIST)->
85d0: 66 61 72 67 5b 30 5d 29 09 09 09 5c 0a 20 20 20 farg[0])...\.
85e0: 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d : ((LIST)->anum
85f0: 20 3d 3d 20 32 20 26 26 20 28 28 4c 49 53 54 29 == 2 && ((LIST)
8600: 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 46 ->flags & __VA_F
8610: 4c 4f 41 54 5f 31 29 09 09 5c 0a 20 20 20 20 20 LOAT_1)..\.
8620: 20 20 3f 20 28 2f 2a 20 28 4c 49 53 54 29 2d 3e ? (/* (LIST)->
8630: 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 46 4c flags |= __VA_FL
8640: 4f 41 54 5f 32 2c 20 2a 2f 20 28 4c 49 53 54 29 OAT_2, */ (LIST)
8650: 2d 3e 66 61 72 67 5b 31 5d 29 09 09 5c 0a 20 20 ->farg[1])..\.
8660: 20 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a 29 : *(float*)
8670: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 ((LIST)->aptr -
8680: 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 09 09 sizeof(float))..
8690: 09 5c 0a 20 20 29 29 20 20 29 0a 23 64 65 66 69 .\. )) ).#defi
86a0: 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 ne va_arg_double
86b0: 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 (LIST) \. (__v
86c0: 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c a_align_double(L
86d0: 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 28 IST)......\. (
86e0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
86f0: 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 izeof(double),..
8700: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
8710: 61 6e 75 6d 2b 2b 2c 09 09 09 09 09 09 09 5c 0a anum++,.......\.
8720: 20 20 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d ((LIST)->anum
8730: 20 3d 3d 20 31 09 09 09 09 09 09 09 5c 0a 20 20 == 1.......\.
8740: 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 ? ((LIST)->fla
8750: 67 73 20 7c 3d 20 5f 5f 56 41 5f 46 4c 4f 41 54 gs |= __VA_FLOAT
8760: 5f 31 2c 20 28 4c 49 53 54 29 2d 3e 64 61 72 67 _1, (LIST)->darg
8770: 5b 30 5d 29 09 09 09 5c 0a 20 20 20 20 3a 20 28 [0])...\. : (
8780: 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3d 3d 20 (LIST)->anum ==
8790: 32 20 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c 2 && ((LIST)->fl
87a0: 61 67 73 20 26 20 5f 5f 56 41 5f 46 4c 4f 41 54 ags & __VA_FLOAT
87b0: 5f 31 29 09 09 5c 0a 20 20 20 20 20 20 20 3f 20 _1)..\. ?
87c0: 28 2f 2a 20 28 4c 49 53 54 29 2d 3e 66 6c 61 67 (/* (LIST)->flag
87d0: 73 20 7c 3d 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f s |= __VA_FLOAT_
87e0: 32 2c 20 2a 2f 20 28 4c 49 53 54 29 2d 3e 64 61 2, */ (LIST)->da
87f0: 72 67 5b 31 5d 29 09 09 5c 0a 20 20 20 20 20 20 rg[1])..\.
8800: 20 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c : *(double*)((L
8810: 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a IST)->aptr - siz
8820: 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 09 5c eof(double))...\
8830: 0a 20 20 29 29 20 20 29 0a 23 65 6e 64 69 66 0a . )) ).#endif.
8840: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
8850: 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 psn32__) || defi
8860: 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a ned(__mips64__).
8870: 2f 2a 20 54 68 65 20 66 69 72 73 74 20 30 2c 2e /* The first 0,.
8880: 2e 2c 38 20 72 65 67 69 73 74 65 72 73 20 61 72 .,8 registers ar
8890: 65 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 65 e stored elsewhe
88a0: 72 65 20 69 66 20 74 68 65 79 20 61 72 65 20 66 re if they are f
88b0: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 0a 20 2a loating-point. *
88c0: 20 70 61 72 61 6d 65 74 65 72 73 2e 0a 20 2a 2f parameters.. */
88d0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
88e0: 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c g_float(LIST) \
88f0: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 . (__va_align_d
8900: 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 ouble(LIST).....
8910: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 .\. (LIST)->ap
8920: 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 tr += sizeof(dou
8930: 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 ble),.....\. (
8940: 2b 2b 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3c ++(LIST)->anum <
8950: 3d 20 38 09 09 09 09 09 09 09 5c 0a 20 20 20 20 = 8.......\.
8960: 3f 20 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 28 ? (LIST)->farg[(
8970: 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 5d LIST)->anum - 1]
8980: 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 66 .....\. : *(f
8990: 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 loat*)((LIST)->a
89a0: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 ptr - sizeof(dou
89b0: 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 0a ble))....\. )).
89c0: 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 #define va_arg_d
89d0: 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 ouble(LIST) \.
89e0: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 (__va_align_dou
89f0: 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 5c ble(LIST)......\
8a00: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
8a10: 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c += sizeof(doubl
8a20: 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 2b 2b e),.....\. (++
8a30: 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3c 3d 20 (LIST)->anum <=
8a40: 38 09 09 09 09 09 09 09 5c 0a 20 20 20 20 3f 20 8.......\. ?
8a50: 28 4c 49 53 54 29 2d 3e 64 61 72 67 5b 28 4c 49 (LIST)->darg[(LI
8a60: 53 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 5d 09 09 ST)->anum - 1]..
8a70: 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 64 6f 75 ...\. : *(dou
8a80: 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 ble*)((LIST)->ap
8a90: 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 tr - sizeof(doub
8aa0: 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 0a 23 le))....\. )).#
8ab0: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
8ac0: 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a 2f d(__sparc64__)./
8ad0: 2a 20 54 68 65 20 66 69 72 73 74 20 30 2c 2e 2e * The first 0,..
8ae0: 2c 31 36 20 72 65 67 69 73 74 65 72 73 20 61 72 ,16 registers ar
8af0: 65 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 65 e stored elsewhe
8b00: 72 65 20 69 66 20 74 68 65 79 20 61 72 65 20 66 re if they are f
8b10: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 0a 20 2a loating-point. *
8b20: 20 70 61 72 61 6d 65 74 65 72 73 2e 0a 20 2a 2f parameters.. */
8b30: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
8b40: 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c g_float(LIST) \
8b50: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 . (__va_align_d
8b60: 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 ouble(LIST).....
8b70: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 .\. (LIST)->ap
8b80: 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 tr += sizeof(dou
8b90: 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 ble),.....\. (
8ba0: 2b 2b 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3c ++(LIST)->anum <
8bb0: 3d 20 31 36 09 09 09 09 09 09 5c 0a 20 20 20 20 = 16......\.
8bc0: 3f 20 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 28 ? (LIST)->farg[(
8bd0: 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 5d LIST)->anum - 1]
8be0: 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 66 .....\. : *(f
8bf0: 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 loat*)((LIST)->a
8c00: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 ptr - sizeof(dou
8c10: 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 0a ble))....\. )).
8c20: 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 #define va_arg_d
8c30: 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 ouble(LIST) \.
8c40: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 (__va_align_dou
8c50: 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 5c ble(LIST)......\
8c60: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
8c70: 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c += sizeof(doubl
8c80: 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 2b 2b e),.....\. (++
8c90: 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3c 3d 20 (LIST)->anum <=
8ca0: 31 36 09 09 09 09 09 09 5c 0a 20 20 20 20 3f 20 16......\. ?
8cb0: 28 4c 49 53 54 29 2d 3e 64 61 72 67 5b 28 4c 49 (LIST)->darg[(LI
8cc0: 53 54 29 2d 3e 61 6e 75 6d 20 2d 20 31 5d 09 09 ST)->anum - 1]..
8cd0: 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 64 6f 75 ...\. : *(dou
8ce0: 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 ble*)((LIST)->ap
8cf0: 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 tr - sizeof(doub
8d00: 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 0a 23 le))....\. )).#
8d10: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
8d20: 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 20 26 26 d(__rs6000__) &&
8d30: 20 28 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 (defined(_AIX)
8d40: 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 || (defined(__MA
8d50: 43 48 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 CH__) && defined
8d60: 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a (__APPLE__)))./*
8d70: 20 54 68 65 20 66 69 72 73 74 20 31 33 20 66 6c The first 13 fl
8d80: 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 67 oating-point arg
8d90: 73 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f 72 s have been stor
8da0: 65 64 20 65 6c 73 65 77 68 65 72 65 2e 20 2a 2f ed elsewhere. */
8db0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
8dc0: 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c g_float(LIST) \
8dd0: 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 . ((LIST)->aptr
8de0: 20 2b 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 += sizeof(float
8df0: 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 ),.....\. ((LI
8e00: 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 ST)->memfargptr
8e10: 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b < &(LIST)->farg[
8e20: 31 33 5d 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 13]....\. ? (
8e30: 66 6c 6f 61 74 29 20 2a 28 28 4c 49 53 54 29 2d float) *((LIST)-
8e40: 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 >memfargptr++)..
8e50: 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 66 6c 6f ...\. : *(flo
8e60: 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 at*)((LIST)->apt
8e70: 72 20 2d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 r - sizeof(float
8e80: 29 29 09 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 ))....\. )).#de
8e90: 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 fine va_arg_doub
8ea0: 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f le(LIST) \. (_
8eb0: 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 _va_align_double
8ec0: 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 (LIST)......\.
8ed0: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d (LIST)->aptr +=
8ee0: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c sizeof(double),
8ef0: 09 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 .....\. ((LIST
8f00: 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 )->memfargptr <
8f10: 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 31 33 &(LIST)->farg[13
8f20: 5d 09 09 09 09 5c 0a 20 20 20 20 3f 20 2a 28 28 ]....\. ? *((
8f30: 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 LIST)->memfargpt
8f40: 72 2b 2b 29 09 09 09 09 09 09 5c 0a 20 20 20 20 r++)......\.
8f50: 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 : *(double*)((LI
8f60: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
8f70: 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 09 09 5c of(double))....\
8f80: 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a 23 69 66 . )).#endif.#if
8f90: 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 30 30 defined(__rs600
8fa0: 30 5f 5f 29 20 26 26 20 21 28 64 65 66 69 6e 65 0__) && !(define
8fb0: 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 69 d(_AIX) || (defi
8fc0: 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 ned(__MACH__) &&
8fd0: 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 defined(__APPLE
8fe0: 5f 5f 29 29 29 0a 2f 2a 20 54 68 65 20 66 69 72 __)))./* The fir
8ff0: 73 74 20 38 20 66 6c 6f 61 74 69 6e 67 2d 70 6f st 8 floating-po
9000: 69 6e 74 20 61 72 67 73 20 68 61 76 65 20 62 65 int args have be
9010: 65 6e 20 73 74 6f 72 65 64 20 65 6c 73 65 77 68 en stored elsewh
9020: 65 72 65 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ere. */.#define
9030: 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c __va_arg_float(L
9040: 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 IST) \. ((LIST
9050: 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 )->memfargptr <
9060: 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d &(LIST)->farg[8]
9070: 09 09 09 09 5c 0a 20 20 20 3f 20 28 66 6c 6f 61 ....\. ? (floa
9080: 74 29 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d t) *((LIST)->mem
9090: 66 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 5c fargptr++).....\
90a0: 0a 20 20 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 . : ((LIST)->a
90b0: 70 74 72 20 3d 20 28 28 4c 49 53 54 29 2d 3e 6f ptr = ((LIST)->o
90c0: 6e 73 74 61 63 6b 20 3d 3d 20 30 20 20 20 20 20 nstack == 0
90d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
90e0: 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 \.
90f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9100: 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 ? ((LIST)->ons
9110: 74 61 63 6b 3d 31 2c 20 28 4c 49 53 54 29 2d 3e tack=1, (LIST)->
9120: 73 61 70 74 72 29 20 20 20 20 20 20 20 20 20 20 saptr)
9130: 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 \.
9140: 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 28 4c : (L
9150: 49 53 54 29 2d 3e 61 70 74 72 20 20 20 20 20 20 IST)->aptr
9160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9170: 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 \.
9180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9190: 20 20 20 20 20 29 2c 20 20 20 20 20 20 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 20 20 20 20 20 20 20 20 20 20 20 20
91c0: 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 28 \. (
91d0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
91e0: 69 7a 65 6f 66 28 66 6c 6f 61 74 29 2c 09 09 09 izeof(float),...
91f0: 09 09 5c 0a 20 20 20 20 20 20 2a 28 66 6c 6f 61 ..\. *(floa
9200: 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 t*)((LIST)->aptr
9210: 20 2d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 - sizeof(float)
9220: 29 09 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 )....\. )).#def
9230: 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c ine va_arg_doubl
9240: 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c e(LIST) \. ((L
9250: 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 IST)->memfargptr
9260: 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 < &(LIST)->farg
9270: 5b 38 5d 09 09 09 09 5c 0a 20 20 20 20 3f 20 2a [8]....\. ? *
9280: 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 ((LIST)->memfarg
9290: 70 74 72 2b 2b 29 09 09 09 09 09 09 5c 0a 20 20 ptr++)......\.
92a0: 20 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 : ((LIST)->apt
92b0: 72 20 3d 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 r = ((LIST)->ons
92c0: 74 61 63 6b 20 3d 3d 20 30 20 20 20 20 20 20 20 tack == 0
92d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
92e0: 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 \.
92f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3f ?
9300: 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 ((LIST)->onstac
9310: 6b 3d 31 2c 20 28 4c 49 53 54 29 2d 3e 73 61 70 k=1, (LIST)->sap
9320: 74 72 29 20 20 20 20 20 20 20 20 20 20 20 20 20 tr)
9330: 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
9340: 20 20 20 20 20 20 20 20 20 3a 20 28 4c 49 53 54 : (LIST
9350: 29 2d 3e 61 70 74 72 20 20 20 20 20 20 20 20 20 )->aptr
9360: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9370: 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 \.
9380: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9390: 20 20 29 2c 20 20 20 20 20 20 20 20 20 20 20 20 ),
93a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
93b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
93c0: 20 20 20 20 5c 0a 20 20 20 20 20 20 20 5f 5f 76 \. __v
93d0: 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c a_align_double(L
93e0: 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 20 IST)......\.
93f0: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
9400: 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 += sizeof(double
9410: 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 20 20 20 ),.....\.
9420: 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 *(double*)((LIST
9430: 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 )->aptr - sizeof
9440: 28 64 6f 75 62 6c 65 29 29 09 09 09 5c 0a 20 20 (double))...\.
9450: 29 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 )).#endif.#if de
9460: 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a fined(__s390__).
9470: 2f 2a 20 54 68 65 20 66 69 72 73 74 20 32 20 66 /* The first 2 f
9480: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 loating-point ar
9490: 67 73 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f gs have been sto
94a0: 72 65 64 20 65 6c 73 65 77 68 65 72 65 2e 20 2a red elsewhere. *
94b0: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
94c0: 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 rg_float(LIST)
94d0: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d \. ((LIST)->mem
94e0: 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 fargptr < &(LIST
94f0: 29 2d 3e 66 61 72 67 5b 32 5d 09 09 09 09 5c 0a )->farg[2]....\.
9500: 20 20 20 3f 20 28 4c 49 53 54 29 2d 3e 6d 65 6d ? (LIST)->mem
9510: 64 61 72 67 70 74 72 2b 2b 2c 20 28 66 6c 6f 61 dargptr++, (floa
9520: 74 29 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d t) *((LIST)->mem
9530: 66 61 72 67 70 74 72 2b 2b 29 09 09 5c 0a 20 20 fargptr++)..\.
9540: 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 : ((LIST)->aptr
9550: 20 3d 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 = ((LIST)->onst
9560: 61 63 6b 20 3d 3d 20 30 20 20 20 20 20 20 20 20 ack == 0
9570: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9580: 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 \.
9590: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3f ?
95a0: 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 ((LIST)->onstac
95b0: 6b 3d 31 2c 20 28 4c 49 53 54 29 2d 3e 73 61 70 k=1, (LIST)->sap
95c0: 74 72 29 20 20 20 20 20 20 20 20 20 20 20 20 20 tr)
95d0: 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
95e0: 20 20 20 20 20 20 20 20 20 3a 20 28 4c 49 53 54 : (LIST
95f0: 29 2d 3e 61 70 74 72 20 20 20 20 20 20 20 20 20 )->aptr
9600: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9610: 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 \.
9620: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9630: 20 20 29 2c 20 20 20 20 20 20 20 20 20 20 20 20 ),
9640: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9650: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9660: 20 20 20 20 5c 0a 20 20 20 20 20 20 28 4c 49 53 \. (LIS
9670: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 T)->aptr += size
9680: 6f 66 28 66 6c 6f 61 74 29 2c 09 09 09 09 09 5c of(float),.....\
9690: 0a 20 20 20 20 20 20 2a 28 66 6c 6f 61 74 2a 29 . *(float*)
96a0: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 ((LIST)->aptr -
96b0: 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 09 09 sizeof(float))..
96c0: 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e 65 ..\. )).#define
96d0: 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c va_arg_double(L
96e0: 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 IST) \. ((LIST
96f0: 29 2d 3e 6d 65 6d 64 61 72 67 70 74 72 20 3c 20 )->memdargptr <
9700: 26 28 4c 49 53 54 29 2d 3e 64 61 72 67 5b 32 5d &(LIST)->darg[2]
9710: 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 53 ....\. ? (LIS
9720: 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b T)->memfargptr++
9730: 2c 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 64 , *((LIST)->memd
9740: 61 72 67 70 74 72 2b 2b 29 09 09 09 5c 0a 20 20 argptr++)...\.
9750: 20 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 : ((LIST)->apt
9760: 72 20 3d 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 r = ((LIST)->ons
9770: 74 61 63 6b 20 3d 3d 20 30 20 20 20 20 20 20 20 tack == 0
9780: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9790: 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 \.
97a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3f ?
97b0: 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 ((LIST)->onstac
97c0: 6b 3d 31 2c 20 28 4c 49 53 54 29 2d 3e 73 61 70 k=1, (LIST)->sap
97d0: 74 72 29 20 20 20 20 20 20 20 20 20 20 20 20 20 tr)
97e0: 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
97f0: 20 20 20 20 20 20 20 20 20 3a 20 28 4c 49 53 54 : (LIST
9800: 29 2d 3e 61 70 74 72 20 20 20 20 20 20 20 20 20 )->aptr
9810: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9820: 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 \.
9830: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9840: 20 20 29 2c 20 20 20 20 20 20 20 20 20 20 20 20 ),
9850: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9860: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9870: 20 20 20 20 5c 0a 20 20 20 20 20 20 20 5f 5f 76 \. __v
9880: 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c a_align_double(L
9890: 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 20 IST)......\.
98a0: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
98b0: 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 += sizeof(double
98c0: 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 20 20 20 ),.....\.
98d0: 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 *(double*)((LIST
98e0: 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 )->aptr - sizeof
98f0: 28 64 6f 75 62 6c 65 29 29 09 09 09 5c 0a 20 20 (double))...\.
9900: 29 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 )).#endif.#if de
9910: 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a fined(__ia64__).
9920: 2f 2a 20 54 68 65 20 66 69 72 73 74 20 38 20 66 /* The first 8 f
9930: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 loating-point ar
9940: 67 73 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f gs have been sto
9950: 72 65 64 20 65 6c 73 65 77 68 65 72 65 2e 20 2a red elsewhere. *
9960: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
9970: 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 rg_float(LIST)
9980: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 \. ((LIST)->apt
9990: 72 20 2b 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 r += sizeof(__va
99a0: 77 6f 72 64 29 2c 09 09 09 09 09 5c 0a 20 20 20 word),.....\.
99b0: 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 ((LIST)->memfarg
99c0: 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 ptr < &(LIST)->f
99d0: 61 72 67 5b 38 5d 09 09 09 09 5c 0a 20 20 20 20 arg[8]....\.
99e0: 3f 20 28 66 6c 6f 61 74 29 20 2a 28 28 4c 49 53 ? (float) *((LIS
99f0: 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b T)->memfargptr++
9a00: 29 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 ).....\. : *(
9a10: 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e float*)((LIST)->
9a20: 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 5f 5f aptr - sizeof(__
9a30: 76 61 77 6f 72 64 29 29 09 09 09 5c 0a 20 20 29 vaword))...\. )
9a40: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 ).#define va_arg
9a50: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c _double(LIST) \
9a60: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 . (__va_align_d
9a70: 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 ouble(LIST).....
9a80: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 .\. (LIST)->ap
9a90: 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 64 6f 75 tr += sizeof(dou
9aa0: 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 20 20 28 ble),.....\. (
9ab0: 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 (LIST)->memfargp
9ac0: 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 tr < &(LIST)->fa
9ad0: 72 67 5b 38 5d 09 09 09 09 5c 0a 20 20 20 20 3f rg[8]....\. ?
9ae0: 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 *((LIST)->memfa
9af0: 72 67 70 74 72 2b 2b 29 09 09 09 09 09 09 5c 0a rgptr++)......\.
9b00: 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 : *(double*)
9b10: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 ((LIST)->aptr -
9b20: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 sizeof(double)).
9b30: 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 66 ...\. )).#endif
9b40: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 78 .#if defined(__x
9b50: 38 36 5f 36 34 5f 5f 29 0a 2f 2a 20 54 68 65 20 86_64__)./* The
9b60: 66 69 72 73 74 20 38 20 66 6c 6f 61 74 69 6e 67 first 8 floating
9b70: 2d 70 6f 69 6e 74 20 61 72 67 73 20 68 61 76 65 -point args have
9b80: 20 62 65 65 6e 20 73 74 6f 72 65 64 20 65 6c 73 been stored els
9b90: 65 77 68 65 72 65 2e 20 2a 2f 0a 23 64 65 66 69 ewhere. */.#defi
9ba0: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 ne __va_arg_floa
9bb0: 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c t(LIST) \. ((L
9bc0: 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 IST)->memfargptr
9bd0: 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 < &(LIST)->farg
9be0: 5b 38 5d 09 09 09 09 5c 0a 20 20 20 3f 20 28 28 [8]....\. ? ((
9bf0: 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 LIST)->memfargpt
9c00: 72 2b 2b 2c 09 09 09 09 09 09 5c 0a 20 20 20 20 r++,......\.
9c10: 20 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 *(float*)((LIS
9c20: 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 2d T)->memfargptr -
9c30: 20 31 29 09 09 09 09 09 5c 0a 20 20 20 20 20 29 1).....\. )
9c40: 09 09 09 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 .........\. :
9c50: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d ((LIST)->aptr +=
9c60: 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 sizeof(__vaword
9c70: 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 20 20 2a ),.....\. *
9c80: 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d (float*)((LIST)-
9c90: 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 5f >aptr - sizeof(_
9ca0: 5f 76 61 77 6f 72 64 29 29 09 09 09 5c 0a 20 20 _vaword))...\.
9cb0: 29 20 20 29 0a 23 64 65 66 69 6e 65 20 76 61 5f ) ).#define va_
9cc0: 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 arg_double(LIST)
9cd0: 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 6d \. ((LIST)->m
9ce0: 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 emfargptr < &(LI
9cf0: 53 54 29 2d 3e 66 61 72 67 5b 38 5d 09 09 09 09 ST)->farg[8]....
9d00: 5c 0a 20 20 20 3f 20 2a 28 4c 49 53 54 29 2d 3e \. ? *(LIST)->
9d10: 6d 65 6d 66 61 72 67 70 74 72 2b 2b 09 09 09 09 memfargptr++....
9d20: 09 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 54 29 ..\. : ((LIST)
9d30: 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 ->aptr += sizeof
9d40: 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 09 09 09 (__vaword),.....
9d50: 5c 0a 20 20 20 20 20 20 2a 28 64 6f 75 62 6c 65 \. *(double
9d60: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
9d70: 2d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 - sizeof(__vawor
9d80: 64 29 29 09 09 09 5c 0a 20 20 29 20 20 29 0a 23 d))...\. ) ).#
9d90: 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f endif.#ifndef __
9da0: 76 61 5f 61 72 67 5f 66 6c 6f 61 74 0a 23 64 65 va_arg_float.#de
9db0: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c fine __va_arg_fl
9dc0: 6f 61 74 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 oat(LIST).__va_a
9dd0: 72 67 28 4c 49 53 54 2c 66 6c 6f 61 74 29 0a 23 rg(LIST,float).#
9de0: 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 76 61 endif.#ifndef va
9df0: 5f 61 72 67 5f 64 6f 75 62 6c 65 0a 23 64 65 66 _arg_double.#def
9e00: 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c ine va_arg_doubl
9e10: 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f e(LIST) \. (__
9e20: 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 va_align_double(
9e30: 4c 49 53 54 29 20 5f 5f 76 61 5f 61 72 67 28 4c LIST) __va_arg(L
9e40: 49 53 54 2c 64 6f 75 62 6c 65 29 29 0a 23 65 6e IST,double)).#en
9e50: 64 69 66 0a 0a 2f 2a 20 50 6f 69 6e 74 65 72 20 dif../* Pointer
9e60: 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 23 64 arguments. */.#d
9e70: 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 70 74 72 efine va_arg_ptr
9e80: 28 4c 49 53 54 2c 54 59 50 45 29 09 5f 5f 76 61 (LIST,TYPE).__va
9e90: 5f 61 72 67 28 4c 49 53 54 2c 54 59 50 45 29 0a _arg(LIST,TYPE).
9ea0: 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 20 61 72 ./* Structure ar
9eb0: 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 23 64 65 66 guments. */.#def
9ec0: 69 6e 65 20 76 61 5f 61 72 67 5f 73 74 72 75 63 ine va_arg_struc
9ed0: 74 28 4c 49 53 54 2c 54 59 50 45 29 20 20 5c 0a t(LIST,TYPE) \.
9ee0: 20 20 2a 28 54 59 50 45 2a 29 5f 5f 76 61 5f 61 *(TYPE*)__va_a
9ef0: 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 73 rg_struct(LIST,s
9f00: 69 7a 65 6f 66 28 54 59 50 45 29 2c 5f 5f 56 41 izeof(TYPE),__VA
9f10: 5f 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 29 0a _alignof(TYPE)).
9f20: 2f 2a 20 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 /* _va_arg_struc
9f30: 74 28 29 20 69 73 20 6c 69 6b 65 20 76 61 5f 61 t() is like va_a
9f40: 72 67 5f 73 74 72 75 63 74 28 29 2c 20 65 78 63 rg_struct(), exc
9f50: 65 70 74 20 74 68 61 74 20 79 6f 75 20 70 61 73 ept that you pas
9f60: 73 20 74 68 65 20 74 79 70 65 27 73 0a 20 2a 20 s the type's. *
9f70: 73 69 7a 65 20 61 6e 64 20 61 6c 69 67 6e 6d 65 size and alignme
9f80: 6e 74 20 69 6e 73 74 65 61 64 20 6f 66 20 74 68 nt instead of th
9f90: 65 20 74 79 70 65 20 61 6e 64 20 67 65 74 20 74 e type and get t
9fa0: 68 65 20 76 61 6c 75 65 27 73 20 61 64 64 72 65 he value's addre
9fb0: 73 73 20 69 6e 73 74 65 61 64 0a 20 2a 20 6f 66 ss instead. * of
9fc0: 20 74 68 65 20 76 61 6c 75 65 20 69 74 73 65 6c the value itsel
9fd0: 66 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f f.. */.#define _
9fe0: 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 va_arg_struct(LI
9ff0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
a000: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 76 E_ALIGN) \. (v
a010: 6f 69 64 2a 29 5f 5f 76 61 5f 61 72 67 5f 73 74 oid*)__va_arg_st
a020: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
a030: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 0a IZE,TYPE_ALIGN).
a040: 2f 2a 20 53 74 72 75 63 74 75 72 65 20 61 72 67 /* Structure arg
a050: 75 6d 65 6e 74 20 61 6c 69 67 6e 6d 65 6e 74 2e ument alignment.
a060: 20 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 */.#if defined(
a070: 5f 5f 69 33 38 36 5f 5f 29 20 26 26 20 64 65 66 __i386__) && def
a080: 69 6e 65 64 28 5f 4d 53 43 5f 56 45 52 29 0a 2f ined(_MSC_VER)./
a090: 2a 20 49 6e 20 4d 53 56 43 2c 20 64 6f 75 62 6c * In MSVC, doubl
a0a0: 65 73 20 69 6e 73 69 64 65 20 73 74 72 75 63 74 es inside struct
a0b0: 75 72 65 73 20 68 61 76 65 20 61 6c 69 67 6e 6d ures have alignm
a0c0: 65 6e 74 20 38 2c 20 69 2e 65 2e 0a 20 2a 20 5f ent 8, i.e.. * _
a0d0: 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 64 6f 75 62 _VA_alignof(doub
a0e0: 6c 65 29 20 3d 20 38 2c 20 62 75 74 20 64 6f 75 le) = 8, but dou
a0f0: 62 6c 65 73 20 28 61 6e 64 20 61 6c 73 6f 20 73 bles (and also s
a100: 74 72 75 63 74 75 72 65 73 20 63 6f 6e 74 61 69 tructures contai
a110: 6e 69 6e 67 0a 20 2a 20 64 6f 75 62 6c 65 73 29 ning. * doubles)
a120: 20 61 72 65 20 70 61 73 73 65 64 20 6f 6e 20 74 are passed on t
a130: 68 65 20 73 74 61 63 6b 20 77 69 74 68 20 61 6c he stack with al
a140: 69 67 6e 6d 65 6e 74 20 34 2e 20 4c 6f 6f 6b 73 ignment 4. Looks
a150: 20 72 65 61 6c 6c 79 20 77 65 69 72 64 2e 0a 20 really weird..
a160: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
a170: 73 74 72 75 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 struct_alignment
a180: 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a (TYPE_ALIGN) \.
a190: 20 20 28 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 ((TYPE_ALIGN)
a1a0: 3c 3d 20 34 20 3f 20 28 54 59 50 45 5f 41 4c 49 <= 4 ? (TYPE_ALI
a1b0: 47 4e 29 20 3a 20 34 29 0a 23 65 6c 73 65 0a 23 GN) : 4).#else.#
a1c0: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 72 75 define __va_stru
a1d0: 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 28 54 59 50 ct_alignment(TYP
a1e0: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 54 E_ALIGN) \. (T
a1f0: 59 50 45 5f 41 4c 49 47 4e 29 0a 23 65 6e 64 69 YPE_ALIGN).#endi
a200: 66 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 f.#define __va_a
a210: 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 lign_struct(LIST
a220: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
a230: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 4c 49 53 ALIGN) \. (LIS
a240: 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c 49 53 T)->aptr = ((LIS
a250: 54 29 2d 3e 61 70 74 72 20 2b 20 5f 5f 76 61 5f T)->aptr + __va_
a260: 73 74 72 75 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 struct_alignment
a270: 28 54 59 50 45 5f 41 4c 49 47 4e 29 2d 31 29 20 (TYPE_ALIGN)-1)
a280: 26 20 2d 28 6c 6f 6e 67 29 5f 5f 76 61 5f 73 74 & -(long)__va_st
a290: 72 75 63 74 5f 61 6c 69 67 6e 6d 65 6e 74 28 54 ruct_alignment(T
a2a0: 59 50 45 5f 41 4c 49 47 4e 29 2c 0a 23 69 66 20 YPE_ALIGN),.#if
a2b0: 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f defined(__i386__
a2c0: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d ) || defined(__m
a2d0: 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 68k__) || define
a2e0: 64 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 d(__alpha__) ||
a2f0: 64 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 defined(__arm__)
a300: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 || defined(__m8
a310: 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 8k__) || defined
a320: 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 (__convex__) ||
a330: 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 defined(__x86_64
a340: 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 __).#define __va
a350: 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 _arg_struct(LIST
a360: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
a370: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 ALIGN) \. (__v
a380: 61 5f 61 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c a_align_struct(L
a390: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
a3a0: 50 45 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 PE_ALIGN)....\.
a3b0: 20 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 __va_arg_adjus
a3c0: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
a3d0: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
a3e0: 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 ..\. ).#endif.#
a3f0: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
a400: 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 s__) && !defined
a410: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 0a 2f 2a (__mipsn32__)./*
a420: 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 small structure
a430: 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 61 s < 1 word are a
a440: 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 69 6e djusted dependin
a450: 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a 2f g on compiler */
a460: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
a470: 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 g_struct(LIST,TY
a480: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 PE_SIZE,TYPE_ALI
a490: 47 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 GN) \. (__va_a
a4a0: 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 lign_struct(LIST
a4b0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
a4c0: 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 20 28 ALIGN)....\. (
a4d0: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 (LIST)->flags &
a4e0: 5f 5f 56 41 5f 53 47 49 43 43 5f 53 54 52 55 43 __VA_SGICC_STRUC
a4f0: 54 5f 41 52 47 53 09 09 09 09 5c 0a 20 20 20 20 T_ARGS....\.
a500: 3f 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 63 63 ? /* SGI MIPS cc
a510: 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 74 passes small st
a520: 72 75 63 74 75 72 65 73 20 6c 65 66 74 2d 61 64 ructures left-ad
a530: 6a 75 73 74 65 64 2c 20 61 6c 74 68 6f 75 67 68 justed, although
a540: 20 62 69 67 2d 65 6e 64 69 61 6e 21 20 2a 2f 5c big-endian! */\
a550: 0a 20 20 20 20 20 20 5f 5f 76 61 5f 61 72 67 5f . __va_arg_
a560: 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 leftadjusted(LIS
a570: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
a580: 5f 41 4c 49 47 4e 29 09 09 09 5c 0a 20 20 20 20 _ALIGN)...\.
a590: 3a 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 67 63 : /* SGI MIPS gc
a5a0: 63 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 c passes small s
a5b0: 74 72 75 63 74 75 72 65 73 20 77 69 74 68 69 6e tructures within
a5c0: 20 74 68 65 20 66 69 72 73 74 20 66 6f 75 72 20 the first four
a5d0: 77 6f 72 64 73 20 6c 65 66 74 2d 09 20 20 20 5c words left-. \
a5e0: 0a 20 20 20 20 20 20 20 2a 20 61 64 6a 75 73 74 . * adjust
a5f0: 65 64 2c 20 66 6f 72 20 63 6f 6d 70 61 74 69 62 ed, for compatib
a600: 69 6c 69 74 79 20 77 69 74 68 20 63 63 2e 20 42 ility with cc. B
a610: 75 74 20 73 74 72 75 63 74 75 72 65 73 20 69 6e ut structures in
a620: 20 6d 65 6d 6f 72 79 20 61 72 65 20 70 61 73 73 memory are pass
a630: 65 64 20 20 5c 0a 20 20 20 20 20 20 20 2a 20 72 ed \. * r
a640: 69 67 68 74 2d 61 64 6a 75 73 74 65 64 21 21 20 ight-adjusted!!
a650: 53 65 65 20 67 63 63 2d 32 2e 36 2e 33 2f 63 6f See gcc-2.6.3/co
a660: 6e 66 69 67 2f 6d 69 70 73 2f 6d 69 70 73 2e 63 nfig/mips/mips.c
a670: 3a 66 75 6e 63 74 69 6f 6e 5f 61 72 67 28 29 2e :function_arg().
a680: 09 20 20 20 5c 0a 20 20 20 20 20 20 20 2a 2f 09 . \. */.
a690: 09 09 09 09 09 09 09 09 20 20 20 5c 0a 20 20 20 ........ \.
a6a0: 20 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 ((LIST)->aptr
a6b0: 20 3c 20 28 4c 49 53 54 29 2d 3e 6d 65 6d 61 72 < (LIST)->memar
a6c0: 67 70 74 72 09 09 09 09 09 5c 0a 20 20 20 20 20 gptr.....\.
a6d0: 20 20 3f 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 ? __va_arg_lef
a6e0: 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 tadjusted(LIST,T
a6f0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
a700: 49 47 4e 29 09 09 5c 0a 20 20 20 20 20 20 20 3a IGN)..\. :
a710: 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 61 __va_arg_righta
a720: 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 djusted(LIST,TYP
a730: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
a740: 4e 29 09 09 5c 0a 20 20 29 29 20 20 29 0a 23 65 N)..\. )) ).#e
a750: 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 ndif.#if defined
a760: 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c (__mipsn32__) ||
a770: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 defined(__mips6
a780: 34 5f 5f 29 0a 2f 2a 20 73 6d 61 6c 6c 20 73 74 4__)./* small st
a790: 72 75 63 74 75 72 65 73 20 3c 20 31 20 77 6f 72 ructures < 1 wor
a7a0: 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 64 d are adjusted d
a7b0: 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d 70 epending on comp
a7c0: 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 20 iler */.#define
a7d0: 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 __va_arg_struct(
a7e0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
a7f0: 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 YPE_ALIGN) \.
a800: 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 75 (__va_align_stru
a810: 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ct(LIST,TYPE_SIZ
a820: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 E,TYPE_ALIGN)...
a830: 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 66 .\. ((LIST)->f
a840: 6c 61 67 73 20 26 20 5f 5f 56 41 5f 53 47 49 43 lags & __VA_SGIC
a850: 43 5f 53 54 52 55 43 54 5f 41 52 47 53 09 09 09 C_STRUCT_ARGS...
a860: 09 5c 0a 20 20 20 20 3f 20 2f 2a 20 53 47 49 20 .\. ? /* SGI
a870: 4d 49 50 53 20 63 63 20 70 61 73 73 65 73 20 73 MIPS cc passes s
a880: 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 mall structures
a890: 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 2c 20 61 left-adjusted, a
a8a0: 6c 74 68 6f 75 67 68 20 62 69 67 2d 65 6e 64 69 lthough big-endi
a8b0: 61 6e 21 20 2a 2f 5c 0a 20 20 20 20 20 20 5f 5f an! */\. __
a8c0: 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 va_arg_leftadjus
a8d0: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
a8e0: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
a8f0: 09 5c 0a 20 20 20 20 3a 20 2f 2a 20 53 47 49 20 .\. : /* SGI
a900: 4d 49 50 53 20 67 63 63 20 70 61 73 73 65 73 20 MIPS gcc passes
a910: 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 small structures
a920: 20 72 69 67 68 74 2d 61 64 6a 75 73 74 65 64 2e right-adjusted.
a930: 20 2a 2f 09 5c 0a 20 20 20 20 20 20 5f 5f 76 61 */.\. __va
a940: 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 _arg_rightadjust
a950: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
a960: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 E,TYPE_ALIGN)...
a970: 5c 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a 23 69 \. )).#endif.#i
a980: 66 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 30 f defined(__rs60
a990: 30 30 5f 5f 29 20 26 26 20 28 64 65 66 69 6e 65 00__) && (define
a9a0: 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 66 69 d(_AIX) || (defi
a9b0: 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 ned(__MACH__) &&
a9c0: 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 4c 45 defined(__APPLE
a9d0: 5f 5f 29 29 29 0a 2f 2a 20 73 6d 61 6c 6c 20 73 __)))./* small s
a9e0: 74 72 75 63 74 75 72 65 73 20 3c 20 31 20 77 6f tructures < 1 wo
a9f0: 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 rd are adjusted
aa00: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d depending on com
aa10: 70 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 piler */.#define
aa20: 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 __va_arg_struct
aa30: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
aa40: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
aa50: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 (__va_align_str
aa60: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 uct(LIST,TYPE_SI
aa70: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
aa80: 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e ..\. ((LIST)->
aa90: 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 41 49 58 flags & __VA_AIX
aaa0: 43 43 5f 53 54 52 55 43 54 5f 41 52 47 53 09 09 CC_STRUCT_ARGS..
aab0: 09 09 5c 0a 20 20 20 20 3f 20 2f 2a 20 41 49 58 ..\. ? /* AIX
aac0: 20 63 63 20 61 6e 64 20 78 6c 63 20 70 61 73 73 cc and xlc pass
aad0: 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 small structure
aae0: 73 20 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 2c s left-adjusted,
aaf0: 20 61 6c 74 68 6f 75 67 68 20 62 69 67 2d 65 6e although big-en
ab00: 64 69 61 6e 21 20 2a 2f 5c 0a 20 20 20 20 20 20 dian! */\.
ab10: 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a __va_arg_leftadj
ab20: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
ab30: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
ab40: 09 09 09 5c 0a 20 20 20 20 3a 20 2f 2a 20 67 63 ...\. : /* gc
ab50: 63 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 c passes small s
ab60: 74 72 75 63 74 75 72 65 73 20 72 69 67 68 74 2d tructures right-
ab70: 61 64 6a 75 73 74 65 64 2e 20 2a 2f 09 09 09 5c adjusted. */...\
ab80: 0a 20 20 20 20 20 20 5f 5f 76 61 5f 61 72 67 5f . __va_arg_
ab90: 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 rightadjusted(LI
aba0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
abb0: 45 5f 41 4c 49 47 4e 29 09 09 09 5c 0a 20 20 29 E_ALIGN)...\. )
abc0: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
abd0: 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 ined(__rs6000__)
abe0: 20 26 26 20 21 28 64 65 66 69 6e 65 64 28 5f 41 && !(defined(_A
abf0: 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 IX) || (defined(
ac00: 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 __MACH__) && def
ac10: 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 ined(__APPLE__))
ac20: 29 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 73 20 )./* Structures
ac30: 61 72 65 20 70 61 73 73 65 64 20 61 73 20 70 6f are passed as po
ac40: 69 6e 74 65 72 73 20 74 6f 20 63 61 6c 6c 65 72 inters to caller
ac50: 2d 6d 61 64 65 20 6c 6f 63 61 6c 20 63 6f 70 69 -made local copi
ac60: 65 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f es. */.#define _
ac70: 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c _va_arg_struct(L
ac80: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
ac90: 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 76 PE_ALIGN) \. v
aca0: 61 5f 61 72 67 5f 70 74 72 28 4c 49 53 54 2c 76 a_arg_ptr(LIST,v
acb0: 6f 69 64 2a 29 0a 23 65 6e 64 69 66 0a 23 69 66 oid*).#endif.#if
acc0: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
acd0: 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 __) && !defined(
ace0: 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 __sparc64__)./*
acf0: 53 74 72 75 63 74 75 72 65 73 20 61 72 65 20 70 Structures are p
ad00: 61 73 73 65 64 20 61 73 20 70 6f 69 6e 74 65 72 assed as pointer
ad10: 73 20 74 6f 20 63 61 6c 6c 65 72 2d 6d 61 64 65 s to caller-made
ad20: 20 6c 6f 63 61 6c 20 63 6f 70 69 65 73 2e 20 2a local copies. *
ad30: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
ad40: 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 rg_struct(LIST,T
ad50: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
ad60: 49 47 4e 29 20 20 5c 0a 20 20 76 61 5f 61 72 67 IGN) \. va_arg
ad70: 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a 29 _ptr(LIST,void*)
ad80: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
ad90: 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 ned(__sparc64__)
ada0: 0a 2f 2a 20 53 6d 61 6c 6c 20 73 74 72 75 63 74 ./* Small struct
adb0: 75 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 ures are passed
adc0: 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 2c 20 61 left-adjusted, a
add0: 6c 74 68 6f 75 67 68 20 62 69 67 2d 65 6e 64 69 lthough big-endi
ade0: 61 6e 21 20 2a 2f 0a 2f 2a 20 42 69 67 20 73 74 an! */./* Big st
adf0: 72 75 63 74 75 72 65 73 20 61 72 65 20 70 61 73 ructures are pas
ae00: 73 65 64 20 61 73 20 70 6f 69 6e 74 65 72 73 20 sed as pointers
ae10: 74 6f 20 63 61 6c 6c 65 72 2d 6d 61 64 65 20 6c to caller-made l
ae20: 6f 63 61 6c 20 63 6f 70 69 65 73 2e 20 2a 2f 0a ocal copies. */.
ae30: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 #define __va_arg
ae40: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
ae50: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
ae60: 4e 29 20 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 N) \. ((TYPE_S
ae70: 49 5a 45 29 20 3c 3d 20 31 36 09 09 09 09 09 09 IZE) <= 16......
ae80: 09 5c 0a 20 20 20 3f 20 28 5f 5f 76 61 5f 61 6c .\. ? (__va_al
ae90: 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 2c ign_struct(LIST,
aea0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
aeb0: 4c 49 47 4e 29 09 09 09 5c 0a 20 20 20 20 20 20 LIGN)...\.
aec0: 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a __va_arg_leftadj
aed0: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
aee0: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
aef0: 29 09 09 09 5c 0a 20 20 20 3a 20 76 61 5f 61 72 )...\. : va_ar
af00: 67 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a g_ptr(LIST,void*
af10: 29 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e )......\. ).#en
af20: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
af30: 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 53 74 72 __s390__)./* Str
af40: 75 63 74 75 72 65 73 20 3c 3d 20 38 20 62 79 74 uctures <= 8 byt
af50: 65 73 20 61 72 65 20 70 61 73 73 65 64 20 61 73 es are passed as
af60: 20 65 6d 62 65 64 64 65 64 20 63 6f 70 69 65 73 embedded copies
af70: 20 6f 6e 20 74 68 65 20 61 72 67 20 73 74 61 63 on the arg stac
af80: 6b 2e 0a 20 2a 20 42 69 67 20 73 74 72 75 63 74 k.. * Big struct
af90: 75 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 ures are passed
afa0: 61 73 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 as pointers to c
afb0: 61 6c 6c 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c aller-made local
afc0: 20 63 6f 70 69 65 73 2e 0a 20 2a 2f 0a 23 64 65 copies.. */.#de
afd0: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 fine __va_arg_st
afe0: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
aff0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 IZE,TYPE_ALIGN)
b000: 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 \. ((TYPE_SIZE
b010: 29 20 21 3d 20 31 20 26 26 20 28 54 59 50 45 5f ) != 1 && (TYPE_
b020: 53 49 5a 45 29 20 21 3d 20 32 20 26 26 20 28 54 SIZE) != 2 && (T
b030: 59 50 45 5f 53 49 5a 45 29 20 21 3d 20 34 20 26 YPE_SIZE) != 4 &
b040: 26 20 28 54 59 50 45 5f 53 49 5a 45 29 20 21 3d & (TYPE_SIZE) !=
b050: 20 38 20 5c 0a 20 20 20 3f 20 76 61 5f 61 72 67 8 \. ? va_arg
b060: 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a 29 _ptr(LIST,void*)
b070: 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 28 76 6f ......\. : (vo
b080: 69 64 2a 29 5f 5f 76 61 5f 61 72 67 5f 72 69 67 id*)__va_arg_rig
b090: 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c htadjusted(LIST,
b0a0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
b0b0: 4c 49 47 4e 29 09 09 5c 0a 20 20 29 0a 23 65 6e LIGN)..\. ).#en
b0c0: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
b0d0: 5f 5f 68 70 70 61 5f 5f 29 0a 2f 2a 20 53 74 72 __hppa__)./* Str
b0e0: 75 63 74 75 72 65 73 20 3c 3d 20 38 20 62 79 74 uctures <= 8 byt
b0f0: 65 73 20 61 72 65 20 70 61 73 73 65 64 20 61 73 es are passed as
b100: 20 65 6d 62 65 64 64 65 64 20 63 6f 70 69 65 73 embedded copies
b110: 20 6f 6e 20 74 68 65 20 61 72 67 20 73 74 61 63 on the arg stac
b120: 6b 2e 0a 20 2a 20 42 69 67 20 73 74 72 75 63 74 k.. * Big struct
b130: 75 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 ures are passed
b140: 61 73 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 as pointers to c
b150: 61 6c 6c 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c aller-made local
b160: 20 63 6f 70 69 65 73 2e 0a 20 2a 2f 0a 23 64 65 copies.. */.#de
b170: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 fine __va_arg_st
b180: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
b190: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 IZE,TYPE_ALIGN)
b1a0: 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 \. ((TYPE_SIZE
b1b0: 29 20 3e 20 38 09 09 09 09 09 09 09 5c 0a 20 20 ) > 8.......\.
b1c0: 20 3f 20 76 61 5f 61 72 67 5f 70 74 72 28 4c 49 ? va_arg_ptr(LI
b1d0: 53 54 2c 76 6f 69 64 2a 29 09 09 09 09 09 09 5c ST,void*)......\
b1e0: 0a 20 20 20 3a 20 2f 2a 20 46 49 58 4d 45 3a 20 . : /* FIXME:
b1f0: 67 63 63 2d 32 2e 36 2e 33 20 70 61 73 73 65 73 gcc-2.6.3 passes
b200: 20 73 74 72 75 63 74 75 72 65 73 20 3c 3d 20 34 structures <= 4
b210: 20 62 79 74 65 73 20 69 6e 20 6d 65 6d 6f 72 79 bytes in memory
b220: 20 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 21 20 left-adjusted!
b230: 3f 3f 20 2a 2f 5c 0a 20 20 20 20 20 28 76 6f 69 ?? */\. (voi
b240: 64 2a 29 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 d*)__va_arg_righ
b250: 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 tadjusted(LIST,T
b260: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
b270: 49 47 4e 29 09 09 5c 0a 20 20 29 0a 23 65 6e 64 IGN)..\. ).#end
b280: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
b290: 5f 69 61 36 34 5f 5f 29 0a 2f 2a 20 54 79 70 65 _ia64__)./* Type
b2a0: 73 20 6c 61 72 67 65 72 20 74 68 61 6e 20 61 20 s larger than a
b2b0: 77 6f 72 64 20 68 61 76 65 20 32 2d 77 6f 72 64 word have 2-word
b2c0: 20 61 6c 69 67 6e 6d 65 6e 74 2e 20 2a 2f 0a 23 alignment. */.#
b2d0: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
b2e0: 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 struct(LIST,TYPE
b2f0: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
b300: 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 ) \. (__va_ali
b310: 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 gn_struct(LIST,T
b320: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
b330: 49 47 4e 29 09 09 09 09 5c 0a 20 20 20 28 28 54 IGN)....\. ((T
b340: 59 50 45 5f 53 49 5a 45 29 20 3e 20 73 69 7a 65 YPE_SIZE) > size
b350: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 26 26 20 of(__vaword) &&
b360: 28 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 4c 49 (((__vaword*)(LI
b370: 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 4c 49 53 ST)->aptr - (LIS
b380: 54 29 2d 3e 73 61 70 74 72 29 20 26 20 31 29 20 T)->saptr) & 1)
b390: 3f 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b ? (LIST)->aptr +
b3a0: 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 = sizeof(__vawor
b3b0: 64 29 20 3a 20 30 29 2c 20 5c 0a 20 20 20 5f 5f d) : 0), \. __
b3c0: 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 65 64 28 va_arg_adjusted(
b3d0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
b3e0: 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a YPE_ALIGN)....\.
b3f0: 20 20 29 0a 23 65 6e 64 69 66 0a 0a 0a 2f 2a 0a ).#endif.../*.
b400: 20 2a 20 44 65 66 69 6e 69 74 69 6f 6e 20 6f 66 * Definition of
b410: 20 74 68 65 20 76 61 5f 72 65 74 75 72 6e 5f 78 the va_return_x
b420: 78 78 20 6d 61 63 72 6f 73 2e 0a 20 2a 2f 0a 23 xx macros.. */.#
b430: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 74 75 define __va_retu
b440: 72 6e 28 4c 49 53 54 2c 52 45 54 54 59 50 45 29 rn(LIST,RETTYPE)
b450: 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 29 2d 3e \. (((LIST)->
b460: 72 74 79 70 65 20 3d 3d 20 28 52 45 54 54 59 50 rtype == (RETTYP
b470: 45 29 29 20 7c 7c 20 5f 5f 76 61 5f 65 72 72 6f E)) || __va_erro
b480: 72 31 28 28 4c 49 53 54 29 2d 3e 72 74 79 70 65 r1((LIST)->rtype
b490: 2c 52 45 54 54 59 50 45 29 29 0a 23 64 65 66 69 ,RETTYPE)).#defi
b4a0: 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 76 6f 69 ne va_return_voi
b4b0: 64 28 4c 49 53 54 29 20 20 5c 0a 20 20 5f 5f 76 d(LIST) \. __v
b4c0: 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f a_return(LIST,__
b4d0: 56 41 76 6f 69 64 29 0a 23 64 65 66 69 6e 65 20 VAvoid).#define
b4e0: 76 61 5f 72 65 74 75 72 6e 5f 63 68 61 72 28 4c va_return_char(L
b4f0: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
b500: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
b510: 5f 5f 56 41 63 68 61 72 29 2c 20 28 4c 49 53 54 __VAchar), (LIST
b520: 29 2d 3e 74 6d 70 2e 5f 63 68 61 72 20 3d 20 28 )->tmp._char = (
b530: 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 VAL)).#define va
b540: 5f 72 65 74 75 72 6e 5f 73 63 68 61 72 28 4c 49 _return_schar(LI
b550: 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f ST,VAL) \. (__
b560: 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f va_return(LIST,_
b570: 5f 56 41 73 63 68 61 72 29 2c 20 28 4c 49 53 54 _VAschar), (LIST
b580: 29 2d 3e 74 6d 70 2e 5f 73 63 68 61 72 20 3d 20 )->tmp._schar =
b590: 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 (VAL)).#define v
b5a0: 61 5f 72 65 74 75 72 6e 5f 75 63 68 61 72 28 4c a_return_uchar(L
b5b0: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
b5c0: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
b5d0: 5f 5f 56 41 75 63 68 61 72 29 2c 20 28 4c 49 53 __VAuchar), (LIS
b5e0: 54 29 2d 3e 74 6d 70 2e 5f 75 63 68 61 72 20 3d T)->tmp._uchar =
b5f0: 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 (VAL)).#define
b600: 76 61 5f 72 65 74 75 72 6e 5f 73 68 6f 72 74 28 va_return_short(
b610: 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 LIST,VAL) \. (
b620: 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 __va_return(LIST
b630: 2c 5f 5f 56 41 73 68 6f 72 74 29 2c 20 28 4c 49 ,__VAshort), (LI
b640: 53 54 29 2d 3e 74 6d 70 2e 5f 73 68 6f 72 74 20 ST)->tmp._short
b650: 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 = (VAL)).#define
b660: 20 76 61 5f 72 65 74 75 72 6e 5f 75 73 68 6f 72 va_return_ushor
b670: 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 t(LIST,VAL) \.
b680: 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 (__va_return(LI
b690: 53 54 2c 5f 5f 56 41 75 73 68 6f 72 74 29 2c 20 ST,__VAushort),
b6a0: 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 75 73 68 (LIST)->tmp._ush
b6b0: 6f 72 74 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 ort = (VAL)).#de
b6c0: 66 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 69 fine va_return_i
b6d0: 6e 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a nt(LIST,VAL) \.
b6e0: 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c (__va_return(L
b6f0: 49 53 54 2c 5f 5f 56 41 69 6e 74 29 2c 20 28 4c IST,__VAint), (L
b700: 49 53 54 29 2d 3e 74 6d 70 2e 5f 69 6e 74 20 3d IST)->tmp._int =
b710: 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 (VAL)).#define
b720: 76 61 5f 72 65 74 75 72 6e 5f 75 69 6e 74 28 4c va_return_uint(L
b730: 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f IST,VAL) \. (_
b740: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
b750: 5f 5f 56 41 75 69 6e 74 29 2c 20 28 4c 49 53 54 __VAuint), (LIST
b760: 29 2d 3e 74 6d 70 2e 5f 75 69 6e 74 20 3d 20 28 )->tmp._uint = (
b770: 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 VAL)).#define va
b780: 5f 72 65 74 75 72 6e 5f 6c 6f 6e 67 28 4c 49 53 _return_long(LIS
b790: 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 T,VAL) \. (__v
b7a0: 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f a_return(LIST,__
b7b0: 56 41 6c 6f 6e 67 29 2c 20 28 4c 49 53 54 29 2d VAlong), (LIST)-
b7c0: 3e 74 6d 70 2e 5f 6c 6f 6e 67 20 3d 20 28 56 41 >tmp._long = (VA
b7d0: 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 L)).#define va_r
b7e0: 65 74 75 72 6e 5f 75 6c 6f 6e 67 28 4c 49 53 54 eturn_ulong(LIST
b7f0: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
b800: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
b810: 41 75 6c 6f 6e 67 29 2c 20 28 4c 49 53 54 29 2d Aulong), (LIST)-
b820: 3e 74 6d 70 2e 5f 75 6c 6f 6e 67 20 3d 20 28 56 >tmp._ulong = (V
b830: 41 4c 29 29 0a 23 69 66 20 64 65 66 69 6e 65 64 AL)).#if defined
b840: 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 (__mips64__) ||
b850: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
b860: 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 4__) || defined(
b870: 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 __alpha__) || de
b880: 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 fined(__ia64__)
b890: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 || defined(__x86
b8a0: 5f 36 34 5f 5f 29 0a 23 64 65 66 69 6e 65 20 76 _64__).#define v
b8b0: 61 5f 72 65 74 75 72 6e 5f 6c 6f 6e 67 6c 6f 6e a_return_longlon
b8c0: 67 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 g(LIST,VAL) \.
b8d0: 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 (__va_return(LI
b8e0: 53 54 2c 5f 5f 56 41 6c 6f 6e 67 6c 6f 6e 67 29 ST,__VAlonglong)
b8f0: 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 6c , (LIST)->tmp._l
b900: 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 ong = (VAL)).#de
b910: 66 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 75 fine va_return_u
b920: 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c 56 41 longlong(LIST,VA
b930: 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 L) \. (__va_re
b940: 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 75 6c turn(LIST,__VAul
b950: 6f 6e 67 6c 6f 6e 67 29 2c 20 28 4c 49 53 54 29 onglong), (LIST)
b960: 2d 3e 74 6d 70 2e 5f 75 6c 6f 6e 67 20 3d 20 28 ->tmp._ulong = (
b970: 56 41 4c 29 29 0a 23 65 6c 73 65 0a 23 64 65 66 VAL)).#else.#def
b980: 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 6c 6f ine va_return_lo
b990: 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c 56 41 4c 29 nglong(LIST,VAL)
b9a0: 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 \. (__va_retu
b9b0: 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 6c 6f 6e 67 rn(LIST,__VAlong
b9c0: 6c 6f 6e 67 29 2c 20 28 4c 49 53 54 29 2d 3e 74 long), (LIST)->t
b9d0: 6d 70 2e 5f 6c 6f 6e 67 6c 6f 6e 67 20 3d 20 28 mp._longlong = (
b9e0: 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 VAL)).#define va
b9f0: 5f 72 65 74 75 72 6e 5f 75 6c 6f 6e 67 6c 6f 6e _return_ulonglon
ba00: 67 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 g(LIST,VAL) \.
ba10: 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 (__va_return(LI
ba20: 53 54 2c 5f 5f 56 41 75 6c 6f 6e 67 6c 6f 6e 67 ST,__VAulonglong
ba30: 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f ), (LIST)->tmp._
ba40: 75 6c 6f 6e 67 6c 6f 6e 67 20 3d 20 28 56 41 4c ulonglong = (VAL
ba50: 29 29 0a 23 65 6e 64 69 66 0a 23 64 65 66 69 6e )).#endif.#defin
ba60: 65 20 76 61 5f 72 65 74 75 72 6e 5f 66 6c 6f 61 e va_return_floa
ba70: 74 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 t(LIST,VAL) \.
ba80: 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 (__va_return(LI
ba90: 53 54 2c 5f 5f 56 41 66 6c 6f 61 74 29 2c 20 28 ST,__VAfloat), (
baa0: 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 66 6c 6f 61 LIST)->tmp._floa
bab0: 74 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 t = (VAL)).#defi
bac0: 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f 64 6f 75 ne va_return_dou
bad0: 62 6c 65 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c ble(LIST,VAL) \
bae0: 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 . (__va_return(
baf0: 4c 49 53 54 2c 5f 5f 56 41 64 6f 75 62 6c 65 29 LIST,__VAdouble)
bb00: 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 64 , (LIST)->tmp._d
bb10: 6f 75 62 6c 65 20 3d 20 28 56 41 4c 29 29 0a 23 ouble = (VAL)).#
bb20: 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 6e define va_return
bb30: 5f 70 74 72 28 4c 49 53 54 2c 54 59 50 45 2c 56 _ptr(LIST,TYPE,V
bb40: 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 AL) \. (__va_r
bb50: 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 76 eturn(LIST,__VAv
bb60: 6f 69 64 70 29 2c 20 28 4c 49 53 54 29 2d 3e 74 oidp), (LIST)->t
bb70: 6d 70 2e 5f 70 74 72 20 3d 20 28 76 6f 69 64 2a mp._ptr = (void*
bb80: 29 28 54 59 50 45 29 28 56 41 4c 29 29 0a 23 64 )(TYPE)(VAL)).#d
bb90: 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f efine va_return_
bba0: 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 struct(LIST,TYPE
bbb0: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
bbc0: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
bbd0: 41 73 74 72 75 63 74 29 2c 20 2a 28 54 59 50 45 Astruct), *(TYPE
bbe0: 2a 29 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 72 *)((LIST)->raddr
bbf0: 29 20 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 ) = (VAL)).#defi
bc00: 6e 65 20 5f 76 61 5f 72 65 74 75 72 6e 5f 73 74 ne _va_return_st
bc10: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
bc20: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 2c 56 IZE,TYPE_ALIGN,V
bc30: 41 4c 5f 41 44 44 52 29 20 20 5c 0a 20 20 28 5f AL_ADDR) \. (_
bc40: 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c _va_return(LIST,
bc50: 5f 5f 56 41 73 74 72 75 63 74 29 2c 09 09 09 09 __VAstruct),....
bc60: 09 5c 0a 20 20 20 5f 5f 73 74 72 75 63 74 63 70 .\. __structcp
bc70: 79 28 28 76 6f 69 64 2a 29 28 28 4c 49 53 54 29 y((void*)((LIST)
bc80: 2d 3e 72 61 64 64 72 29 2c 56 41 4c 5f 41 44 44 ->raddr),VAL_ADD
bc90: 52 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 R,TYPE_SIZE,TYPE
bca0: 5f 41 4c 49 47 4e 29 09 5c 0a 20 20 29 0a 0a 0a _ALIGN).\. )...
bcb0: 2f 2a 20 44 65 74 65 72 6d 69 6e 65 20 77 68 65 /* Determine whe
bcc0: 74 68 65 72 20 61 20 73 74 72 75 63 74 20 74 79 ther a struct ty
bcd0: 70 65 20 69 73 20 77 6f 72 64 2d 73 70 6c 69 74 pe is word-split
bce0: 74 61 62 6c 65 2c 20 69 2e 65 2e 20 77 68 65 74 table, i.e. whet
bcf0: 68 65 72 20 65 61 63 68 20 6f 66 0a 20 2a 20 69 her each of. * i
bd00: 74 73 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 66 69 ts components fi
bd10: 74 20 69 6e 74 6f 20 61 20 72 65 67 69 73 74 65 t into a registe
bd20: 72 2e 0a 20 2a 20 54 68 65 20 65 6e 74 69 72 65 r.. * The entire
bd30: 20 63 6f 6d 70 75 74 61 74 69 6f 6e 20 69 73 20 computation is
bd40: 64 6f 6e 65 20 61 74 20 63 6f 6d 70 69 6c 65 20 done at compile
bd50: 74 69 6d 65 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e time.. */.#defin
bd60: 65 20 76 61 5f 77 6f 72 64 5f 73 70 6c 69 74 74 e va_word_splitt
bd70: 61 62 6c 65 5f 31 28 73 6c 6f 74 31 29 20 20 5c able_1(slot1) \
bd80: 0a 20 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 . (__va_offset1
bd90: 28 73 6c 6f 74 31 29 2f 73 69 7a 65 6f 66 28 5f (slot1)/sizeof(_
bda0: 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 _vaword) == (__v
bdb0: 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 29 a_offset1(slot1)
bdc0: 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 31 29 2d 31 +sizeof(slot1)-1
bdd0: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
bde0: 64 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 77 d)).#define va_w
bdf0: 6f 72 64 5f 73 70 6c 69 74 74 61 62 6c 65 5f 32 ord_splittable_2
be00: 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 20 20 5c (slot1,slot2) \
be10: 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 65 74 . ((__va_offset
be20: 31 28 73 6c 6f 74 31 29 2f 73 69 7a 65 6f 66 28 1(slot1)/sizeof(
be30: 5f 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f __vaword) == (__
be40: 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 va_offset1(slot1
be50: 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 31 29 2d )+sizeof(slot1)-
be60: 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 1)/sizeof(__vawo
be70: 72 64 29 29 20 5c 0a 20 20 20 26 26 20 28 5f 5f rd)) \. && (__
be80: 76 61 5f 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 va_offset2(slot1
be90: 2c 73 6c 6f 74 32 29 2f 73 69 7a 65 6f 66 28 5f ,slot2)/sizeof(_
bea0: 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 _vaword) == (__v
beb0: 61 5f 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 2c a_offset2(slot1,
bec0: 73 6c 6f 74 32 29 2b 73 69 7a 65 6f 66 28 73 6c slot2)+sizeof(sl
bed0: 6f 74 32 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f ot2)-1)/sizeof(_
bee0: 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 20 29 0a _vaword)) \. ).
bef0: 23 64 65 66 69 6e 65 20 76 61 5f 77 6f 72 64 5f #define va_word_
bf00: 73 70 6c 69 74 74 61 62 6c 65 5f 33 28 73 6c 6f splittable_3(slo
bf10: 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 20 t1,slot2,slot3)
bf20: 20 5c 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 \. ((__va_offs
bf30: 65 74 31 28 73 6c 6f 74 31 29 2f 73 69 7a 65 6f et1(slot1)/sizeo
bf40: 66 28 5f 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 f(__vaword) == (
bf50: 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f __va_offset1(slo
bf60: 74 31 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 31 t1)+sizeof(slot1
bf70: 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 )-1)/sizeof(__va
bf80: 77 6f 72 64 29 29 20 5c 0a 20 20 20 26 26 20 28 word)) \. && (
bf90: 5f 5f 76 61 5f 6f 66 66 73 65 74 32 28 73 6c 6f __va_offset2(slo
bfa0: 74 31 2c 73 6c 6f 74 32 29 2f 73 69 7a 65 6f 66 t1,slot2)/sizeof
bfb0: 28 5f 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f (__vaword) == (_
bfc0: 5f 76 61 5f 6f 66 66 73 65 74 32 28 73 6c 6f 74 _va_offset2(slot
bfd0: 31 2c 73 6c 6f 74 32 29 2b 73 69 7a 65 6f 66 28 1,slot2)+sizeof(
bfe0: 73 6c 6f 74 32 29 2d 31 29 2f 73 69 7a 65 6f 66 slot2)-1)/sizeof
bff0: 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 20 (__vaword)) \.
c000: 20 26 26 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 && (__va_offset
c010: 33 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 3(slot1,slot2,sl
c020: 6f 74 33 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 ot3)/sizeof(__va
c030: 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f word) == (__va_o
c040: 66 66 73 65 74 33 28 73 6c 6f 74 31 2c 73 6c 6f ffset3(slot1,slo
c050: 74 32 2c 73 6c 6f 74 33 29 2b 73 69 7a 65 6f 66 t2,slot3)+sizeof
c060: 28 73 6c 6f 74 33 29 2d 31 29 2f 73 69 7a 65 6f (slot3)-1)/sizeo
c070: 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 f(__vaword)) \.
c080: 20 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 77 6f ).#define va_wo
c090: 72 64 5f 73 70 6c 69 74 74 61 62 6c 65 5f 34 28 rd_splittable_4(
c0a0: 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 slot1,slot2,slot
c0b0: 33 2c 73 6c 6f 74 34 29 20 20 5c 0a 20 20 28 28 3,slot4) \. ((
c0c0: 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f __va_offset1(slo
c0d0: 74 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 t1)/sizeof(__vaw
c0e0: 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 ord) == (__va_of
c0f0: 66 73 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 7a fset1(slot1)+siz
c100: 65 6f 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 69 eof(slot1)-1)/si
c110: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 zeof(__vaword))
c120: 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 \. && (__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 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 2)/sizeof(__vawo
c150: 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 rd) == (__va_off
c160: 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 set2(slot1,slot2
c170: 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2d )+sizeof(slot2)-
c180: 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 1)/sizeof(__vawo
c190: 72 64 29 29 20 5c 0a 20 20 20 26 26 20 28 5f 5f rd)) \. && (__
c1a0: 76 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 31 va_offset3(slot1
c1b0: 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 2f 73 69 ,slot2,slot3)/si
c1c0: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3d zeof(__vaword) =
c1d0: 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 33 28 = (__va_offset3(
c1e0: 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 slot1,slot2,slot
c1f0: 33 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 33 29 3)+sizeof(slot3)
c200: 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 -1)/sizeof(__vaw
c210: 6f 72 64 29 29 20 5c 0a 20 20 20 26 26 20 28 5f ord)) \. && (_
c220: 5f 76 61 5f 6f 66 66 73 65 74 34 28 73 6c 6f 74 _va_offset4(slot
c230: 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 2c 73 6c 1,slot2,slot3,sl
c240: 6f 74 34 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 ot4)/sizeof(__va
c250: 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f word) == (__va_o
c260: 66 66 73 65 74 34 28 73 6c 6f 74 31 2c 73 6c 6f ffset4(slot1,slo
c270: 74 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 34 29 2b t2,slot3,slot4)+
c280: 73 69 7a 65 6f 66 28 73 6c 6f 74 34 29 2d 31 29 sizeof(slot4)-1)
c290: 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 /sizeof(__vaword
c2a0: 29 29 20 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 )) \. ).#define
c2b0: 20 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c __va_offset1(sl
c2c0: 6f 74 31 29 20 20 5c 0a 20 20 30 0a 23 64 65 66 ot1) \. 0.#def
c2d0: 69 6e 65 20 5f 5f 76 61 5f 6f 66 66 73 65 74 32 ine __va_offset2
c2e0: 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 20 20 5c (slot1,slot2) \
c2f0: 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 65 74 . ((__va_offset
c300: 31 28 73 6c 6f 74 31 29 2b 73 69 7a 65 6f 66 28 1(slot1)+sizeof(
c310: 73 6c 6f 74 31 29 2b 5f 5f 56 41 5f 61 6c 69 67 slot1)+__VA_alig
c320: 6e 6f 66 28 73 6c 6f 74 32 29 2d 31 29 20 26 20 nof(slot2)-1) &
c330: 2d 28 6c 6f 6e 67 29 5f 5f 56 41 5f 61 6c 69 67 -(long)__VA_alig
c340: 6e 6f 66 28 73 6c 6f 74 32 29 29 0a 23 64 65 66 nof(slot2)).#def
c350: 69 6e 65 20 5f 5f 76 61 5f 6f 66 66 73 65 74 33 ine __va_offset3
c360: 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f (slot1,slot2,slo
c370: 74 33 29 20 20 5c 0a 20 20 28 28 5f 5f 76 61 5f t3) \. ((__va_
c380: 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c offset2(slot1,sl
c390: 6f 74 32 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 ot2)+sizeof(slot
c3a0: 32 29 2b 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 2)+__VA_alignof(
c3b0: 73 6c 6f 74 33 29 2d 31 29 20 26 20 2d 28 6c 6f slot3)-1) & -(lo
c3c0: 6e 67 29 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 ng)__VA_alignof(
c3d0: 73 6c 6f 74 33 29 29 0a 23 64 65 66 69 6e 65 20 slot3)).#define
c3e0: 5f 5f 76 61 5f 6f 66 66 73 65 74 34 28 73 6c 6f __va_offset4(slo
c3f0: 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 2c 73 t1,slot2,slot3,s
c400: 6c 6f 74 34 29 20 20 5c 0a 20 20 28 28 5f 5f 76 lot4) \. ((__v
c410: 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 31 2c a_offset3(slot1,
c420: 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 2b 73 69 7a slot2,slot3)+siz
c430: 65 6f 66 28 73 6c 6f 74 33 29 2b 5f 5f 56 41 5f eof(slot3)+__VA_
c440: 61 6c 69 67 6e 6f 66 28 73 6c 6f 74 34 29 2d 31 alignof(slot4)-1
c450: 29 20 26 20 2d 28 6c 6f 6e 67 29 5f 5f 56 41 5f ) & -(long)__VA_
c460: 61 6c 69 67 6e 6f 66 28 73 6c 6f 74 34 29 29 0a alignof(slot4)).
c470: 0a 0a 2f 2a 0a 20 2a 20 4d 69 73 63 65 6c 6c 61 ../*. * Miscella
c480: 6e 65 6f 75 73 20 64 65 63 6c 61 72 61 74 69 6f neous declaratio
c490: 6e 73 2e 0a 20 2a 2f 0a 23 69 66 64 65 66 20 5f ns.. */.#ifdef _
c4a0: 5f 63 70 6c 75 73 70 6c 75 73 0a 65 78 74 65 72 _cplusplus.exter
c4b0: 6e 20 22 43 22 20 76 6f 69 64 20 5f 5f 76 61 63 n "C" void __vac
c4c0: 61 6c 6c 5f 72 20 28 29 3b 20 2f 2a 20 74 68 65 all_r (); /* the
c4d0: 20 72 65 74 75 72 6e 20 74 79 70 65 20 69 73 20 return type is
c4e0: 76 61 72 69 61 62 6c 65 2c 20 6e 6f 74 20 76 6f variable, not vo
c4f0: 69 64 21 20 2a 2f 0a 23 65 6c 73 65 0a 65 78 74 id! */.#else.ext
c500: 65 72 6e 20 76 6f 69 64 20 5f 5f 76 61 63 61 6c ern void __vacal
c510: 6c 5f 72 20 28 29 3b 20 2f 2a 20 74 68 65 20 72 l_r (); /* the r
c520: 65 74 75 72 6e 20 74 79 70 65 20 69 73 20 76 61 eturn type is va
c530: 72 69 61 62 6c 65 2c 20 6e 6f 74 20 76 6f 69 64 riable, not void
c540: 21 20 2a 2f 0a 23 65 6e 64 69 66 0a 23 69 66 20 ! */.#endif.#if
c550: 64 65 66 69 6e 65 64 28 5f 5f 53 54 44 43 5f 5f defined(__STDC__
c560: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 47 ) || defined(__G
c570: 4e 55 43 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 NUC__) || define
c580: 64 28 5f 5f 63 70 6c 75 73 70 6c 75 73 29 0a 65 d(__cplusplus).e
c590: 78 74 65 72 6e 20 69 6e 74 20 5f 5f 76 61 5f 65 xtern int __va_e
c5a0: 72 72 6f 72 31 20 28 65 6e 75 6d 20 5f 5f 56 41 rror1 (enum __VA
c5b0: 74 79 70 65 2c 20 65 6e 75 6d 20 5f 5f 56 41 74 type, enum __VAt
c5c0: 79 70 65 29 3b 0a 65 78 74 65 72 6e 20 69 6e 74 ype);.extern int
c5d0: 20 5f 5f 76 61 5f 65 72 72 6f 72 32 20 28 75 6e __va_error2 (un
c5e0: 73 69 67 6e 65 64 20 69 6e 74 29 3b 0a 65 78 74 signed int);.ext
c5f0: 65 72 6e 20 76 6f 69 64 20 5f 5f 73 74 72 75 63 ern void __struc
c600: 74 63 70 79 20 28 76 6f 69 64 2a 20 64 65 73 74 tcpy (void* dest
c610: 2c 20 76 6f 69 64 2a 20 73 72 63 2c 20 75 6e 73 , void* src, uns
c620: 69 67 6e 65 64 20 6c 6f 6e 67 20 73 69 7a 65 2c igned long size,
c630: 20 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 61 unsigned long a
c640: 6c 69 67 6e 6d 65 6e 74 29 3b 0a 23 65 6c 73 65 lignment);.#else
c650: 0a 65 78 74 65 72 6e 20 69 6e 74 20 5f 5f 76 61 .extern int __va
c660: 5f 65 72 72 6f 72 31 20 28 29 3b 0a 65 78 74 65 _error1 ();.exte
c670: 72 6e 20 69 6e 74 20 5f 5f 76 61 5f 65 72 72 6f rn int __va_erro
c680: 72 32 20 28 29 3b 0a 65 78 74 65 72 6e 20 76 6f r2 ();.extern vo
c690: 69 64 20 5f 5f 73 74 72 75 63 74 63 70 79 20 28 id __structcpy (
c6a0: 29 3b 0a 23 65 6e 64 69 66 0a 74 79 70 65 64 65 );.#endif.typede
c6b0: 66 20 75 6e 69 6f 6e 20 7b 20 5f 5f 76 61 77 6f f union { __vawo
c6c0: 72 64 20 72 6f 6f 6d 5b 5f 5f 56 41 5f 41 4c 49 rd room[__VA_ALI
c6d0: 53 54 5f 57 4f 52 44 53 5d 3b 20 64 6f 75 62 6c ST_WORDS]; doubl
c6e0: 65 20 61 6c 69 67 6e 3b 20 7d 20 5f 5f 76 61 5f e align; } __va_
c6f0: 73 74 72 75 63 74 5f 62 75 66 66 65 72 5f 74 3b struct_buffer_t;
c700: 0a 65 78 74 65 72 6e 20 5f 5f 76 61 5f 73 74 72 .extern __va_str
c710: 75 63 74 5f 62 75 66 66 65 72 5f 74 20 5f 5f 76 uct_buffer_t __v
c720: 61 5f 73 74 72 75 63 74 5f 62 75 66 66 65 72 3b a_struct_buffer;
c730: 0a 0a 0a 23 65 6e 64 69 66 20 2f 2a 20 5f 56 41 ...#endif /* _VA
c740: 43 41 4c 4c 5f 52 5f 48 20 2a 2f 0a CALL_R_H */.