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 75 6e 64 65 66 20 5f 5f 69 33 38 36 5f 5f 0a #undef __i386__.
0200: 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f #endif.#ifndef _
0210: 5f 6d 36 38 6b 5f 5f 0a 23 75 6e 64 65 66 20 5f _m68k__.#undef _
0220: 5f 6d 36 38 6b 5f 5f 0a 23 65 6e 64 69 66 0a 23 _m68k__.#endif.#
0230: 69 66 6e 64 65 66 20 5f 5f 6d 69 70 73 5f 5f 0a ifndef __mips__.
0240: 23 75 6e 64 65 66 20 5f 5f 6d 69 70 73 5f 5f 0a #undef __mips__.
0250: 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f #endif.#ifndef _
0260: 5f 6d 69 70 73 6e 33 32 5f 5f 0a 23 75 6e 64 65 _mipsn32__.#unde
0270: 66 20 5f 5f 6d 69 70 73 6e 33 32 5f 5f 0a 23 65 f __mipsn32__.#e
0280: 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 6d ndif.#ifndef __m
0290: 69 70 73 36 34 5f 5f 0a 23 75 6e 64 65 66 20 5f ips64__.#undef _
02a0: 5f 6d 69 70 73 36 34 5f 5f 0a 23 65 6e 64 69 66 _mips64__.#endif
02b0: 0a 23 69 66 6e 64 65 66 20 5f 5f 73 70 61 72 63 .#ifndef __sparc
02c0: 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 73 70 61 72 __.#undef __spar
02d0: 63 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 c__.#endif.#ifnd
02e0: 65 66 20 5f 5f 73 70 61 72 63 36 34 5f 5f 0a 23 ef __sparc64__.#
02f0: 75 6e 64 65 66 20 5f 5f 73 70 61 72 63 36 34 5f undef __sparc64_
0300: 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 _.#endif.#ifndef
0310: 20 5f 5f 61 6c 70 68 61 5f 5f 0a 23 75 6e 64 65 __alpha__.#unde
0320: 66 20 5f 5f 61 6c 70 68 61 5f 5f 0a 23 65 6e 64 f __alpha__.#end
0330: 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 68 70 70 if.#ifndef __hpp
0340: 61 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 68 70 70 a__.#undef __hpp
0350: 61 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 a__.#endif.#ifnd
0360: 65 66 20 5f 5f 61 72 6d 5f 5f 0a 23 75 6e 64 65 ef __arm__.#unde
0370: 66 20 5f 5f 61 72 6d 5f 5f 0a 23 65 6e 64 69 66 f __arm__.#endif
0380: 0a 23 69 66 6e 64 65 66 20 5f 5f 72 73 36 30 30 .#ifndef __rs600
0390: 30 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 72 73 36 0__.#undef __rs6
03a0: 30 30 30 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 000__.#endif.#if
03b0: 6e 64 65 66 20 5f 5f 73 33 39 30 5f 5f 0a 23 75 ndef __s390__.#u
03c0: 6e 64 65 66 20 5f 5f 73 33 39 30 5f 5f 0a 23 65 ndef __s390__.#e
03d0: 6e 64 69 66 0a 23 69 66 6e 64 65 66 20 5f 5f 6d ndif.#ifndef __m
03e0: 38 38 6b 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 6d 88k__.#undef __m
03f0: 38 38 6b 5f 5f 0a 23 65 6e 64 69 66 0a 23 69 66 88k__.#endif.#if
0400: 6e 64 65 66 20 5f 5f 63 6f 6e 76 65 78 5f 5f 0a ndef __convex__.
0410: 23 75 6e 64 65 66 20 5f 5f 63 6f 6e 76 65 78 5f #undef __convex_
0420: 5f 0a 23 65 6e 64 69 66 0a 23 69 66 6e 64 65 66 _.#endif.#ifndef
0430: 20 5f 5f 69 61 36 34 5f 5f 0a 23 75 6e 64 65 66 __ia64__.#undef
0440: 20 5f 5f 69 61 36 34 5f 5f 0a 23 65 6e 64 69 66 __ia64__.#endif
0450: 0a 23 69 66 6e 64 65 66 20 5f 5f 78 38 36 5f 36 .#ifndef __x86_6
0460: 34 5f 5f 0a 23 75 6e 64 65 66 20 5f 5f 78 38 36 4__.#undef __x86
0470: 5f 36 34 5f 5f 0a 23 65 6e 64 69 66 0a 0a 2f 2a _64__.#endif../*
0480: 20 43 61 6c 6c 69 6e 67 20 63 6f 6e 76 65 6e 74 Calling convent
0490: 69 6f 6e 20 2a 2f 0a 2f 2a 20 44 65 66 69 6e 65 ion */./* Define
04a0: 20 69 66 20 75 73 69 6e 67 20 70 63 63 20 6e 6f if using pcc no
04b0: 6e 2d 72 65 65 6e 74 72 61 6e 74 20 73 74 72 75 n-reentrant stru
04c0: 63 74 20 72 65 74 75 72 6e 20 63 6f 6e 76 65 6e ct return conven
04d0: 74 69 6f 6e 20 2a 2f 0a 23 75 6e 64 65 66 20 5f tion */.#undef _
04e0: 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 _PCC_STRUCT_RETU
04f0: 52 4e 5f 5f 0a 2f 2a 20 44 65 66 69 6e 65 20 69 RN__./* Define i
0500: 66 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 73 20 f small structs
0510: 61 72 65 20 72 65 74 75 72 6e 65 64 20 69 6e 20 are returned in
0520: 72 65 67 69 73 74 65 72 73 20 2a 2f 0a 23 75 6e registers */.#un
0530: 64 65 66 20 5f 5f 53 4d 41 4c 4c 5f 53 54 52 55 def __SMALL_STRU
0540: 43 54 5f 52 45 54 55 52 4e 5f 5f 0a 2f 2a 20 44 CT_RETURN__./* D
0550: 65 66 69 6e 65 20 69 66 20 66 6c 6f 61 74 69 6e efine if floatin
0560: 67 2d 70 6f 69 6e 74 20 72 65 73 75 6c 74 73 20 g-point results
0570: 61 72 65 20 72 65 74 75 72 6e 65 64 20 69 6e 20 are returned in
0580: 74 68 65 20 69 6e 74 65 67 65 72 20 72 65 67 69 the integer regi
0590: 73 74 65 72 73 20 2a 2f 0a 23 75 6e 64 65 66 20 sters */.#undef
05a0: 5f 5f 49 52 45 47 5f 46 4c 4f 41 54 5f 52 45 54 __IREG_FLOAT_RET
05b0: 55 52 4e 5f 5f 0a 0a 2f 2a 20 43 4c 5f 4c 4f 4e URN__../* CL_LON
05c0: 47 4c 4f 4e 47 20 2a 2f 0a 2f 2a 20 44 65 66 69 GLONG */./* Defi
05d0: 6e 65 20 69 66 20 79 6f 75 72 20 63 6f 6d 70 69 ne if your compi
05e0: 6c 65 72 20 73 75 70 70 6f 72 74 73 20 74 68 65 ler supports the
05f0: 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 20 74 79 70 `long long' typ
0600: 65 2e 20 2a 2f 0a 23 69 66 6e 64 65 66 20 48 41 e. */.#ifndef HA
0610: 56 45 5f 4c 4f 4e 47 4c 4f 4e 47 0a 23 75 6e 64 VE_LONGLONG.#und
0620: 65 66 20 48 41 56 45 5f 4c 4f 4e 47 4c 4f 4e 47 ef HAVE_LONGLONG
0630: 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 41 43 5f 43 .#endif../* AC_C
0640: 5f 43 48 41 52 5f 55 4e 53 49 47 4e 45 44 20 2a _CHAR_UNSIGNED *
0650: 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 43 48 41 52 /.#ifndef __CHAR
0660: 5f 55 4e 53 49 47 4e 45 44 5f 5f 0a 23 75 6e 64 _UNSIGNED__.#und
0670: 65 66 20 5f 5f 43 48 41 52 5f 55 4e 53 49 47 4e ef __CHAR_UNSIGN
0680: 45 44 5f 5f 0a 23 65 6e 64 69 66 0a 0a 2f 2a 20 ED__.#endif../*
0690: 45 6e 64 20 6f 66 20 64 65 66 69 6e 69 74 69 6f End of definitio
06a0: 6e 73 20 61 64 6a 75 73 74 65 64 20 62 79 20 60 ns adjusted by `
06b0: 63 6f 6e 66 69 67 75 72 65 27 2e 20 2a 2f 0a 0a configure'. */..
06c0: 0a 2f 2a 20 4d 61 78 20 23 20 77 6f 72 64 73 20 ./* Max # words
06d0: 69 6e 20 61 72 67 75 6d 65 6e 74 2d 6c 69 73 74 in argument-list
06e0: 20 61 6e 64 20 74 65 6d 70 6f 72 61 72 79 20 73 and temporary s
06f0: 74 72 75 63 74 75 72 65 20 73 74 6f 72 61 67 65 tructure storage
0700: 2e 0a 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f .. */.#ifndef __
0710: 56 41 5f 41 4c 49 53 54 5f 57 4f 52 44 53 0a 23 VA_ALIST_WORDS.#
0720: 64 65 66 69 6e 65 20 5f 5f 56 41 5f 41 4c 49 53 define __VA_ALIS
0730: 54 5f 57 4f 52 44 53 20 20 32 35 36 0a 23 65 6e T_WORDS 256.#en
0740: 64 69 66 0a 0a 2f 2a 20 54 68 65 20 60 73 69 67 dif../* The `sig
0750: 6e 65 64 27 20 6b 65 79 77 6f 72 64 2e 0a 20 2a ned' keyword.. *
0760: 2f 0a 23 69 66 20 21 64 65 66 69 6e 65 64 28 5f /.#if !defined(_
0770: 5f 53 54 44 43 5f 5f 29 20 26 26 20 21 64 65 66 _STDC__) && !def
0780: 69 6e 65 64 28 5f 5f 43 48 41 52 5f 55 4e 53 49 ined(__CHAR_UNSI
0790: 47 4e 45 44 5f 5f 29 20 26 26 20 21 64 65 66 69 GNED__) && !defi
07a0: 6e 65 64 28 73 69 67 6e 65 64 29 0a 23 64 65 66 ned(signed).#def
07b0: 69 6e 65 20 73 69 67 6e 65 64 0a 23 65 6e 64 69 ine signed.#endi
07c0: 66 0a 0a 2f 2a 20 44 65 74 65 72 6d 69 6e 65 20 f../* Determine
07d0: 74 68 65 20 61 6c 69 67 6e 6d 65 6e 74 20 6f 66 the alignment of
07e0: 20 61 20 74 79 70 65 20 61 74 20 63 6f 6d 70 69 a type at compi
07f0: 6c 65 20 74 69 6d 65 2e 0a 20 2a 2f 0a 23 69 66 le time.. */.#if
0800: 20 64 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f defined(__GNUC_
0810: 5f 29 0a 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f _).#define __VA_
0820: 61 6c 69 67 6e 6f 66 20 5f 5f 61 6c 69 67 6e 6f alignof __aligno
0830: 66 5f 5f 0a 23 65 6c 73 65 0a 23 69 66 20 64 65 f__.#else.#if de
0840: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 fined(__mips__)
0850: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 || defined(__mip
0860: 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e sn32__) || defin
0870: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 2f ed(__mips64__) /
0880: 2a 20 53 47 49 20 63 6f 6d 70 69 6c 65 72 20 2a * SGI compiler *
0890: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f 61 /.#define __VA_a
08a0: 6c 69 67 6e 6f 66 20 5f 5f 62 75 69 6c 74 69 6e lignof __builtin
08b0: 5f 61 6c 69 67 6e 6f 66 0a 23 65 6c 73 65 0a 23 _alignof.#else.#
08c0: 64 65 66 69 6e 65 20 5f 5f 56 41 5f 6f 66 66 73 define __VA_offs
08d0: 65 74 6f 66 28 74 79 70 65 2c 69 64 65 6e 74 29 etof(type,ident)
08e0: 20 20 28 28 75 6e 73 69 67 6e 65 64 20 6c 6f 6e ((unsigned lon
08f0: 67 29 26 28 28 28 74 79 70 65 2a 29 30 29 2d 3e g)&(((type*)0)->
0900: 69 64 65 6e 74 29 29 0a 23 64 65 66 69 6e 65 20 ident)).#define
0910: 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 74 79 70 __VA_alignof(typ
0920: 65 29 20 20 5f 5f 56 41 5f 6f 66 66 73 65 74 6f e) __VA_offseto
0930: 66 28 73 74 72 75 63 74 20 7b 20 63 68 61 72 20 f(struct { char
0940: 5f 5f 73 6c 6f 74 31 3b 20 74 79 70 65 20 5f 5f __slot1; type __
0950: 73 6c 6f 74 32 3b 20 7d 2c 20 5f 5f 73 6c 6f 74 slot2; }, __slot
0960: 32 29 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 2).#endif.#endif
0970: 0a 0a 2f 2a 20 43 20 62 75 69 6c 74 69 6e 20 74 ../* C builtin t
0980: 79 70 65 73 2e 0a 20 2a 2f 0a 23 69 66 20 64 65 ypes.. */.#if de
0990: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f fined(__mipsn32_
09a0: 5f 29 0a 74 79 70 65 64 65 66 20 6c 6f 6e 67 20 _).typedef long
09b0: 6c 6f 6e 67 20 5f 5f 76 61 77 6f 72 64 3b 0a 23 long __vaword;.#
09c0: 65 6c 73 65 0a 74 79 70 65 64 65 66 20 6c 6f 6e else.typedef lon
09d0: 67 20 5f 5f 76 61 77 6f 72 64 3b 0a 23 65 6e 64 g __vaword;.#end
09e0: 69 66 0a 0a 65 6e 75 6d 20 5f 5f 56 41 74 79 70 if..enum __VAtyp
09f0: 65 0a 7b 0a 20 20 5f 5f 56 41 76 6f 69 64 2c 0a e.{. __VAvoid,.
0a00: 20 20 5f 5f 56 41 63 68 61 72 2c 0a 20 20 5f 5f __VAchar,. __
0a10: 56 41 73 63 68 61 72 2c 0a 20 20 5f 5f 56 41 75 VAschar,. __VAu
0a20: 63 68 61 72 2c 0a 20 20 5f 5f 56 41 73 68 6f 72 char,. __VAshor
0a30: 74 2c 0a 20 20 5f 5f 56 41 75 73 68 6f 72 74 2c t,. __VAushort,
0a40: 0a 20 20 5f 5f 56 41 69 6e 74 2c 0a 20 20 5f 5f . __VAint,. __
0a50: 56 41 75 69 6e 74 2c 0a 20 20 5f 5f 56 41 6c 6f VAuint,. __VAlo
0a60: 6e 67 2c 0a 20 20 5f 5f 56 41 75 6c 6f 6e 67 2c ng,. __VAulong,
0a70: 0a 20 20 5f 5f 56 41 6c 6f 6e 67 6c 6f 6e 67 2c . __VAlonglong,
0a80: 0a 20 20 5f 5f 56 41 75 6c 6f 6e 67 6c 6f 6e 67 . __VAulonglong
0a90: 2c 0a 20 20 5f 5f 56 41 66 6c 6f 61 74 2c 0a 20 ,. __VAfloat,.
0aa0: 20 5f 5f 56 41 64 6f 75 62 6c 65 2c 0a 20 20 5f __VAdouble,. _
0ab0: 5f 56 41 76 6f 69 64 70 2c 0a 20 20 5f 5f 56 41 _VAvoidp,. __VA
0ac0: 73 74 72 75 63 74 0a 7d 3b 0a 0a 65 6e 75 6d 20 struct.};..enum
0ad0: 5f 5f 56 41 5f 61 6c 69 73 74 5f 66 6c 61 67 73 __VA_alist_flags
0ae0: 0a 7b 0a 0a 20 20 2f 2a 20 68 6f 77 20 74 6f 20 .{.. /* how to
0af0: 72 65 74 75 72 6e 20 73 74 72 75 63 74 73 20 2a return structs *
0b00: 2f 0a 20 20 2f 2a 20 54 68 65 72 65 20 61 72 65 /. /* There are
0b10: 20 62 61 73 69 63 61 6c 6c 79 20 33 20 77 61 79 basically 3 way
0b20: 73 20 74 6f 20 72 65 74 75 72 6e 20 73 74 72 75 s to return stru
0b30: 63 74 73 3a 0a 20 20 20 2a 20 61 2e 20 54 68 65 cts:. * a. The
0b40: 20 63 61 6c 6c 65 64 20 66 75 6e 63 74 69 6f 6e called function
0b50: 20 72 65 74 75 72 6e 73 20 61 20 70 6f 69 6e 74 returns a point
0b60: 65 72 20 74 6f 20 73 74 61 74 69 63 20 64 61 74 er to static dat
0b70: 61 2e 20 4e 6f 74 20 72 65 65 6e 74 72 61 6e 74 a. Not reentrant
0b80: 2e 0a 20 20 20 2a 20 62 2e 20 54 68 65 20 63 61 .. * b. The ca
0b90: 6c 6c 65 72 20 70 61 73 73 65 73 20 74 68 65 20 ller passes the
0ba0: 72 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 65 return structure
0bb0: 20 61 64 64 72 65 73 73 20 69 6e 20 61 20 64 65 address in a de
0bc0: 64 69 63 61 74 65 64 20 72 65 67 69 73 74 65 72 dicated register
0bd0: 0a 20 20 20 2a 20 20 20 20 6f 72 20 61 73 20 61 . * or as a
0be0: 20 66 69 72 73 74 20 28 6f 72 20 6c 61 73 74 29 first (or last)
0bf0: 2c 20 69 6e 76 69 73 69 62 6c 65 20 61 72 67 75 , invisible argu
0c00: 6d 65 6e 74 2e 20 54 68 65 20 63 61 6c 6c 65 64 ment. The called
0c10: 20 66 75 6e 63 74 69 6f 6e 20 73 74 6f 72 65 73 function stores
0c20: 0a 20 20 20 2a 20 20 20 20 69 74 73 20 72 65 73 . * its res
0c30: 75 6c 74 20 74 68 65 72 65 2e 0a 20 20 20 2a 20 ult there.. *
0c40: 63 2e 20 4c 69 6b 65 20 62 2c 20 61 6e 64 20 74 c. Like b, and t
0c50: 68 65 20 63 61 6c 6c 65 64 20 66 75 6e 63 74 69 he called functi
0c60: 6f 6e 20 61 6c 73 6f 20 72 65 74 75 72 6e 73 20 on also returns
0c70: 74 68 65 20 72 65 74 75 72 6e 20 73 74 72 75 63 the return struc
0c80: 74 75 72 65 0a 20 20 20 2a 20 20 20 20 61 64 64 ture. * add
0c90: 72 65 73 73 20 69 6e 20 74 68 65 20 72 65 74 75 ress in the retu
0ca0: 72 6e 20 76 61 6c 75 65 20 72 65 67 69 73 74 65 rn value registe
0cb0: 72 2e 20 28 54 68 69 73 20 69 73 20 6e 6f 74 20 r. (This is not
0cc0: 76 65 72 79 20 64 69 73 74 69 6e 67 75 69 73 68 very distinguish
0cd0: 61 62 6c 65 0a 20 20 20 2a 20 20 20 20 66 72 6f able. * fro
0ce0: 6d 20 62 2e 29 0a 20 20 20 2a 20 49 6e 64 65 70 m b.). * Indep
0cf0: 65 6e 64 65 6e 74 6c 79 20 6f 66 20 74 68 69 73 endently of this
0d00: 2c 0a 20 20 20 2a 20 72 2e 20 73 6d 61 6c 6c 20 ,. * r. small
0d10: 73 74 72 75 63 74 75 72 65 73 20 28 3c 3d 20 34 structures (<= 4
0d20: 20 6f 72 20 3c 3d 20 38 20 62 79 74 65 73 29 20 or <= 8 bytes)
0d30: 6d 61 79 20 62 65 20 72 65 74 75 72 6e 65 64 20 may be returned
0d40: 69 6e 20 74 68 65 20 72 65 74 75 72 6e 0a 20 20 in the return.
0d50: 20 2a 20 20 20 20 76 61 6c 75 65 20 72 65 67 69 * value regi
0d60: 73 74 65 72 28 73 29 2c 20 6f 72 0a 20 20 20 2a ster(s), or. *
0d70: 20 6d 2e 20 65 76 65 6e 20 73 6d 61 6c 6c 20 73 m. even small s
0d80: 74 72 75 63 74 75 72 65 73 20 61 72 65 20 70 61 tructures are pa
0d90: 73 73 65 64 20 69 6e 20 6d 65 6d 6f 72 79 2e 0a ssed in memory..
0da0: 20 20 20 2a 2f 0a 20 20 2f 2a 20 67 63 63 2d 32 */. /* gcc-2
0db0: 2e 36 2e 33 20 65 6d 70 6c 6f 79 73 20 74 68 65 .6.3 employs the
0dc0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 74 72 61 74 following strat
0dd0: 65 67 79 3a 0a 20 20 20 2a 20 20 20 2d 20 49 66 egy:. * - If
0de0: 20 50 43 43 5f 53 54 41 54 49 43 5f 53 54 52 55 PCC_STATIC_STRU
0df0: 43 54 5f 52 45 54 55 52 4e 20 69 73 20 64 65 66 CT_RETURN is def
0e00: 69 6e 65 64 20 69 6e 20 74 68 65 20 6d 61 63 68 ined in the mach
0e10: 69 6e 65 20 64 65 73 63 72 69 70 74 69 6f 6e 0a ine description.
0e20: 20 20 20 2a 20 20 20 20 20 69 74 20 75 73 65 73 * it uses
0e30: 20 6d 65 74 68 6f 64 20 61 2c 20 65 6c 73 65 20 method a, else
0e40: 6d 65 74 68 6f 64 20 63 2e 0a 20 20 20 2a 20 20 method c.. *
0e50: 20 2d 20 49 66 20 66 6c 61 67 5f 70 63 63 5f 73 - If flag_pcc_s
0e60: 74 72 75 63 74 5f 72 65 74 75 72 6e 20 69 73 20 truct_return is
0e70: 73 65 74 20 28 65 69 74 68 65 72 20 62 79 20 2d set (either by -
0e80: 66 70 63 63 2d 73 74 72 75 63 74 2d 72 65 74 75 fpcc-struct-retu
0e90: 72 6e 20 6f 72 20 69 66 0a 20 20 20 2a 20 20 20 rn or if. *
0ea0: 20 20 44 45 46 41 55 4c 54 5f 50 43 43 5f 53 54 DEFAULT_PCC_ST
0eb0: 52 55 43 54 5f 52 45 54 55 52 4e 20 69 73 20 64 RUCT_RETURN is d
0ec0: 65 66 69 6e 65 64 20 74 6f 20 31 20 69 6e 20 74 efined to 1 in t
0ed0: 68 65 20 6d 61 63 68 69 6e 65 20 64 65 73 63 72 he machine descr
0ee0: 69 70 74 69 6f 6e 29 0a 20 20 20 2a 20 20 20 20 iption). *
0ef0: 20 69 74 20 75 73 65 73 20 6d 65 74 68 6f 64 20 it uses method
0f00: 6d 2c 20 65 6c 73 65 20 28 65 69 74 68 65 72 20 m, else (either
0f10: 62 79 20 2d 66 72 65 67 2d 73 74 72 75 63 74 2d by -freg-struct-
0f20: 72 65 74 75 72 6e 20 6f 72 20 69 66 0a 20 20 20 return or if.
0f30: 2a 20 20 20 20 20 44 45 46 41 55 4c 54 5f 50 43 * DEFAULT_PC
0f40: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 C_STRUCT_RETURN
0f50: 69 73 20 64 65 66 69 6e 65 64 20 74 6f 20 30 20 is defined to 0
0f60: 69 6e 20 74 68 65 20 6d 61 63 68 69 6e 65 20 64 in the machine d
0f70: 65 73 63 72 69 70 74 69 6f 6e 29 0a 20 20 20 2a escription). *
0f80: 20 20 20 20 20 6d 65 74 68 6f 64 20 72 2e 0a 20 method r..
0f90: 20 20 2a 2f 0a 20 20 5f 5f 56 41 5f 50 43 43 5f */. __VA_PCC_
0fa0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 STRUCT_RETURN.=
0fb0: 31 3c 3c 30 2c 09 2f 2a 20 61 3a 20 6e 65 65 64 1<<0,./* a: need
0fc0: 20 74 6f 20 63 6f 70 79 20 74 68 65 20 73 74 72 to copy the str
0fd0: 75 63 74 20 2a 2f 0a 20 20 5f 5f 56 41 5f 53 4d uct */. __VA_SM
0fe0: 41 4c 4c 5f 53 54 52 55 43 54 5f 52 45 54 55 52 ALL_STRUCT_RETUR
0ff0: 4e 09 3d 20 31 3c 3c 31 2c 09 2f 2a 20 72 3a 20 N.= 1<<1,./* r:
1000: 73 70 65 63 69 61 6c 20 63 61 73 65 20 66 6f 72 special case for
1010: 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 73 20 2a small structs *
1020: 2f 0a 20 20 5f 5f 56 41 5f 47 43 43 5f 53 54 52 /. __VA_GCC_STR
1030: 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c UCT_RETURN.= 1<<
1040: 32 2c 09 2f 2a 20 63 6f 6e 73 69 64 65 72 20 38 2,./* consider 8
1050: 20 62 79 74 65 20 73 74 72 75 63 74 73 20 61 73 byte structs as
1060: 20 73 6d 61 6c 6c 20 2a 2f 0a 23 69 66 20 64 65 small */.#if de
1070: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 fined(__sparc__)
1080: 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 && !defined(__s
1090: 70 61 72 63 36 34 5f 5f 29 0a 20 20 5f 5f 56 41 parc64__). __VA
10a0: 5f 53 55 4e 43 43 5f 53 54 52 55 43 54 5f 52 45 _SUNCC_STRUCT_RE
10b0: 54 55 52 4e 09 3d 20 31 3c 3c 33 2c 0a 20 20 5f TURN.= 1<<3,. _
10c0: 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 54 52 _VA_SUNPROCC_STR
10d0: 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c UCT_RETURN.= 1<<
10e0: 34 2c 0a 23 65 6c 73 65 0a 20 20 5f 5f 56 41 5f 4,.#else. __VA_
10f0: 53 55 4e 43 43 5f 53 54 52 55 43 54 5f 52 45 54 SUNCC_STRUCT_RET
1100: 55 52 4e 09 3d 20 30 2c 0a 20 20 5f 5f 56 41 5f URN.= 0,. __VA_
1110: 53 55 4e 50 52 4f 43 43 5f 53 54 52 55 43 54 5f SUNPROCC_STRUCT_
1120: 52 45 54 55 52 4e 09 3d 20 30 2c 0a 23 65 6e 64 RETURN.= 0,.#end
1130: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
1140: 5f 69 33 38 36 5f 5f 29 0a 20 20 5f 5f 56 41 5f _i386__). __VA_
1150: 4e 45 58 54 47 43 43 5f 53 54 52 55 43 54 5f 52 NEXTGCC_STRUCT_R
1160: 45 54 55 52 4e 09 3d 20 31 3c 3c 33 2c 0a 20 20 ETURN.= 1<<3,.
1170: 5f 5f 56 41 5f 4d 53 56 43 5f 53 54 52 55 43 54 __VA_MSVC_STRUCT
1180: 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 34 2c 0a _RETURN.= 1<<4,.
1190: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
11a0: 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a 20 20 5f ed(__hppa__). _
11b0: 5f 56 41 5f 4f 4c 44 47 43 43 5f 53 54 52 55 43 _VA_OLDGCC_STRUC
11c0: 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 33 2c T_RETURN.= 1<<3,
11d0: 0a 23 65 6e 64 69 66 0a 20 20 2f 2a 20 74 68 65 .#endif. /* the
11e0: 20 64 65 66 61 75 6c 74 20 77 61 79 20 74 6f 20 default way to
11f0: 72 65 74 75 72 6e 20 73 74 72 75 63 74 73 20 2a return structs *
1200: 2f 0a 20 20 2f 2a 20 54 68 69 73 20 63 68 6f 69 /. /* This choi
1210: 63 65 20 68 65 72 65 20 69 73 20 62 61 73 65 64 ce here is based
1220: 20 6f 6e 20 74 68 65 20 61 73 73 75 6d 70 74 69 on the assumpti
1230: 6f 6e 20 74 68 61 74 20 74 68 65 20 66 75 6e 63 on that the func
1240: 74 69 6f 6e 20 79 6f 75 20 61 72 65 0a 20 20 20 tion you are.
1250: 2a 20 67 6f 69 6e 67 20 74 6f 20 63 61 6c 6c 20 * going to call
1260: 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 69 6c 65 has been compile
1270: 64 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 20 d with the same
1280: 63 6f 6d 70 69 6c 65 72 20 79 6f 75 20 61 72 65 compiler you are
1290: 20 75 73 69 6e 67 20 74 6f 0a 20 20 20 2a 20 69 using to. * i
12a0: 6e 63 6c 75 64 65 20 74 68 69 73 20 66 69 6c 65 nclude this file
12b0: 2e 0a 20 20 20 2a 20 49 66 20 79 6f 75 20 77 61 .. * If you wa
12c0: 6e 74 20 74 6f 20 63 61 6c 6c 20 66 75 6e 63 74 nt to call funct
12d0: 69 6f 6e 73 20 77 69 74 68 20 61 6e 6f 74 68 65 ions with anothe
12e0: 72 20 73 74 72 75 63 74 20 72 65 74 75 72 6e 69 r struct returni
12f0: 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e 2c 0a 20 ng convention,.
1300: 20 20 2a 20 6a 75 73 74 20 20 23 64 65 66 69 6e * just #defin
1310: 65 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 52 45 e __VA_STRUCT_RE
1320: 54 55 52 4e 20 2e 2e 2e 0a 20 20 20 2a 20 62 65 TURN .... * be
1330: 66 6f 72 65 20 6f 72 20 61 66 74 65 72 20 23 69 fore or after #i
1340: 6e 63 6c 75 64 69 6e 67 20 3c 76 61 63 61 6c 6c ncluding <vacall
1350: 5f 72 2e 68 3e 2e 0a 20 20 20 2a 2f 0a 23 69 66 _r.h>.. */.#if
1360: 6e 64 65 66 20 5f 5f 56 41 5f 53 54 52 55 43 54 ndef __VA_STRUCT
1370: 5f 52 45 54 55 52 4e 0a 20 20 5f 5f 56 41 5f 53 _RETURN. __VA_S
1380: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 09 3d 0a TRUCT_RETURN..=.
1390: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 #if defined(__sp
13a0: 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e arc__) && !defin
13b0: 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 20 ed(__sparc64__)
13c0: 26 26 20 64 65 66 69 6e 65 64 28 73 75 6e 29 20 && defined(sun)
13d0: 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 53 55 4e && defined(__SUN
13e0: 50 52 4f 5f 43 29 20 2f 2a 20 53 55 4e 57 73 70 PRO_C) /* SUNWsp
13f0: 72 6f 20 63 63 20 2a 2f 0a 09 09 09 09 20 20 5f ro cc */..... _
1400: 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 54 52 _VA_SUNPROCC_STR
1410: 55 43 54 5f 52 45 54 55 52 4e 2c 0a 23 65 6c 73 UCT_RETURN,.#els
1420: 65 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f e.#if defined(__
1430: 50 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 PCC_STRUCT_RETUR
1440: 4e 5f 5f 29 20 2f 2a 20 64 65 66 69 6e 65 64 20 N__) /* defined
1450: 74 68 72 6f 75 67 68 20 63 6f 6e 66 69 67 75 72 through configur
1460: 65 2c 20 73 65 65 20 61 62 6f 76 65 20 2a 2f 0a e, see above */.
1470: 09 09 09 09 20 20 5f 5f 56 41 5f 50 43 43 5f 53 .... __VA_PCC_S
1480: 54 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 0a 23 TRUCT_RETURN |.#
1490: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 if defined(__spa
14a0: 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 rc__) && !define
14b0: 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 20 26 d(__sparc64__) &
14c0: 26 20 64 65 66 69 6e 65 64 28 73 75 6e 29 20 26 & defined(sun) &
14d0: 26 20 21 28 64 65 66 69 6e 65 64 28 5f 5f 53 54 & !(defined(__ST
14e0: 44 43 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 DC__) || defined
14f0: 28 5f 5f 47 4e 55 43 5f 5f 29 29 20 2f 2a 20 73 (__GNUC__)) /* s
1500: 75 6e 20 63 63 20 2a 2f 0a 20 20 09 09 09 09 20 un cc */. ....
1510: 20 5f 5f 56 41 5f 53 55 4e 43 43 5f 53 54 52 55 __VA_SUNCC_STRU
1520: 43 54 5f 52 45 54 55 52 4e 2c 0a 23 65 6c 73 65 CT_RETURN,.#else
1530: 0a 20 20 09 09 09 09 20 20 30 2c 0a 23 65 6e 64 . .... 0,.#end
1540: 69 66 0a 23 65 6c 73 65 0a 23 69 66 20 64 65 66 if.#else.#if def
1550: 69 6e 65 64 28 5f 5f 53 4d 41 4c 4c 5f 53 54 52 ined(__SMALL_STR
1560: 55 43 54 5f 52 45 54 55 52 4e 5f 5f 29 20 7c 7c UCT_RETURN__) ||
1570: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e defined(__mipsn
1580: 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 32__) || defined
1590: 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 2f 2a 20 (__mips64__) /*
15a0: 64 65 66 69 6e 65 64 20 74 68 72 6f 75 67 68 20 defined through
15b0: 63 6f 6e 66 69 67 75 72 65 2c 20 73 65 65 20 61 configure, see a
15c0: 62 6f 76 65 20 2a 2f 0a 09 09 09 09 20 20 5f 5f bove */..... __
15d0: 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f VA_SMALL_STRUCT_
15e0: 52 45 54 55 52 4e 20 7c 0a 23 65 6e 64 69 66 0a RETURN |.#endif.
15f0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 47 4e #if defined(__GN
1600: 55 43 5f 5f 29 0a 09 09 09 09 20 20 5f 5f 56 41 UC__)..... __VA
1610: 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 _GCC_STRUCT_RETU
1620: 52 4e 20 7c 0a 23 65 6e 64 69 66 0a 23 69 66 20 RN |.#endif.#if
1630: 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f defined(__i386__
1640: 29 20 26 26 20 64 65 66 69 6e 65 64 28 4e 65 58 ) && defined(NeX
1650: 54 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f 5f T) && defined(__
1660: 47 4e 55 43 5f 5f 29 20 2f 2a 20 4e 65 58 54 20 GNUC__) /* NeXT
1670: 67 63 63 2d 32 2e 35 2e 38 20 2a 2f 0a 09 09 09 gcc-2.5.8 */....
1680: 09 20 20 5f 5f 56 41 5f 4e 45 58 54 47 43 43 5f . __VA_NEXTGCC_
1690: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 0a STRUCT_RETURN |.
16a0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
16b0: 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 26 26 20 ed(__i386__) &&
16c0: 64 65 66 69 6e 65 64 28 5f 4d 53 43 5f 56 45 52 defined(_MSC_VER
16d0: 29 20 2f 2a 20 4d 53 56 43 20 34 2e 30 20 2a 2f ) /* MSVC 4.0 */
16e0: 0a 09 09 09 09 20 20 5f 5f 56 41 5f 4d 53 56 43 ..... __VA_MSVC
16f0: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 7c _STRUCT_RETURN |
1700: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
1710: 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 20 26 26 ned(__hppa__) &&
1720: 20 64 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f defined(__GNUC_
1730: 5f 29 20 26 26 20 28 5f 5f 47 4e 55 43 5f 5f 20 _) && (__GNUC__
1740: 3c 20 33 29 20 26 26 20 28 5f 5f 47 4e 55 43 5f < 3) && (__GNUC_
1750: 4d 49 4e 4f 52 5f 5f 20 3c 20 37 29 0a 09 09 09 MINOR__ < 7)....
1760: 09 20 20 5f 5f 56 41 5f 4f 4c 44 47 43 43 5f 53 . __VA_OLDGCC_S
1770: 54 52 55 43 54 5f 52 45 54 55 52 4e 20 7c 0a 23 TRUCT_RETURN |.#
1780: 65 6e 64 69 66 0a 20 20 09 09 09 09 20 20 30 2c endif. .... 0,
1790: 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 23 .#endif.#endif.#
17a0: 65 6e 64 69 66 0a 0a 20 20 2f 2a 20 68 6f 77 20 endif.. /* how
17b0: 74 6f 20 72 65 74 75 72 6e 20 66 6c 6f 61 74 73 to return floats
17c0: 20 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 */.#if defined(
17d0: 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 28 64 65 __m68k__) || (de
17e0: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 fined(__sparc__)
17f0: 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 && !defined(__s
1800: 70 61 72 63 36 34 5f 5f 29 29 0a 20 20 5f 5f 56 parc64__)). __V
1810: 41 5f 53 55 4e 43 43 5f 46 4c 4f 41 54 5f 52 45 A_SUNCC_FLOAT_RE
1820: 54 55 52 4e 09 3d 20 31 3c 3c 35 2c 0a 23 65 6e TURN.= 1<<5,.#en
1830: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
1840: 5f 5f 6d 36 38 6b 5f 5f 29 0a 20 20 5f 5f 56 41 __m68k__). __VA
1850: 5f 46 52 45 47 5f 46 4c 4f 41 54 5f 52 45 54 55 _FREG_FLOAT_RETU
1860: 52 4e 09 3d 20 31 3c 3c 36 2c 0a 23 65 6e 64 69 RN.= 1<<6,.#endi
1870: 66 0a 20 20 2f 2a 20 74 68 65 20 64 65 66 61 75 f. /* the defau
1880: 6c 74 20 77 61 79 20 74 6f 20 72 65 74 75 72 6e lt way to return
1890: 20 66 6c 6f 61 74 73 20 2a 2f 0a 20 20 2f 2a 20 floats */. /*
18a0: 54 68 69 73 20 63 68 6f 69 63 65 20 68 65 72 65 This choice here
18b0: 20 69 73 20 62 61 73 65 64 20 6f 6e 20 74 68 65 is based on the
18c0: 20 61 73 73 75 6d 70 74 69 6f 6e 20 74 68 61 74 assumption that
18d0: 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 79 6f the function yo
18e0: 75 20 61 72 65 0a 20 20 20 2a 20 67 6f 69 6e 67 u are. * going
18f0: 20 74 6f 20 63 61 6c 6c 20 68 61 73 20 62 65 65 to call has bee
1900: 6e 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 n compiled with
1910: 74 68 65 20 73 61 6d 65 20 63 6f 6d 70 69 6c 65 the same compile
1920: 72 20 79 6f 75 20 61 72 65 20 75 73 69 6e 67 20 r you are using
1930: 74 6f 0a 20 20 20 2a 20 69 6e 63 6c 75 64 65 20 to. * include
1940: 74 68 69 73 20 66 69 6c 65 2e 0a 20 20 20 2a 20 this file.. *
1950: 49 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 If you want to c
1960: 61 6c 6c 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 all functions wi
1970: 74 68 20 61 6e 6f 74 68 65 72 20 66 6c 6f 61 74 th another float
1980: 20 72 65 74 75 72 6e 69 6e 67 20 63 6f 6e 76 65 returning conve
1990: 6e 74 69 6f 6e 2c 0a 20 20 20 2a 20 6a 75 73 74 ntion,. * just
19a0: 20 20 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f 46 #define __VA_F
19b0: 4c 4f 41 54 5f 52 45 54 55 52 4e 20 2e 2e 2e 0a LOAT_RETURN ....
19c0: 20 20 20 2a 20 62 65 66 6f 72 65 20 6f 72 20 61 * before or a
19d0: 66 74 65 72 20 23 69 6e 63 6c 75 64 69 6e 67 20 fter #including
19e0: 3c 76 61 63 61 6c 6c 5f 72 2e 68 3e 2e 0a 20 20 <vacall_r.h>..
19f0: 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 56 41 */.#ifndef __VA
1a00: 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 0a 23 69 _FLOAT_RETURN.#i
1a10: 66 20 28 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 f (defined(__m68
1a20: 6b 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 k__) || (defined
1a30: 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 (__sparc__) && !
1a40: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
1a50: 34 5f 5f 29 29 29 20 26 26 20 21 64 65 66 69 6e 4__))) && !defin
1a60: 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 26 26 20 ed(__GNUC__) &&
1a70: 64 65 66 69 6e 65 64 28 73 75 6e 29 20 26 26 20 defined(sun) &&
1a80: 21 64 65 66 69 6e 65 64 28 5f 5f 53 55 4e 50 52 !defined(__SUNPR
1a90: 4f 5f 43 29 20 20 2f 2a 20 73 75 6e 20 63 63 20 O_C) /* sun cc
1aa0: 2a 2f 0a 20 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f */. __VA_FLOAT_
1ab0: 52 45 54 55 52 4e 09 09 3d 20 5f 5f 56 41 5f 53 RETURN..= __VA_S
1ac0: 55 4e 43 43 5f 46 4c 4f 41 54 5f 52 45 54 55 52 UNCC_FLOAT_RETUR
1ad0: 4e 2c 0a 23 65 6c 69 66 20 28 64 65 66 69 6e 65 N,.#elif (define
1ae0: 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 26 26 20 21 d(__m68k__) && !
1af0: 64 65 66 69 6e 65 64 28 5f 5f 49 52 45 47 5f 46 defined(__IREG_F
1b00: 4c 4f 41 54 5f 52 45 54 55 52 4e 5f 5f 29 29 0a LOAT_RETURN__)).
1b10: 20 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 52 45 54 __VA_FLOAT_RET
1b20: 55 52 4e 09 09 3d 20 5f 5f 56 41 5f 46 52 45 47 URN..= __VA_FREG
1b30: 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 2c 0a 23 _FLOAT_RETURN,.#
1b40: 65 6c 73 65 0a 20 20 5f 5f 56 41 5f 46 4c 4f 41 else. __VA_FLOA
1b50: 54 5f 52 45 54 55 52 4e 09 09 3d 20 30 2c 0a 23 T_RETURN..= 0,.#
1b60: 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0a 20 20 endif.#endif..
1b70: 2f 2a 20 68 6f 77 20 74 6f 20 70 61 73 73 20 73 /* how to pass s
1b80: 74 72 75 63 74 73 20 2a 2f 0a 23 69 66 20 64 65 tructs */.#if de
1b90: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 fined(__mips__)
1ba0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 || defined(__mip
1bb0: 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e sn32__) || defin
1bc0: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 ed(__mips64__).
1bd0: 20 5f 5f 56 41 5f 53 47 49 43 43 5f 53 54 52 55 __VA_SGICC_STRU
1be0: 43 54 5f 41 52 47 53 09 3d 20 31 3c 3c 37 2c 0a CT_ARGS.= 1<<7,.
1bf0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
1c00: 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 0a 20 ed(__rs6000__).
1c10: 20 5f 5f 56 41 5f 41 49 58 43 43 5f 53 54 52 55 __VA_AIXCC_STRU
1c20: 43 54 5f 41 52 47 53 09 3d 20 31 3c 3c 37 2c 0a CT_ARGS.= 1<<7,.
1c30: 23 65 6e 64 69 66 0a 20 20 2f 2a 20 74 68 65 20 #endif. /* the
1c40: 64 65 66 61 75 6c 74 20 77 61 79 20 74 6f 20 70 default way to p
1c50: 61 73 73 20 66 6c 6f 61 74 73 20 2a 2f 0a 20 20 ass floats */.
1c60: 2f 2a 20 54 68 69 73 20 63 68 6f 69 63 65 20 68 /* This choice h
1c70: 65 72 65 20 69 73 20 62 61 73 65 64 20 6f 6e 20 ere is based on
1c80: 74 68 65 20 61 73 73 75 6d 70 74 69 6f 6e 20 74 the assumption t
1c90: 68 61 74 20 74 68 65 20 66 75 6e 63 74 69 6f 6e hat the function
1ca0: 20 79 6f 75 20 61 72 65 0a 20 20 20 2a 20 67 6f you are. * go
1cb0: 69 6e 67 20 74 6f 20 63 61 6c 6c 20 68 61 73 20 ing to call has
1cc0: 62 65 65 6e 20 63 6f 6d 70 69 6c 65 64 20 77 69 been compiled wi
1cd0: 74 68 20 74 68 65 20 73 61 6d 65 20 63 6f 6d 70 th the same comp
1ce0: 69 6c 65 72 20 79 6f 75 20 61 72 65 20 75 73 69 iler you are usi
1cf0: 6e 67 20 74 6f 0a 20 20 20 2a 20 69 6e 63 6c 75 ng to. * inclu
1d00: 64 65 20 74 68 69 73 20 66 69 6c 65 2e 0a 20 20 de this file..
1d10: 20 2a 20 49 66 20 79 6f 75 20 77 61 6e 74 20 74 * If you want t
1d20: 6f 20 63 61 6c 6c 20 66 75 6e 63 74 69 6f 6e 73 o call functions
1d30: 20 77 69 74 68 20 61 6e 6f 74 68 65 72 20 66 6c with another fl
1d40: 6f 61 74 20 70 61 73 73 69 6e 67 20 63 6f 6e 76 oat passing conv
1d50: 65 6e 74 69 6f 6e 2c 0a 20 20 20 2a 20 6a 75 73 ention,. * jus
1d60: 74 20 20 23 64 65 66 69 6e 65 20 5f 5f 56 41 5f t #define __VA_
1d70: 53 54 52 55 43 54 5f 41 52 47 53 20 2e 2e 2e 0a STRUCT_ARGS ....
1d80: 20 20 20 2a 20 62 65 66 6f 72 65 20 6f 72 20 61 * before or a
1d90: 66 74 65 72 20 23 69 6e 63 6c 75 64 69 6e 67 20 fter #including
1da0: 3c 76 61 63 61 6c 6c 5f 72 2e 68 3e 2e 0a 20 20 <vacall_r.h>..
1db0: 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f 56 41 */.#ifndef __VA
1dc0: 5f 53 54 52 55 43 54 5f 41 52 47 53 0a 23 69 66 _STRUCT_ARGS.#if
1dd0: 20 28 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 (defined(__mips
1de0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
1df0: 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 _mipsn32__) || d
1e00: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f efined(__mips64_
1e10: 5f 29 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 _)) && !defined(
1e20: 5f 5f 47 4e 55 43 5f 5f 29 20 2f 2a 20 53 47 49 __GNUC__) /* SGI
1e30: 20 6d 69 70 73 20 63 63 20 2a 2f 0a 20 20 5f 5f mips cc */. __
1e40: 56 41 5f 53 54 52 55 43 54 5f 41 52 47 53 09 09 VA_STRUCT_ARGS..
1e50: 3d 20 5f 5f 56 41 5f 53 47 49 43 43 5f 53 54 52 = __VA_SGICC_STR
1e60: 55 43 54 5f 41 52 47 53 2c 0a 23 65 6c 73 65 0a UCT_ARGS,.#else.
1e70: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 #if defined(__rs
1e80: 36 30 30 30 5f 5f 29 20 26 26 20 64 65 66 69 6e 6000__) && defin
1e90: 65 64 28 5f 41 49 58 29 20 26 26 20 21 64 65 66 ed(_AIX) && !def
1ea0: 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 20 2f ined(__GNUC__) /
1eb0: 2a 20 41 49 58 20 63 63 2c 20 78 6c 63 20 2a 2f * AIX cc, xlc */
1ec0: 0a 20 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 . __VA_STRUCT_A
1ed0: 52 47 53 09 09 3d 20 5f 5f 56 41 5f 41 49 58 43 RGS..= __VA_AIXC
1ee0: 43 5f 53 54 52 55 43 54 5f 41 52 47 53 2c 0a 23 C_STRUCT_ARGS,.#
1ef0: 65 6c 73 65 0a 20 20 5f 5f 56 41 5f 53 54 52 55 else. __VA_STRU
1f00: 43 54 5f 41 52 47 53 09 09 3d 20 30 2c 0a 23 65 CT_ARGS..= 0,.#e
1f10: 6e 64 69 66 0a 23 65 6e 64 69 66 0a 23 65 6e 64 ndif.#endif.#end
1f20: 69 66 0a 0a 20 20 2f 2a 20 68 6f 77 20 74 6f 20 if.. /* how to
1f30: 70 61 73 73 20 66 6c 6f 61 74 73 20 2a 2f 0a 20 pass floats */.
1f40: 20 2f 2a 20 41 4e 53 49 20 43 20 63 6f 6d 70 69 /* ANSI C compi
1f50: 6c 65 72 73 20 61 6e 64 20 47 4e 55 20 67 63 63 lers and GNU gcc
1f60: 20 70 61 73 73 20 66 6c 6f 61 74 73 20 61 73 20 pass floats as
1f70: 66 6c 6f 61 74 73 2e 0a 20 20 20 2a 20 4b 26 52 floats.. * K&R
1f80: 20 43 20 63 6f 6d 70 69 6c 65 72 73 20 70 61 73 C compilers pas
1f90: 73 20 66 6c 6f 61 74 73 20 61 73 20 64 6f 75 62 s floats as doub
1fa0: 6c 65 73 2e 0a 20 20 20 2a 20 28 45 78 63 65 70 les.. * (Excep
1fb0: 74 20 73 6f 6d 65 20 63 6f 6d 70 69 6c 65 72 73 t some compilers
1fc0: 20 6c 69 6b 65 20 53 47 49 20 4d 49 50 53 20 22 like SGI MIPS "
1fd0: 63 63 22 20 61 6e 64 20 22 63 63 20 2d 63 63 6b cc" and "cc -cck
1fe0: 72 22 20 69 66 20 61 20 70 72 6f 74 6f 74 79 70 r" if a prototyp
1ff0: 65 20 69 73 0a 20 20 20 2a 20 6b 6e 6f 77 6e 20 e is. * known
2000: 66 6f 72 20 74 68 65 20 63 61 6c 6c 65 64 20 66 for the called f
2010: 75 6e 63 74 69 6f 6e 73 2e 20 42 75 74 20 74 6f unctions. But to
2020: 20 63 6f 6d 70 69 6c 65 20 61 20 70 72 6f 67 72 compile a progr
2030: 61 6d 20 77 69 74 68 20 70 72 6f 74 6f 74 79 70 am with prototyp
2040: 65 73 2c 0a 20 20 20 2a 20 22 63 63 20 2d 61 6e es,. * "cc -an
2050: 73 69 22 20 69 73 20 62 65 74 74 65 72 20 61 6e si" is better an
2060: 79 77 61 79 2e 0a 20 20 20 2a 2f 0a 20 20 5f 5f yway.. */. __
2070: 56 41 5f 41 4e 53 49 5f 46 4c 4f 41 54 5f 41 52 VA_ANSI_FLOAT_AR
2080: 47 53 09 09 3d 20 30 2c 20 20 20 20 2f 2a 20 70 GS..= 0, /* p
2090: 61 73 73 20 66 6c 6f 61 74 73 20 61 73 20 66 6c ass floats as fl
20a0: 6f 61 74 73 20 2a 2f 0a 20 20 5f 5f 56 41 5f 54 oats */. __VA_T
20b0: 52 41 44 49 54 49 4f 4e 41 4c 5f 46 4c 4f 41 54 RADITIONAL_FLOAT
20c0: 5f 41 52 47 53 09 3d 20 31 3c 3c 38 2c 20 2f 2a _ARGS.= 1<<8, /*
20d0: 20 70 61 73 73 20 66 6c 6f 61 74 73 20 61 73 20 pass floats as
20e0: 64 6f 75 62 6c 65 73 20 2a 2f 0a 20 20 2f 2a 20 doubles */. /*
20f0: 74 68 65 20 64 65 66 61 75 6c 74 20 77 61 79 20 the default way
2100: 74 6f 20 70 61 73 73 20 66 6c 6f 61 74 73 20 2a to pass floats *
2110: 2f 0a 20 20 2f 2a 20 54 68 69 73 20 63 68 6f 69 /. /* This choi
2120: 63 65 20 68 65 72 65 20 69 73 20 62 61 73 65 64 ce here is based
2130: 20 6f 6e 20 74 68 65 20 61 73 73 75 6d 70 74 69 on the assumpti
2140: 6f 6e 20 74 68 61 74 20 74 68 65 20 66 75 6e 63 on that the func
2150: 74 69 6f 6e 20 79 6f 75 20 61 72 65 0a 20 20 20 tion you are.
2160: 2a 20 67 6f 69 6e 67 20 74 6f 20 63 61 6c 6c 20 * going to call
2170: 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 69 6c 65 has been compile
2180: 64 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 20 d with the same
2190: 63 6f 6d 70 69 6c 65 72 20 79 6f 75 20 61 72 65 compiler you are
21a0: 20 75 73 69 6e 67 20 74 6f 0a 20 20 20 2a 20 69 using to. * i
21b0: 6e 63 6c 75 64 65 20 74 68 69 73 20 66 69 6c 65 nclude this file
21c0: 2e 0a 20 20 20 2a 20 49 66 20 79 6f 75 20 77 61 .. * If you wa
21d0: 6e 74 20 74 6f 20 63 61 6c 6c 20 66 75 6e 63 74 nt to call funct
21e0: 69 6f 6e 73 20 77 69 74 68 20 61 6e 6f 74 68 65 ions with anothe
21f0: 72 20 66 6c 6f 61 74 20 70 61 73 73 69 6e 67 20 r float passing
2200: 63 6f 6e 76 65 6e 74 69 6f 6e 2c 0a 20 20 20 2a convention,. *
2210: 20 6a 75 73 74 20 20 23 64 65 66 69 6e 65 20 5f just #define _
2220: 5f 56 41 5f 46 4c 4f 41 54 5f 41 52 47 53 20 2e _VA_FLOAT_ARGS .
2230: 2e 2e 0a 20 20 20 2a 20 62 65 66 6f 72 65 20 6f ... * before o
2240: 72 20 61 66 74 65 72 20 23 69 6e 63 6c 75 64 69 r after #includi
2250: 6e 67 20 3c 76 61 63 61 6c 6c 5f 72 2e 68 3e 2e ng <vacall_r.h>.
2260: 0a 20 20 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f . */.#ifndef _
2270: 5f 56 41 5f 46 4c 4f 41 54 5f 41 52 47 53 0a 23 _VA_FLOAT_ARGS.#
2280: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 53 54 44 if defined(__STD
2290: 43 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 C__) || defined(
22a0: 5f 5f 47 4e 55 43 5f 5f 29 20 2f 2a 20 77 68 61 __GNUC__) /* wha
22b0: 74 20 61 62 6f 75 74 20 68 70 70 61 20 22 63 63 t about hppa "cc
22c0: 20 2d 41 61 22 20 3f 3f 20 2a 2f 0a 20 20 5f 5f -Aa" ?? */. __
22d0: 56 41 5f 46 4c 4f 41 54 5f 41 52 47 53 09 09 3d VA_FLOAT_ARGS..=
22e0: 20 5f 5f 56 41 5f 41 4e 53 49 5f 46 4c 4f 41 54 __VA_ANSI_FLOAT
22f0: 5f 41 52 47 53 2c 0a 23 65 6c 73 65 0a 20 20 5f _ARGS,.#else. _
2300: 5f 56 41 5f 46 4c 4f 41 54 5f 41 52 47 53 09 09 _VA_FLOAT_ARGS..
2310: 3d 20 5f 5f 56 41 5f 54 52 41 44 49 54 49 4f 4e = __VA_TRADITION
2320: 41 4c 5f 46 4c 4f 41 54 5f 41 52 47 53 2c 0a 23 AL_FLOAT_ARGS,.#
2330: 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a 0a 20 20 endif.#endif..
2340: 2f 2a 20 68 6f 77 20 74 6f 20 70 61 73 73 20 61 /* how to pass a
2350: 6e 64 20 72 65 74 75 72 6e 20 73 6d 61 6c 6c 20 nd return small
2360: 69 6e 74 65 67 65 72 20 61 72 67 75 6d 65 6e 74 integer argument
2370: 73 20 2a 2f 0a 20 20 5f 5f 56 41 5f 41 4e 53 49 s */. __VA_ANSI
2380: 5f 49 4e 54 45 47 45 52 53 09 09 3d 20 30 2c 20 _INTEGERS..= 0,
2390: 2f 2a 20 6e 6f 20 70 72 6f 6d 6f 74 69 6f 6e 73 /* no promotions
23a0: 20 2a 2f 0a 20 20 5f 5f 56 41 5f 54 52 41 44 49 */. __VA_TRADI
23b0: 54 49 4f 4e 41 4c 5f 49 4e 54 45 47 45 52 53 09 TIONAL_INTEGERS.
23c0: 3d 20 30 2c 20 2f 2a 20 70 72 6f 6d 6f 74 65 20 = 0, /* promote
23d0: 5b 75 5d 63 68 61 72 2c 20 5b 75 5d 73 68 6f 72 [u]char, [u]shor
23e0: 74 20 74 6f 20 5b 75 5d 69 6e 74 20 2a 2f 0a 20 t to [u]int */.
23f0: 20 2f 2a 20 46 6f 72 74 75 6e 61 74 65 6c 79 20 /* Fortunately
2400: 74 68 65 73 65 20 74 77 6f 20 6d 65 74 68 6f 64 these two method
2410: 73 20 61 72 65 20 63 6f 6d 70 61 74 69 62 6c 65 s are compatible
2420: 2e 20 4f 75 72 20 6d 61 63 72 6f 73 20 77 6f 72 . Our macros wor
2430: 6b 20 77 69 74 68 20 62 6f 74 68 2e 20 2a 2f 0a k with both. */.
2440: 20 20 2f 2a 20 74 68 65 20 64 65 66 61 75 6c 74 /* the default
2450: 20 77 61 79 20 74 6f 20 70 61 73 73 20 61 6e 64 way to pass and
2460: 20 72 65 74 75 72 6e 20 73 6d 61 6c 6c 20 69 6e return small in
2470: 74 65 67 65 72 20 61 72 67 75 6d 65 6e 74 73 20 teger arguments
2480: 2a 2f 0a 20 20 2f 2a 20 54 68 69 73 20 63 68 6f */. /* This cho
2490: 69 63 65 20 68 65 72 65 20 69 73 20 62 61 73 65 ice here is base
24a0: 64 20 6f 6e 20 74 68 65 20 61 73 73 75 6d 70 74 d on the assumpt
24b0: 69 6f 6e 20 74 68 61 74 20 74 68 65 20 66 75 6e ion that the fun
24c0: 63 74 69 6f 6e 20 79 6f 75 20 61 72 65 0a 20 20 ction you are.
24d0: 20 2a 20 67 6f 69 6e 67 20 74 6f 20 63 61 6c 6c * going to call
24e0: 20 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 69 6c has been compil
24f0: 65 64 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 ed with the same
2500: 20 63 6f 6d 70 69 6c 65 72 20 79 6f 75 20 61 72 compiler you ar
2510: 65 20 75 73 69 6e 67 20 74 6f 0a 20 20 20 2a 20 e using to. *
2520: 69 6e 63 6c 75 64 65 20 74 68 69 73 20 66 69 6c include this fil
2530: 65 2e 0a 20 20 20 2a 20 49 66 20 79 6f 75 20 77 e.. * If you w
2540: 61 6e 74 20 74 6f 20 63 61 6c 6c 20 66 75 6e 63 ant to call func
2550: 74 69 6f 6e 73 20 77 69 74 68 20 61 6e 6f 74 68 tions with anoth
2560: 65 72 20 66 6c 6f 61 74 20 70 61 73 73 69 6e 67 er float passing
2570: 20 63 6f 6e 76 65 6e 74 69 6f 6e 2c 0a 20 20 20 convention,.
2580: 2a 20 6a 75 73 74 20 20 23 64 65 66 69 6e 65 20 * just #define
2590: 5f 5f 56 41 5f 49 4e 54 45 47 45 52 53 20 2e 2e __VA_INTEGERS ..
25a0: 2e 0a 20 20 20 2a 20 62 65 66 6f 72 65 20 6f 72 .. * before or
25b0: 20 61 66 74 65 72 20 23 69 6e 63 6c 75 64 69 6e after #includin
25c0: 67 20 3c 76 61 63 61 6c 6c 5f 72 2e 68 3e 2e 0a g <vacall_r.h>..
25d0: 20 20 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 5f */.#ifndef __
25e0: 56 41 5f 49 4e 54 45 47 45 52 53 0a 23 69 66 20 VA_INTEGERS.#if
25f0: 64 65 66 69 6e 65 64 28 5f 5f 53 54 44 43 5f 5f defined(__STDC__
2600: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 47 ) || defined(__G
2610: 4e 55 43 5f 5f 29 0a 20 20 5f 5f 56 41 5f 49 4e NUC__). __VA_IN
2620: 54 45 47 45 52 53 09 09 09 3d 20 5f 5f 56 41 5f TEGERS...= __VA_
2630: 41 4e 53 49 5f 49 4e 54 45 47 45 52 53 2c 0a 23 ANSI_INTEGERS,.#
2640: 65 6c 73 65 0a 20 20 5f 5f 56 41 5f 49 4e 54 45 else. __VA_INTE
2650: 47 45 52 53 09 09 09 3d 20 5f 5f 56 41 5f 54 52 GERS...= __VA_TR
2660: 41 44 49 54 49 4f 4e 41 4c 5f 49 4e 54 45 47 45 ADITIONAL_INTEGE
2670: 52 53 2c 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 RS,.#endif.#endi
2680: 66 0a 0a 20 20 2f 2a 20 73 74 61 63 6b 20 63 6c f.. /* stack cl
2690: 65 61 6e 75 70 20 70 6f 6c 69 63 79 20 2a 2f 0a eanup policy */.
26a0: 20 20 5f 5f 56 41 5f 43 44 45 43 4c 5f 43 4c 45 __VA_CDECL_CLE
26b0: 41 4e 55 50 09 09 3d 20 30 2c 20 2f 2a 20 63 61 ANUP..= 0, /* ca
26c0: 6c 6c 65 72 20 70 6f 70 73 20 61 72 67 73 20 61 ller pops args a
26d0: 66 74 65 72 20 72 65 74 75 72 6e 20 2a 2f 0a 20 fter return */.
26e0: 20 5f 5f 56 41 5f 53 54 44 43 41 4c 4c 5f 43 4c __VA_STDCALL_CL
26f0: 45 41 4e 55 50 09 09 3d 20 31 3c 3c 39 2c 20 2f EANUP..= 1<<9, /
2700: 2a 20 63 61 6c 6c 65 65 20 70 6f 70 73 20 61 72 * callee pops ar
2710: 67 73 20 62 65 66 6f 72 65 20 72 65 74 75 72 6e gs before return
2720: 20 2a 2f 0a 09 09 09 09 20 20 20 20 20 2f 2a 20 */..... /*
2730: 63 75 72 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 73 currently only s
2740: 75 70 70 6f 72 74 65 64 20 6f 6e 20 5f 5f 69 33 upported on __i3
2750: 38 36 5f 5f 20 2a 2f 0a 23 69 66 6e 64 65 66 20 86__ */.#ifndef
2760: 5f 5f 56 41 5f 43 4c 45 41 4e 55 50 0a 20 20 5f __VA_CLEANUP. _
2770: 5f 56 41 5f 43 4c 45 41 4e 55 50 09 09 09 3d 20 _VA_CLEANUP...=
2780: 5f 5f 56 41 5f 43 44 45 43 4c 5f 43 4c 45 41 4e __VA_CDECL_CLEAN
2790: 55 50 2c 0a 23 65 6e 64 69 66 0a 0a 20 20 2f 2a UP,.#endif.. /*
27a0: 20 54 68 65 73 65 20 61 72 65 20 66 6f 72 20 69 These are for i
27b0: 6e 74 65 72 6e 61 6c 20 75 73 65 20 6f 6e 6c 79 nternal use only
27c0: 20 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 */.#if defined(
27d0: 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 __i386__) || def
27e0: 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c ined(__m68k__) |
27f0: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 | defined(__mips
2800: 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 n32__) || define
2810: 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c d(__mips64__) ||
2820: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
2830: 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 64__) || defined
2840: 28 5f 5f 61 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 (__alpha__) || d
2850: 65 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 efined(__arm__)
2860: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 || defined(__rs6
2870: 30 30 30 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 000__) || define
2880: 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c d(__convex__) ||
2890: 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f defined(__ia64_
28a0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
28b0: 78 38 36 5f 36 34 5f 5f 29 20 7c 7c 20 64 65 66 x86_64__) || def
28c0: 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 20 ined(__s390__).
28d0: 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 __VA_REGISTER_S
28e0: 54 52 55 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 TRUCT_RETURN.= 1
28f0: 3c 3c 31 30 2c 0a 23 65 6e 64 69 66 0a 23 69 66 <<10,.#endif.#if
2900: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f defined(__mips_
2910: 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f _) && !defined(_
2920: 5f 6d 69 70 73 6e 33 32 5f 5f 29 0a 20 20 5f 5f _mipsn32__). __
2930: 56 41 5f 46 4c 4f 41 54 5f 31 09 09 09 3d 20 31 VA_FLOAT_1...= 1
2940: 3c 3c 31 31 2c 0a 20 20 5f 5f 56 41 5f 46 4c 4f <<11,. __VA_FLO
2950: 41 54 5f 32 09 09 09 3d 20 31 3c 3c 31 32 2c 0a AT_2...= 1<<12,.
2960: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
2970: 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 ed(__mipsn32__)
2980: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 || defined(__mip
2990: 73 36 34 5f 5f 29 0a 20 20 5f 5f 56 41 5f 52 45 s64__). __VA_RE
29a0: 47 49 53 54 45 52 5f 46 4c 4f 41 54 53 54 52 55 GISTER_FLOATSTRU
29b0: 43 54 5f 52 45 54 55 52 4e 09 3d 20 31 3c 3c 31 CT_RETURN.= 1<<1
29c0: 33 2c 0a 20 20 5f 5f 56 41 5f 52 45 47 49 53 54 3,. __VA_REGIST
29d0: 45 52 5f 44 4f 55 42 4c 45 53 54 52 55 43 54 5f ER_DOUBLESTRUCT_
29e0: 52 45 54 55 52 4e 09 3d 20 31 3c 3c 31 34 2c 0a RETURN.= 1<<14,.
29f0: 23 65 6e 64 69 66 0a 0a 20 20 5f 5f 56 41 5f 66 #endif.. __VA_f
2a00: 6c 61 67 5f 66 6f 72 5f 62 72 6f 6b 65 6e 5f 63 lag_for_broken_c
2a10: 6f 6d 70 69 6c 65 72 73 5f 74 68 61 74 5f 64 6f ompilers_that_do
2a20: 6e 74 5f 6c 69 6b 65 5f 74 72 61 69 6c 69 6e 67 nt_like_trailing
2a30: 5f 63 6f 6d 6d 61 73 0a 7d 3b 0a 0a 2f 2a 0a 20 _commas.};../*.
2a40: 2a 20 44 65 66 69 6e 69 74 69 6f 6e 20 6f 66 20 * Definition of
2a50: 74 68 65 20 60 76 61 5f 61 6c 69 73 74 27 20 74 the `va_alist' t
2a60: 79 70 65 2e 0a 20 2a 2f 0a 74 79 70 65 64 65 66 ype.. */.typedef
2a70: 20 73 74 72 75 63 74 0a 7b 0a 20 20 2f 2a 20 73 struct.{. /* s
2a80: 6f 6d 65 20 76 61 5f 2e 2e 2e 20 6d 61 63 72 6f ome va_... macro
2a90: 73 20 6e 65 65 64 20 74 68 65 73 65 20 66 6c 61 s need these fla
2aa0: 67 73 20 2a 2f 0a 20 20 69 6e 74 20 20 20 20 20 gs */. int
2ab0: 20 20 20 20 20 20 20 66 6c 61 67 73 3b 0a 20 20 flags;.
2ac0: 2f 2a 20 63 75 72 72 65 6e 74 20 70 6f 69 6e 74 /* current point
2ad0: 65 72 20 69 6e 74 6f 20 74 68 65 20 61 72 67 75 er into the argu
2ae0: 6d 65 6e 74 20 61 72 72 61 79 20 2a 2f 0a 20 20 ment array */.
2af0: 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 20 61 unsigned long a
2b00: 70 74 72 3b 0a 20 20 2f 2a 20 73 74 72 75 63 74 ptr;. /* struct
2b10: 75 72 65 20 72 65 74 75 72 6e 20 70 6f 69 6e 74 ure return point
2b20: 65 72 2c 20 72 65 74 75 72 6e 20 74 79 70 65 2c er, return type,
2b30: 20 72 65 74 75 72 6e 20 74 79 70 65 20 73 69 7a return type siz
2b40: 65 20 2a 2f 0a 20 20 76 6f 69 64 2a 20 20 20 20 e */. void*
2b50: 20 20 20 20 20 20 72 61 64 64 72 3b 0a 20 20 65 raddr;. e
2b60: 6e 75 6d 20 5f 5f 56 41 74 79 70 65 20 20 72 74 num __VAtype rt
2b70: 79 70 65 3b 0a 20 20 75 6e 73 69 67 6e 65 64 20 ype;. unsigned
2b80: 6c 6f 6e 67 20 20 72 73 69 7a 65 3b 0a 23 69 66 long rsize;.#if
2b90: 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f defined(__i386_
2ba0: 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f _) || (defined(_
2bb0: 5f 72 73 36 30 30 30 5f 5f 29 20 26 26 20 64 65 _rs6000__) && de
2bc0: 66 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 fined(__MACH__)
2bd0: 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 && defined(__APP
2be0: 4c 45 5f 5f 29 29 0a 20 20 2f 2a 20 46 69 6c 6c LE__)). /* Fill
2bf0: 65 72 20 77 6f 72 64 2c 20 6e 65 65 64 65 64 20 er word, needed
2c00: 69 66 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f if the numbers o
2c10: 66 20 77 6f 72 64 73 20 75 70 20 74 6f 20 6e 6f f words up to no
2c20: 77 20 69 6e 20 74 68 69 73 20 73 74 72 75 63 74 w in this struct
2c30: 75 72 65 20 2a 2f 0a 20 20 2f 2a 20 69 73 20 6f ure */. /* is o
2c40: 64 64 20 28 62 65 63 61 75 73 65 20 6f 6e 20 4d dd (because on M
2c50: 53 56 43 2c 20 61 6c 69 67 6e 6f 66 28 64 6f 75 SVC, alignof(dou
2c60: 62 6c 65 29 20 3d 20 38 2c 20 6e 6f 72 6d 61 6c ble) = 8, normal
2c70: 6c 79 20 3d 20 34 3b 20 73 69 6d 69 6c 61 72 6c ly = 4; similarl
2c80: 79 2c 20 20 2a 2f 0a 20 20 2f 2a 20 6f 6e 20 4d y, */. /* on M
2c90: 61 63 4f 53 20 58 2c 20 74 68 65 20 41 70 70 6c acOS X, the Appl
2ca0: 65 20 63 6f 6d 70 69 6c 65 72 20 68 61 73 20 61 e compiler has a
2cb0: 6c 69 67 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3d lignof(double) =
2cc0: 20 38 20 77 68 65 72 65 61 73 20 74 68 65 20 20 8 whereas the
2cd0: 20 20 20 20 2a 2f 0a 20 20 2f 2a 20 73 74 61 6e */. /* stan
2ce0: 64 61 72 64 20 47 43 43 20 68 61 73 20 61 6c 69 dard GCC has ali
2cf0: 67 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3d 20 34 gnof(double) = 4
2d00: 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
2d10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2d20: 20 20 20 20 2a 2f 0a 20 20 5f 5f 76 61 77 6f 72 */. __vawor
2d30: 64 20 20 20 20 20 20 20 66 69 6c 6c 65 72 31 3b d filler1;
2d40: 0a 23 65 6e 64 69 66 0a 20 20 2f 2a 20 74 65 6d .#endif. /* tem
2d50: 70 6f 72 61 72 79 20 73 74 6f 72 61 67 65 20 66 porary storage f
2d60: 6f 72 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 or return value
2d70: 2a 2f 0a 20 20 75 6e 69 6f 6e 20 7b 0a 20 20 20 */. union {.
2d80: 20 63 68 61 72 20 20 20 20 20 20 20 20 20 20 20 char
2d90: 20 20 20 20 20 5f 63 68 61 72 3b 0a 20 20 20 20 _char;.
2da0: 73 69 67 6e 65 64 20 63 68 61 72 20 20 20 20 20 signed char
2db0: 20 20 20 20 5f 73 63 68 61 72 3b 0a 20 20 20 20 _schar;.
2dc0: 75 6e 73 69 67 6e 65 64 20 63 68 61 72 20 20 20 unsigned char
2dd0: 20 20 20 20 5f 75 63 68 61 72 3b 0a 20 20 20 20 _uchar;.
2de0: 73 68 6f 72 74 20 20 20 20 20 20 20 20 20 20 20 short
2df0: 20 20 20 20 5f 73 68 6f 72 74 3b 0a 20 20 20 20 _short;.
2e00: 75 6e 73 69 67 6e 65 64 20 73 68 6f 72 74 20 20 unsigned short
2e10: 20 20 20 20 5f 75 73 68 6f 72 74 3b 0a 20 20 20 _ushort;.
2e20: 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 int
2e30: 20 20 20 20 20 5f 69 6e 74 3b 0a 20 20 20 20 75 _int;. u
2e40: 6e 73 69 67 6e 65 64 20 69 6e 74 20 20 20 20 20 nsigned int
2e50: 20 20 20 5f 75 69 6e 74 3b 0a 20 20 20 20 6c 6f _uint;. lo
2e60: 6e 67 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ng
2e70: 20 20 5f 6c 6f 6e 67 3b 0a 20 20 20 20 75 6e 73 _long;. uns
2e80: 69 67 6e 65 64 20 6c 6f 6e 67 20 20 20 20 20 20 igned long
2e90: 20 5f 75 6c 6f 6e 67 3b 0a 23 69 66 20 21 28 64 _ulong;.#if !(d
2ea0: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f efined(__mips64_
2eb0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
2ec0: 61 6c 70 68 61 5f 5f 29 29 20 26 26 20 64 65 66 alpha__)) && def
2ed0: 69 6e 65 64 28 48 41 56 45 5f 4c 4f 4e 47 4c 4f ined(HAVE_LONGLO
2ee0: 4e 47 29 0a 20 20 20 20 6c 6f 6e 67 20 6c 6f 6e NG). long lon
2ef0: 67 20 20 20 20 20 20 20 20 20 20 20 5f 6c 6f 6e g _lon
2f00: 67 6c 6f 6e 67 3b 0a 20 20 20 20 75 6e 73 69 67 glong;. unsig
2f10: 6e 65 64 20 6c 6f 6e 67 20 6c 6f 6e 67 20 20 5f ned long long _
2f20: 75 6c 6f 6e 67 6c 6f 6e 67 3b 0a 23 65 6e 64 69 ulonglong;.#endi
2f30: 66 0a 20 20 20 20 66 6c 6f 61 74 20 20 20 20 20 f. float
2f40: 20 20 20 20 20 20 20 20 20 20 5f 66 6c 6f 61 74 _float
2f50: 3b 0a 20 20 20 20 64 6f 75 62 6c 65 20 20 20 20 ;. double
2f60: 20 20 20 20 20 20 20 20 20 20 5f 64 6f 75 62 6c _doubl
2f70: 65 3b 0a 20 20 20 20 76 6f 69 64 2a 20 20 20 20 e;. void*
2f80: 20 20 20 20 20 20 20 20 20 20 20 5f 70 74 72 3b _ptr;
2f90: 0a 20 20 20 20 5f 5f 76 61 77 6f 72 64 20 20 20 . __vaword
2fa0: 20 20 20 20 20 20 20 20 20 5f 77 6f 72 64 73 5b _words[
2fb0: 32 5d 3b 0a 20 20 7d 20 20 20 20 20 20 20 20 20 2];. }
2fc0: 20 20 20 20 20 74 6d 70 3b 0a 23 69 66 20 64 65 tmp;.#if de
2fd0: 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 fined(__i386__)
2fe0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 || defined(__m68
2ff0: 6b 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 k__) || (defined
3000: 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 20 21 (__sparc__) && !
3010: 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 defined(__sparc6
3020: 34 5f 5f 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 4__)) || defined
3030: 28 5f 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 64 65 (__hppa__) || de
3040: 66 69 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 fined(__m88k__)
3050: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 || defined(__ia6
3060: 34 5f 5f 29 0a 20 20 76 6f 69 64 2a 20 20 20 20 4__). void*
3070: 20 20 20 20 20 20 73 74 72 75 63 74 72 61 64 64 structradd
3080: 72 3b 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 r;.#endif.#if de
3090: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 fined(__mips__)
30a0: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 || defined(__mip
30b0: 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e sn32__) || defin
30c0: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 20 7c ed(__mips64__) |
30d0: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 | defined(__alph
30e0: 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 a__) || defined(
30f0: 5f 5f 68 70 70 61 5f 5f 29 0a 20 20 6c 6f 6e 67 __hppa__). long
3100: 20 20 20 20 20 20 20 20 20 20 20 6d 65 6d 61 72 memar
3110: 67 70 74 72 3b 0a 23 65 6e 64 69 66 0a 23 69 66 gptr;.#endif.#if
3120: 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f defined(__hppa_
3130: 5f 29 0a 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 _). long
3140: 20 20 20 20 66 61 72 67 5f 6f 66 66 73 65 74 3b farg_offset;
3150: 0a 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 20 . long
3160: 20 20 64 61 72 67 5f 6f 66 66 73 65 74 3b 0a 20 darg_offset;.
3170: 20 66 6c 6f 61 74 20 20 20 20 20 20 20 20 20 20 float
3180: 66 61 72 67 5b 34 5d 3b 0a 20 20 64 6f 75 62 6c farg[4];. doubl
3190: 65 20 20 20 20 20 20 20 20 20 64 61 72 67 5b 32 e darg[2
31a0: 5d 3b 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 ];.#endif.#if de
31b0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 fined(__mips__)
31c0: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 && !defined(__mi
31d0: 70 73 6e 33 32 5f 5f 29 0a 20 20 69 6e 74 20 20 psn32__). int
31e0: 20 20 20 20 20 20 20 20 20 20 61 6e 75 6d 3b 0a anum;.
31f0: 20 20 66 6c 6f 61 74 20 20 20 20 20 20 20 20 20 float
3200: 20 66 61 72 67 5b 32 5d 3b 0a 20 20 64 6f 75 62 farg[2];. doub
3210: 6c 65 20 20 20 20 20 20 20 20 20 64 61 72 67 5b le darg[
3220: 32 5d 3b 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 2];.#endif.#if d
3230: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 efined(__mipsn32
3240: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
3250: 5f 6d 69 70 73 36 34 5f 5f 29 0a 20 20 69 6e 74 _mips64__). int
3260: 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 75 6d anum
3270: 3b 0a 20 20 66 6c 6f 61 74 20 20 20 20 20 20 20 ;. float
3280: 20 20 20 66 61 72 67 5b 38 5d 3b 0a 20 20 64 6f farg[8];. do
3290: 75 62 6c 65 20 20 20 20 20 20 20 20 20 64 61 72 uble dar
32a0: 67 5b 38 5d 3b 0a 23 65 6e 64 69 66 0a 23 69 66 g[8];.#endif.#if
32b0: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
32c0: 36 34 5f 5f 29 0a 20 20 69 6e 74 20 20 20 20 20 64__). int
32d0: 20 20 20 20 20 20 20 61 6e 75 6d 3b 0a 20 20 66 anum;. f
32e0: 6c 6f 61 74 20 20 20 20 20 20 20 20 20 20 66 61 loat fa
32f0: 72 67 5b 31 36 5d 3b 0a 20 20 64 6f 75 62 6c 65 rg[16];. double
3300: 20 20 20 20 20 20 20 20 20 64 61 72 67 5b 31 36 darg[16
3310: 5d 3b 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 ];.#endif.#if de
3320: 66 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f fined(__rs6000__
3330: 29 0a 20 20 64 6f 75 62 6c 65 2a 20 20 20 20 20 ). double*
3340: 20 20 20 6d 65 6d 66 61 72 67 70 74 72 3b 0a 20 memfargptr;.
3350: 20 64 6f 75 62 6c 65 20 20 20 20 20 20 20 20 20 double
3360: 66 61 72 67 5b 31 33 5d 3b 0a 23 69 66 20 21 28 farg[13];.#if !(
3370: 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c defined(_AIX) ||
3380: 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 (defined(__MACH
3390: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
33a0: 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 20 20 5f 5f _APPLE__))). __
33b0: 76 61 77 6f 72 64 20 20 20 20 20 20 20 72 65 67 vaword reg
33c0: 61 72 67 5b 38 5d 3b 0a 20 20 75 6e 73 69 67 6e arg[8];. unsign
33d0: 65 64 20 6c 6f 6e 67 20 20 73 61 70 74 72 3b 0a ed long saptr;.
33e0: 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 int
33f0: 20 6f 6e 73 74 61 63 6b 3b 0a 23 65 6e 64 69 66 onstack;.#endif
3400: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
3410: 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 20 20 ned(__s390__).
3420: 66 6c 6f 61 74 2a 20 20 20 20 20 20 20 20 20 6d float* m
3430: 65 6d 66 61 72 67 70 74 72 3b 0a 20 20 64 6f 75 emfargptr;. dou
3440: 62 6c 65 2a 20 20 20 20 20 20 20 20 6d 65 6d 64 ble* memd
3450: 61 72 67 70 74 72 3b 0a 20 20 66 6c 6f 61 74 20 argptr;. float
3460: 20 20 20 20 20 20 20 20 20 66 61 72 67 5b 32 5d farg[2]
3470: 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 ;. double
3480: 20 20 20 64 61 72 67 5b 32 5d 3b 0a 20 20 5f 5f darg[2];. __
3490: 76 61 77 6f 72 64 20 20 20 20 20 20 20 72 65 67 vaword reg
34a0: 61 72 67 5b 35 5d 3b 0a 20 20 75 6e 73 69 67 6e arg[5];. unsign
34b0: 65 64 20 6c 6f 6e 67 20 20 73 61 70 74 72 3b 0a ed long saptr;.
34c0: 20 20 69 6e 74 20 20 20 20 20 20 20 20 20 20 20 int
34d0: 20 6f 6e 73 74 61 63 6b 3b 0a 23 65 6e 64 69 66 onstack;.#endif
34e0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 .#if defined(__i
34f0: 61 36 34 5f 5f 29 0a 20 20 5f 5f 76 61 77 6f 72 a64__). __vawor
3500: 64 2a 20 20 20 20 20 20 73 61 70 74 72 3b 0a 20 d* saptr;.
3510: 20 64 6f 75 62 6c 65 2a 20 20 20 20 20 20 20 20 double*
3520: 6d 65 6d 66 61 72 67 70 74 72 3b 0a 20 20 64 6f memfargptr;. do
3530: 75 62 6c 65 20 20 20 20 20 20 20 20 20 66 61 72 uble far
3540: 67 5b 38 5d 3b 0a 23 65 6e 64 69 66 0a 23 69 66 g[8];.#endif.#if
3550: 20 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 defined(__x86_6
3560: 34 5f 5f 29 0a 20 20 64 6f 75 62 6c 65 2a 20 20 4__). double*
3570: 20 20 20 20 20 20 6d 65 6d 66 61 72 67 70 74 72 memfargptr
3580: 3b 0a 20 20 64 6f 75 62 6c 65 20 20 20 20 20 20 ;. double
3590: 20 20 20 66 61 72 67 5b 38 5d 3b 0a 20 20 5f 5f farg[8];. __
35a0: 76 61 77 6f 72 64 2a 20 20 20 20 20 20 6d 65 6d vaword* mem
35b0: 69 61 72 67 70 74 72 3b 0a 20 20 5f 5f 76 61 77 iargptr;. __vaw
35c0: 6f 72 64 20 20 20 20 20 20 20 69 61 72 67 5b 36 ord iarg[6
35d0: 5d 3b 0a 23 65 6e 64 69 66 0a 7d 20 5f 5f 76 61 ];.#endif.} __va
35e0: 5f 61 6c 69 73 74 3b 0a 0a 74 79 70 65 64 65 66 _alist;..typedef
35f0: 20 5f 5f 76 61 5f 61 6c 69 73 74 2a 20 76 61 5f __va_alist* va_
3600: 61 6c 69 73 74 3b 0a 0a 0a 2f 2a 0a 20 2a 20 44 alist;.../*. * D
3610: 65 66 69 6e 69 74 69 6f 6e 20 6f 66 20 74 68 65 efinition of the
3620: 20 76 61 5f 73 74 61 72 74 5f 78 78 78 20 6d 61 va_start_xxx ma
3630: 63 72 6f 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e cros.. */.#defin
3640: 65 20 5f 5f 56 41 5f 53 54 41 52 54 5f 46 4c 41 e __VA_START_FLA
3650: 47 53 20 20 5c 0a 20 20 5f 5f 56 41 5f 53 54 52 GS \. __VA_STR
3660: 55 43 54 5f 52 45 54 55 52 4e 20 7c 20 5f 5f 56 UCT_RETURN | __V
3670: 41 5f 46 4c 4f 41 54 5f 52 45 54 55 52 4e 20 7c A_FLOAT_RETURN |
3680: 20 5f 5f 56 41 5f 53 54 52 55 43 54 5f 41 52 47 __VA_STRUCT_ARG
3690: 53 20 7c 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 41 S | __VA_FLOAT_A
36a0: 52 47 53 20 7c 20 5f 5f 56 41 5f 49 4e 54 45 47 RGS | __VA_INTEG
36b0: 45 52 53 20 7c 20 5f 5f 56 41 5f 43 4c 45 41 4e ERS | __VA_CLEAN
36c0: 55 50 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f UP.#define __va_
36d0: 73 74 61 72 74 28 4c 49 53 54 2c 52 45 54 54 59 start(LIST,RETTY
36e0: 50 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 PE) \. ((LIST)
36f0: 2d 3e 66 6c 61 67 73 20 3d 20 5f 5f 56 41 5f 53 ->flags = __VA_S
3700: 54 41 52 54 5f 46 4c 41 47 53 2c 09 09 09 09 09 TART_FLAGS,.....
3710: 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 72 74 79 \. (LIST)->rty
3720: 70 65 20 3d 20 28 52 45 54 54 59 50 45 29 09 09 pe = (RETTYPE)..
3730: 09 09 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e ....\. ).#defin
3740: 65 20 76 61 5f 73 74 61 72 74 5f 76 6f 69 64 28 e va_start_void(
3750: 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 LIST). __va_star
3760: 74 28 4c 49 53 54 2c 5f 5f 56 41 76 6f 69 64 29 t(LIST,__VAvoid)
3770: 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 .#define va_star
3780: 74 5f 63 68 61 72 28 4c 49 53 54 29 09 20 5f 5f t_char(LIST). __
3790: 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f va_start(LIST,__
37a0: 56 41 63 68 61 72 29 0a 23 64 65 66 69 6e 65 20 VAchar).#define
37b0: 76 61 5f 73 74 61 72 74 5f 73 63 68 61 72 28 4c va_start_schar(L
37c0: 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 74 IST). __va_start
37d0: 28 4c 49 53 54 2c 5f 5f 56 41 73 63 68 61 72 29 (LIST,__VAschar)
37e0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 .#define va_star
37f0: 74 5f 75 63 68 61 72 28 4c 49 53 54 29 09 20 5f t_uchar(LIST). _
3800: 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f _va_start(LIST,_
3810: 5f 56 41 75 63 68 61 72 29 0a 23 64 65 66 69 6e _VAuchar).#defin
3820: 65 20 76 61 5f 73 74 61 72 74 5f 73 68 6f 72 74 e va_start_short
3830: 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 (LIST). __va_sta
3840: 72 74 28 4c 49 53 54 2c 5f 5f 56 41 73 68 6f 72 rt(LIST,__VAshor
3850: 74 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 t).#define va_st
3860: 61 72 74 5f 75 73 68 6f 72 74 28 4c 49 53 54 29 art_ushort(LIST)
3870: 09 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 . __va_start(LIS
3880: 54 2c 5f 5f 56 41 75 73 68 6f 72 74 29 0a 23 64 T,__VAushort).#d
3890: 65 66 69 6e 65 20 76 61 5f 73 74 61 72 74 5f 69 efine va_start_i
38a0: 6e 74 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 nt(LIST). __va_s
38b0: 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 69 6e tart(LIST,__VAin
38c0: 74 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 t).#define va_st
38d0: 61 72 74 5f 75 69 6e 74 28 4c 49 53 54 29 09 20 art_uint(LIST).
38e0: 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c __va_start(LIST,
38f0: 5f 5f 56 41 75 69 6e 74 29 0a 23 64 65 66 69 6e __VAuint).#defin
3900: 65 20 76 61 5f 73 74 61 72 74 5f 6c 6f 6e 67 28 e va_start_long(
3910: 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 LIST). __va_star
3920: 74 28 4c 49 53 54 2c 5f 5f 56 41 6c 6f 6e 67 29 t(LIST,__VAlong)
3930: 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 .#define va_star
3940: 74 5f 75 6c 6f 6e 67 28 4c 49 53 54 29 09 20 5f t_ulong(LIST). _
3950: 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f _va_start(LIST,_
3960: 5f 56 41 75 6c 6f 6e 67 29 0a 23 64 65 66 69 6e _VAulong).#defin
3970: 65 20 76 61 5f 73 74 61 72 74 5f 6c 6f 6e 67 6c e va_start_longl
3980: 6f 6e 67 28 4c 49 53 54 29 09 20 5f 5f 76 61 5f ong(LIST). __va_
3990: 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 6c start(LIST,__VAl
39a0: 6f 6e 67 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 onglong).#define
39b0: 20 76 61 5f 73 74 61 72 74 5f 75 6c 6f 6e 67 6c va_start_ulongl
39c0: 6f 6e 67 28 4c 49 53 54 29 20 5f 5f 76 61 5f 73 ong(LIST) __va_s
39d0: 74 61 72 74 28 4c 49 53 54 2c 5f 5f 56 41 75 6c tart(LIST,__VAul
39e0: 6f 6e 67 6c 6f 6e 67 29 0a 23 64 65 66 69 6e 65 onglong).#define
39f0: 20 76 61 5f 73 74 61 72 74 5f 66 6c 6f 61 74 28 va_start_float(
3a00: 4c 49 53 54 29 09 20 5f 5f 76 61 5f 73 74 61 72 LIST). __va_star
3a10: 74 28 4c 49 53 54 2c 5f 5f 56 41 66 6c 6f 61 74 t(LIST,__VAfloat
3a20: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 ).#define va_sta
3a30: 72 74 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 rt_double(LIST).
3a40: 20 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 __va_start(LIST
3a50: 2c 5f 5f 56 41 64 6f 75 62 6c 65 29 0a 23 64 65 ,__VAdouble).#de
3a60: 66 69 6e 65 20 76 61 5f 73 74 61 72 74 5f 70 74 fine va_start_pt
3a70: 72 28 4c 49 53 54 2c 54 59 50 45 29 09 20 5f 5f r(LIST,TYPE). __
3a80: 76 61 5f 73 74 61 72 74 28 4c 49 53 54 2c 5f 5f va_start(LIST,__
3a90: 56 41 76 6f 69 64 70 29 0a 0a 2f 2a 0a 20 2a 20 VAvoidp)../*. *
3aa0: 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 3a va_start_struct:
3ab0: 20 50 72 65 70 61 72 69 6e 67 20 73 74 72 75 63 Preparing struc
3ac0: 74 75 72 65 20 72 65 74 75 72 6e 2e 0a 20 2a 2f ture return.. */
3ad0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 73 74 61 72 .#define va_star
3ae0: 74 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 t_struct(LIST,TY
3af0: 50 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 PE,TYPE_SPLITTAB
3b00: 4c 45 29 20 20 5c 0a 20 20 5f 76 61 5f 73 74 61 LE) \. _va_sta
3b10: 72 74 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 73 rt_struct(LIST,s
3b20: 69 7a 65 6f 66 28 54 59 50 45 29 2c 5f 5f 56 41 izeof(TYPE),__VA
3b30: 5f 61 6c 69 67 6e 6f 66 28 54 59 50 45 29 2c 54 _alignof(TYPE),T
3b40: 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 0a YPE_SPLITTABLE).
3b50: 2f 2a 20 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 /* _va_start_str
3b60: 75 63 74 28 29 20 69 73 20 6c 69 6b 65 20 76 61 uct() is like va
3b70: 5f 73 74 61 72 74 5f 73 74 72 75 63 74 28 29 2c _start_struct(),
3b80: 20 65 78 63 65 70 74 20 74 68 61 74 20 79 6f 75 except that you
3b90: 20 70 61 73 73 0a 20 2a 20 74 68 65 20 74 79 70 pass. * the typ
3ba0: 65 27 73 20 73 69 7a 65 20 61 6e 64 20 61 6c 69 e's size and ali
3bb0: 67 6e 6d 65 6e 74 20 69 6e 73 74 65 61 64 20 6f gnment instead o
3bc0: 66 20 74 68 65 20 74 79 70 65 20 69 74 73 65 6c f the type itsel
3bd0: 66 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f f.. */.#define _
3be0: 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 28 va_start_struct(
3bf0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
3c00: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
3c10: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
3c20: 28 5f 5f 76 61 5f 73 74 61 72 74 28 4c 49 53 54 (__va_start(LIST
3c30: 2c 5f 5f 56 41 73 74 72 75 63 74 29 2c 09 09 09 ,__VAstruct),...
3c40: 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ...\. (LIST)->
3c50: 72 73 69 7a 65 20 3d 20 28 54 59 50 45 5f 53 49 rsize = (TYPE_SI
3c60: 5a 45 29 2c 09 09 09 09 09 09 5c 0a 20 20 20 28 ZE),......\. (
3c70: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 (LIST)->flags &
3c80: 5f 5f 56 41 5f 53 55 4e 50 52 4f 43 43 5f 53 54 __VA_SUNPROCC_ST
3c90: 52 55 43 54 5f 52 45 54 55 52 4e 09 09 09 09 5c RUCT_RETURN....\
3ca0: 0a 20 20 20 20 3f 20 5f 5f 76 61 5f 73 74 61 72 . ? __va_star
3cb0: 74 5f 73 74 72 75 63 74 32 28 4c 49 53 54 29 09 t_struct2(LIST).
3cc0: 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 4c .....\. : ((L
3cd0: 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 28 5f IST)->flags & (_
3ce0: 5f 56 41 5f 50 43 43 5f 53 54 52 55 43 54 5f 52 _VA_PCC_STRUCT_R
3cf0: 45 54 55 52 4e 20 7c 20 5f 5f 56 41 5f 53 55 4e ETURN | __VA_SUN
3d00: 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e CC_STRUCT_RETURN
3d10: 29 20 5c 0a 20 20 20 20 20 20 20 3f 20 28 28 54 ) \. ? ((T
3d20: 59 50 45 5f 53 49 5a 45 29 20 3c 3d 20 73 69 7a YPE_SIZE) <= siz
3d30: 65 6f 66 28 5f 5f 76 61 5f 73 74 72 75 63 74 5f eof(__va_struct_
3d40: 62 75 66 66 65 72 29 20 7c 7c 20 5f 5f 76 61 5f buffer) || __va_
3d50: 65 72 72 6f 72 32 28 54 59 50 45 5f 53 49 5a 45 error2(TYPE_SIZE
3d60: 29 2c 20 5c 0a 20 20 20 20 20 20 20 20 20 20 28 ), \. (
3d70: 4c 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 26 LIST)->raddr = &
3d80: 5f 5f 76 61 5f 73 74 72 75 63 74 5f 62 75 66 66 __va_struct_buff
3d90: 65 72 2c 09 09 09 09 5c 0a 20 20 20 20 20 20 20 er,....\.
3da0: 20 20 20 30 09 09 09 09 09 09 09 09 5c 0a 20 20 0........\.
3db0: 20 20 20 20 20 20 20 29 09 09 09 09 09 09 09 09 )........
3dc0: 5c 0a 20 20 20 20 20 20 20 3a 20 28 28 28 4c 49 \. : (((LI
3dd0: 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 ST)->flags & __V
3de0: 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 A_SMALL_STRUCT_R
3df0: 45 54 55 52 4e 29 09 09 09 5c 0a 20 20 20 20 20 ETURN)...\.
3e00: 20 20 20 20 20 26 26 20 5f 5f 76 61 5f 72 65 67 && __va_reg
3e10: 5f 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c _struct_return(L
3e20: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
3e30: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 5c PE_SPLITTABLE).\
3e40: 0a 20 20 20 20 20 20 20 20 20 20 3f 20 28 28 4c . ? ((L
3e50: 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 26 28 IST)->raddr = &(
3e60: 4c 49 53 54 29 2d 3e 74 6d 70 2c 09 09 09 09 5c LIST)->tmp,....\
3e70: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 5f . __
3e80: 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 va_start_struct1
3e90: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
3ea0: 54 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f TYPE_ALIGN,TYPE_
3eb0: 53 50 4c 49 54 54 41 42 4c 45 29 20 5c 0a 20 20 SPLITTABLE) \.
3ec0: 20 20 20 20 20 20 20 20 20 20 29 09 09 09 09 09 ).....
3ed0: 09 09 09 5c 0a 20 20 20 20 20 20 20 20 20 20 3a ...\. :
3ee0: 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 __va_start_stru
3ef0: 63 74 32 28 4c 49 53 54 29 09 09 09 09 09 5c 0a ct2(LIST).....\.
3f00: 20 20 29 29 20 20 29 20 20 29 0a 2f 2a 20 44 65 )) ) )./* De
3f10: 74 65 72 6d 69 6e 65 73 20 77 68 65 74 68 65 72 termines whether
3f20: 20 61 20 73 74 72 75 63 74 75 72 65 20 69 73 20 a structure is
3f30: 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 69 returned in regi
3f40: 73 74 65 72 73 2c 0a 20 2a 20 64 65 70 65 6e 64 sters,. * depend
3f50: 69 6e 67 20 6f 6e 20 69 74 73 20 73 69 7a 65 20 ing on its size
3f60: 61 6e 64 20 69 74 73 20 77 6f 72 64 2d 73 70 6c and its word-spl
3f70: 69 74 74 61 62 6c 65 20 66 6c 61 67 2e 0a 20 2a ittable flag.. *
3f80: 2f 0a 23 69 66 20 28 64 65 66 69 6e 65 64 28 5f /.#if (defined(_
3f90: 5f 69 33 38 36 5f 5f 29 20 26 26 20 64 65 66 69 _i386__) && defi
3fa0: 6e 65 64 28 5f 57 49 4e 33 32 29 29 0a 23 64 65 ned(_WIN32)).#de
3fb0: 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 74 fine __va_reg_st
3fc0: 72 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 54 ruct_return(LIST
3fd0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
3fe0: 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 SPLITTABLE) \.
3ff0: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d ((TYPE_SIZE) ==
4000: 20 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 1 || (TYPE_SIZE
4010: 29 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f ) == 2 || (TYPE_
4020: 53 49 5a 45 29 20 3d 3d 20 34 09 09 5c 0a 20 20 SIZE) == 4..\.
4030: 20 7c 7c 20 28 28 54 59 50 45 5f 53 49 5a 45 29 || ((TYPE_SIZE)
4040: 20 3d 3d 20 38 09 09 09 09 09 09 09 5c 0a 20 20 == 8.......\.
4050: 20 20 20 20 20 26 26 20 28 28 28 4c 49 53 54 29 && (((LIST)
4060: 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 4d ->flags & __VA_M
4070: 53 56 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 SVC_STRUCT_RETUR
4080: 4e 29 09 09 09 5c 0a 20 20 20 20 20 20 20 20 20 N)...\.
4090: 20 20 7c 7c 20 28 28 54 59 50 45 5f 53 50 4c 49 || ((TYPE_SPLI
40a0: 54 54 41 42 4c 45 29 09 09 09 09 09 5c 0a 20 20 TTABLE).....\.
40b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 26 26 20 &&
40c0: 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 ((LIST)->flags &
40d0: 20 5f 5f 56 41 5f 47 43 43 5f 53 54 52 55 43 54 __VA_GCC_STRUCT
40e0: 5f 52 45 54 55 52 4e 29 09 09 5c 0a 20 20 29 20 _RETURN)..\. )
40f0: 20 20 29 20 20 20 29 20 20 20 29 0a 2f 2a 20 54 ) ) )./* T
4100: 75 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 urn on __VA_REGI
4110: 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 55 STER_STRUCT_RETU
4120: 52 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c RN if __VA_SMALL
4130: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 77 _STRUCT_RETURN w
4140: 61 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 as set. * and th
4150: 65 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 63 e struct will ac
4160: 74 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 6e tually be return
4170: 65 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 2e ed in registers.
4180: 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
4190: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 a_start_struct1(
41a0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
41b0: 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 YPE_ALIGN,TYPE_S
41c0: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
41d0: 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c ((LIST)->flags |
41e0: 3d 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f = __VA_REGISTER_
41f0: 53 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 20 30 STRUCT_RETURN, 0
4200: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 28 64 65 ).#endif.#if (de
4210: 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 fined(__i386__)
4220: 26 26 20 21 64 65 66 69 6e 65 64 28 5f 57 49 4e && !defined(_WIN
4230: 33 32 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 32)) || defined(
4240: 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 __m68k__) || def
4250: 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c ined(__arm__) ||
4260: 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 30 30 defined(__rs600
4270: 30 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 0__) || defined(
4280: 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 64 __convex__) || d
4290: 65 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 efined(__s390__)
42a0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 .#define __va_re
42b0: 67 5f 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 g_struct_return(
42c0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
42d0: 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 YPE_SPLITTABLE)
42e0: 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 \. ((TYPE_SIZE
42f0: 29 20 3d 3d 20 31 20 7c 7c 20 28 54 59 50 45 5f ) == 1 || (TYPE_
4300: 53 49 5a 45 29 20 3d 3d 20 32 20 7c 7c 20 28 54 SIZE) == 2 || (T
4310: 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 34 09 09 YPE_SIZE) == 4..
4320: 5c 0a 20 20 20 7c 7c 20 28 28 54 59 50 45 5f 53 \. || ((TYPE_S
4330: 49 5a 45 29 20 3d 3d 20 38 20 26 26 20 28 54 59 IZE) == 8 && (TY
4340: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 09 PE_SPLITTABLE)..
4350: 09 09 5c 0a 20 20 20 20 20 20 20 26 26 20 28 28 ..\. && ((
4360: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f LIST)->flags & _
4370: 5f 56 41 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 _VA_GCC_STRUCT_R
4380: 45 54 55 52 4e 29 09 09 09 5c 0a 20 20 29 20 20 ETURN)...\. )
4390: 20 29 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 5f )./* Turn on __
43a0: 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 VA_REGISTER_STRU
43b0: 43 54 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f 56 CT_RETURN if __V
43c0: 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f 52 A_SMALL_STRUCT_R
43d0: 45 54 55 52 4e 20 77 61 73 20 73 65 74 0a 20 2a ETURN was set. *
43e0: 20 61 6e 64 20 74 68 65 20 73 74 72 75 63 74 20 and the struct
43f0: 77 69 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 will actually be
4400: 20 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 67 returned in reg
4410: 69 73 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 isters.. */.#def
4420: 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f 73 ine __va_start_s
4430: 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 45 truct1(LIST,TYPE
4440: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
4450: 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 ,TYPE_SPLITTABLE
4460: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
4470: 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 flags |= __VA_RE
4480: 47 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 GISTER_STRUCT_RE
4490: 54 55 52 4e 2c 20 30 29 0a 23 65 6e 64 69 66 0a TURN, 0).#endif.
44a0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c #if defined(__al
44b0: 70 68 61 5f 5f 29 0a 23 64 65 66 69 6e 65 20 5f pha__).#define _
44c0: 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f 72 _va_reg_struct_r
44d0: 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 5f eturn(LIST,TYPE_
44e0: 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 54 SIZE,TYPE_SPLITT
44f0: 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 50 ABLE) \. ((TYP
4500: 45 5f 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 E_SIZE) == 1 ||
4510: 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 (TYPE_SIZE) == 2
4520: 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 || (TYPE_SIZE)
4530: 3d 3d 20 34 20 7c 7c 20 28 54 59 50 45 5f 53 49 == 4 || (TYPE_SI
4540: 5a 45 29 20 3d 3d 20 38 09 5c 0a 20 20 20 7c 7c ZE) == 8.\. ||
4550: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d ((TYPE_SIZE) ==
4560: 20 31 36 20 26 26 20 28 54 59 50 45 5f 53 50 4c 16 && (TYPE_SPL
4570: 49 54 54 41 42 4c 45 29 09 09 09 09 5c 0a 20 20 ITTABLE)....\.
4580: 20 20 20 20 20 26 26 20 28 28 4c 49 53 54 29 2d && ((LIST)-
4590: 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 47 43 >flags & __VA_GC
45a0: 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 29 C_STRUCT_RETURN)
45b0: 09 09 09 5c 0a 20 20 29 20 20 20 29 0a 2f 2a 20 ...\. ) )./*
45c0: 54 75 72 6e 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 Turn on __VA_REG
45d0: 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 45 54 ISTER_STRUCT_RET
45e0: 55 52 4e 20 69 66 20 5f 5f 56 41 5f 53 4d 41 4c URN if __VA_SMAL
45f0: 4c 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 L_STRUCT_RETURN
4600: 77 61 73 20 73 65 74 0a 20 2a 20 61 6e 64 20 74 was set. * and t
4610: 68 65 20 73 74 72 75 63 74 20 77 69 6c 6c 20 61 he struct will a
4620: 63 74 75 61 6c 6c 79 20 62 65 20 72 65 74 75 72 ctually be retur
4630: 6e 65 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 ned in registers
4640: 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f .. */.#define __
4650: 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 31 va_start_struct1
4660: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
4670: 54 59 50 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f TYPE_ALIGN,TYPE_
4680: 53 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 SPLITTABLE) \.
4690: 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 ((LIST)->flags
46a0: 7c 3d 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 |= __VA_REGISTER
46b0: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 2c 20 _STRUCT_RETURN,
46c0: 30 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 0).#endif.#if de
46d0: 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a fined(__hppa__).
46e0: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 67 #define __va_reg
46f0: 5f 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 4c _struct_return(L
4700: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
4710: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 20 PE_SPLITTABLE)
4720: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 \. ((LIST)->fla
4730: 67 73 20 26 20 5f 5f 56 41 5f 4f 4c 44 47 43 43 gs & __VA_OLDGCC
4740: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 09 09 _STRUCT_RETURN..
4750: 09 09 5c 0a 20 20 20 3f 20 28 28 54 59 50 45 5f ..\. ? ((TYPE_
4760: 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c 20 28 54 SIZE) == 1 || (T
4770: 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 20 7c YPE_SIZE) == 2 |
4780: 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d | (TYPE_SIZE) ==
4790: 20 34 29 09 09 5c 0a 20 20 20 3a 20 28 28 54 59 4)..\. : ((TY
47a0: 50 45 5f 53 49 5a 45 29 20 3c 3d 20 38 29 09 09 PE_SIZE) <= 8)..
47b0: 09 09 09 09 09 5c 0a 20 20 29 0a 2f 2a 20 54 65 .....\. )./* Te
47c0: 73 74 20 62 6f 74 68 20 5f 5f 56 41 5f 4f 4c 44 st both __VA_OLD
47d0: 47 43 43 5f 53 54 52 55 43 54 5f 52 45 54 55 52 GCC_STRUCT_RETUR
47e0: 4e 20 61 6e 64 20 5f 5f 56 41 5f 53 4d 41 4c 4c N and __VA_SMALL
47f0: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 61 _STRUCT_RETURN a
4800: 74 20 72 75 6e 20 74 69 6d 65 2e 20 2a 2f 0a 23 t run time. */.#
4810: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 define __va_star
4820: 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 t_struct1(LIST,T
4830: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
4840: 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 IGN,TYPE_SPLITTA
4850: 42 4c 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 BLE) \. 0.#end
4860: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
4870: 5f 6d 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 _mips__) && !def
4880: 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f ined(__mipsn32__
4890: 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f ) || (defined(__
48a0: 73 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 sparc__) && !def
48b0: 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f ined(__sparc64__
48c0: 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f )) || defined(__
48d0: 6d 38 38 6b 5f 5f 29 0a 23 64 65 66 69 6e 65 20 m88k__).#define
48e0: 5f 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 74 5f __va_reg_struct_
48f0: 72 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 50 45 return(LIST,TYPE
4900: 5f 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c 49 54 _SIZE,TYPE_SPLIT
4910: 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 54 59 TABLE) \. ((TY
4920: 50 45 5f 53 49 5a 45 29 20 3d 3d 20 31 20 7c 7c PE_SIZE) == 1 ||
4930: 20 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 (TYPE_SIZE) ==
4940: 32 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 2 || (TYPE_SIZE)
4950: 20 3d 3d 20 34 29 0a 2f 2a 20 54 65 73 74 20 5f == 4)./* Test _
4960: 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 _VA_SMALL_STRUCT
4970: 5f 52 45 54 55 52 4e 20 69 6e 73 74 65 61 64 20 _RETURN instead
4980: 6f 66 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 of __VA_REGISTER
4990: 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 2e 20 _STRUCT_RETURN.
49a0: 2a 2f 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f */.#if defined(_
49b0: 5f 6d 69 70 73 5f 5f 29 20 26 26 20 21 64 65 66 _mips__) && !def
49c0: 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f ined(__mipsn32__
49d0: 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 ).#define __va_s
49e0: 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 tart_struct1(LIS
49f0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
4a00: 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 _ALIGN,TYPE_SPLI
4a10: 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c TTABLE) \. ((L
4a20: 49 53 54 29 2d 3e 61 6e 75 6d 2b 2b 2c 09 09 09 IST)->anum++,...
4a30: 09 09 09 09 5c 0a 20 20 20 30 09 09 09 09 09 09 ....\. 0......
4a40: 09 09 09 5c 0a 20 20 29 0a 23 65 6c 73 65 0a 23 ...\. ).#else.#
4a50: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 define __va_star
4a60: 74 5f 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 t_struct1(LIST,T
4a70: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
4a80: 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 IGN,TYPE_SPLITTA
4a90: 42 4c 45 29 20 20 5c 0a 20 20 30 0a 23 65 6e 64 BLE) \. 0.#end
4aa0: 69 66 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 if.#endif.#if de
4ab0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f fined(__mipsn32_
4ac0: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
4ad0: 6d 69 70 73 36 34 5f 5f 29 0a 23 64 65 66 69 6e mips64__).#defin
4ae0: 65 20 5f 5f 76 61 5f 72 65 67 5f 73 74 72 75 63 e __va_reg_struc
4af0: 74 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 54 59 t_return(LIST,TY
4b00: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 53 50 4c PE_SIZE,TYPE_SPL
4b10: 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 ITTABLE) \. ((
4b20: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 5f LIST)->flags & _
4b30: 5f 56 41 5f 47 43 43 5f 53 54 52 55 43 54 5f 52 _VA_GCC_STRUCT_R
4b40: 45 54 55 52 4e 09 09 09 09 5c 0a 20 20 20 3f 20 ETURN....\. ?
4b50: 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3d 3d 20 ((TYPE_SIZE) ==
4b60: 31 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 1 || (TYPE_SIZE)
4b70: 20 3d 3d 20 32 20 7c 7c 20 28 54 59 50 45 5f 53 == 2 || (TYPE_S
4b80: 49 5a 45 29 20 3d 3d 20 34 20 7c 7c 20 28 54 59 IZE) == 4 || (TY
4b90: 50 45 5f 53 49 5a 45 29 20 3d 3d 20 38 29 20 5c PE_SIZE) == 8) \
4ba0: 0a 20 20 20 3a 20 28 28 54 59 50 45 5f 53 49 5a . : ((TYPE_SIZ
4bb0: 45 29 20 3c 3d 20 31 36 29 09 09 09 09 09 09 5c E) <= 16)......\
4bc0: 0a 20 20 29 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 . )./* Turn on
4bd0: 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 __VA_REGISTER_ST
4be0: 52 55 43 54 5f 52 45 54 55 52 4e 20 69 66 20 5f RUCT_RETURN if _
4bf0: 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 _VA_SMALL_STRUCT
4c00: 5f 52 45 54 55 52 4e 20 77 61 73 20 73 65 74 0a _RETURN was set.
4c10: 20 2a 20 61 6e 64 20 74 68 65 20 73 74 72 75 63 * and the struc
4c20: 74 20 77 69 6c 6c 20 61 63 74 75 61 6c 6c 79 20 t will actually
4c30: 62 65 20 72 65 74 75 72 6e 65 64 20 69 6e 20 72 be returned in r
4c40: 65 67 69 73 74 65 72 73 2e 20 41 6c 73 6f 20 74 egisters. Also t
4c50: 75 72 6e 20 6f 6e 0a 20 2a 20 5f 5f 56 41 5f 52 urn on. * __VA_R
4c60: 45 47 49 53 54 45 52 5f 46 4c 4f 41 54 53 54 52 EGISTER_FLOATSTR
4c70: 55 43 54 5f 52 45 54 55 52 4e 20 6f 72 20 5f 5f UCT_RETURN or __
4c80: 56 41 5f 52 45 47 49 53 54 45 52 5f 44 4f 55 42 VA_REGISTER_DOUB
4c90: 4c 45 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 LESTRUCT_RETURN
4ca0: 69 66 0a 20 2a 20 74 68 65 20 73 74 72 75 63 74 if. * the struct
4cb0: 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 will be returne
4cc0: 64 20 69 6e 20 66 6c 6f 61 74 69 6e 67 2d 70 6f d in floating-po
4cd0: 69 6e 74 20 72 65 67 69 73 74 65 72 73 2e 0a 20 int registers..
4ce0: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
4cf0: 73 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 start_struct1(LI
4d00: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
4d10: 45 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c E_ALIGN,TYPE_SPL
4d20: 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 ITTABLE) \. ((
4d30: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 LIST)->flags |=
4d40: 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 __VA_REGISTER_ST
4d50: 52 55 43 54 5f 52 45 54 55 52 4e 2c 09 09 09 09 RUCT_RETURN,....
4d60: 5c 0a 20 20 20 28 54 59 50 45 5f 41 4c 49 47 4e \. (TYPE_ALIGN
4d70: 29 20 3d 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 ) == sizeof(floa
4d80: 74 29 20 26 26 20 28 54 59 50 45 5f 53 50 4c 49 t) && (TYPE_SPLI
4d90: 54 54 41 42 4c 45 29 09 09 09 09 5c 0a 20 20 20 TTABLE)....\.
4da0: 20 26 26 20 28 28 54 59 50 45 5f 53 49 5a 45 29 && ((TYPE_SIZE)
4db0: 20 3d 3d 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 == sizeof(float
4dc0: 29 20 7c 7c 20 28 54 59 50 45 5f 53 49 5a 45 29 ) || (TYPE_SIZE)
4dd0: 20 3d 3d 20 32 2a 73 69 7a 65 6f 66 28 66 6c 6f == 2*sizeof(flo
4de0: 61 74 29 29 09 09 5c 0a 20 20 20 20 26 26 20 28 at))..\. && (
4df0: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d (LIST)->flags |=
4e00: 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 46 __VA_REGISTER_F
4e10: 4c 4f 41 54 53 54 52 55 43 54 5f 52 45 54 55 52 LOATSTRUCT_RETUR
4e20: 4e 29 2c 09 09 09 5c 0a 20 20 20 28 54 59 50 45 N),...\. (TYPE
4e30: 5f 41 4c 49 47 4e 29 20 3d 3d 20 73 69 7a 65 6f _ALIGN) == sizeo
4e40: 66 28 64 6f 75 62 6c 65 29 20 26 26 20 28 54 59 f(double) && (TY
4e50: 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 09 09 PE_SPLITTABLE)..
4e60: 09 09 5c 0a 20 20 20 20 26 26 20 28 28 54 59 50 ..\. && ((TYP
4e70: 45 5f 53 49 5a 45 29 20 3d 3d 20 73 69 7a 65 6f E_SIZE) == sizeo
4e80: 66 28 64 6f 75 62 6c 65 29 20 7c 7c 20 28 54 59 f(double) || (TY
4e90: 50 45 5f 53 49 5a 45 29 20 3d 3d 20 32 2a 73 69 PE_SIZE) == 2*si
4ea0: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 5c 0a zeof(double)).\.
4eb0: 20 20 20 20 26 26 20 28 28 4c 49 53 54 29 2d 3e && ((LIST)->
4ec0: 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 45 flags |= __VA_RE
4ed0: 47 49 53 54 45 52 5f 44 4f 55 42 4c 45 53 54 52 GISTER_DOUBLESTR
4ee0: 55 43 54 5f 52 45 54 55 52 4e 29 2c 09 09 09 5c UCT_RETURN),...\
4ef0: 0a 20 20 20 30 29 0a 23 65 6e 64 69 66 0a 23 69 . 0).#endif.#i
4f00: 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 f defined(__spar
4f10: 63 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 c64__) || define
4f20: 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 23 64 65 66 d(__ia64__).#def
4f30: 69 6e 65 20 5f 5f 76 61 5f 72 65 67 5f 73 74 72 ine __va_reg_str
4f40: 75 63 74 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c uct_return(LIST,
4f50: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 53 TYPE_SIZE,TYPE_S
4f60: 50 4c 49 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 PLITTABLE) \.
4f70: 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3c 3d 20 ((TYPE_SIZE) <=
4f80: 33 32 29 0a 2f 2a 20 54 75 72 6e 20 6f 6e 20 5f 32)./* Turn on _
4f90: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 _VA_REGISTER_STR
4fa0: 55 43 54 5f 52 45 54 55 52 4e 20 69 66 20 5f 5f UCT_RETURN if __
4fb0: 56 41 5f 53 4d 41 4c 4c 5f 53 54 52 55 43 54 5f VA_SMALL_STRUCT_
4fc0: 52 45 54 55 52 4e 20 77 61 73 20 73 65 74 0a 20 RETURN was set.
4fd0: 2a 20 61 6e 64 20 74 68 65 20 73 74 72 75 63 74 * and the struct
4fe0: 20 77 69 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 will actually b
4ff0: 65 20 72 65 74 75 72 6e 65 64 20 69 6e 20 72 65 e returned in re
5000: 67 69 73 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 gisters.. */.#de
5010: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 61 72 74 5f fine __va_start_
5020: 73 74 72 75 63 74 31 28 4c 49 53 54 2c 54 59 50 struct1(LIST,TYP
5030: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
5040: 4e 2c 54 59 50 45 5f 53 50 4c 49 54 54 41 42 4c N,TYPE_SPLITTABL
5050: 45 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d E) \. ((LIST)-
5060: 3e 66 6c 61 67 73 20 7c 3d 20 5f 5f 56 41 5f 52 >flags |= __VA_R
5070: 45 47 49 53 54 45 52 5f 53 54 52 55 43 54 5f 52 EGISTER_STRUCT_R
5080: 45 54 55 52 4e 2c 09 09 09 09 5c 0a 20 20 20 30 ETURN,....\. 0
5090: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
50a0: 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 ined(__x86_64__)
50b0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 72 65 .#define __va_re
50c0: 67 5f 73 74 72 75 63 74 5f 72 65 74 75 72 6e 28 g_struct_return(
50d0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
50e0: 59 50 45 5f 53 50 4c 49 54 54 41 42 4c 45 29 20 YPE_SPLITTABLE)
50f0: 20 5c 0a 20 20 28 28 54 59 50 45 5f 53 49 5a 45 \. ((TYPE_SIZE
5100: 29 20 3c 3d 20 31 36 29 0a 2f 2a 20 54 75 72 6e ) <= 16)./* Turn
5110: 20 6f 6e 20 5f 5f 56 41 5f 52 45 47 49 53 54 45 on __VA_REGISTE
5120: 52 5f 53 54 52 55 43 54 5f 52 45 54 55 52 4e 20 R_STRUCT_RETURN
5130: 69 66 20 5f 5f 56 41 5f 53 4d 41 4c 4c 5f 53 54 if __VA_SMALL_ST
5140: 52 55 43 54 5f 52 45 54 55 52 4e 20 77 61 73 20 RUCT_RETURN was
5150: 73 65 74 0a 20 2a 20 61 6e 64 20 74 68 65 20 73 set. * and the s
5160: 74 72 75 63 74 20 77 69 6c 6c 20 61 63 74 75 61 truct will actua
5170: 6c 6c 79 20 62 65 20 72 65 74 75 72 6e 65 64 20 lly be returned
5180: 69 6e 20 72 65 67 69 73 74 65 72 73 2e 0a 20 2a in registers.. *
5190: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 /.#define __va_s
51a0: 74 61 72 74 5f 73 74 72 75 63 74 31 28 4c 49 53 tart_struct1(LIS
51b0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
51c0: 5f 41 4c 49 47 4e 2c 54 59 50 45 5f 53 50 4c 49 _ALIGN,TYPE_SPLI
51d0: 54 54 41 42 4c 45 29 20 20 5c 0a 20 20 28 28 4c TTABLE) \. ((L
51e0: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
51f0: 5f 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 _VA_REGISTER_STR
5200: 55 43 54 5f 52 45 54 55 52 4e 2c 09 09 09 09 5c UCT_RETURN,....\
5210: 0a 20 20 20 30 29 0a 23 65 6e 64 69 66 0a 2f 2a . 0).#endif./*
5220: 0a 20 2a 20 50 72 65 70 61 72 69 6e 67 20 73 74 . * Preparing st
5230: 72 75 63 74 75 72 65 20 72 65 74 75 72 6e 20 69 ructure return i
5240: 6e 20 6d 65 6d 6f 72 79 2e 0a 20 2a 2f 0a 23 69 n memory.. */.#i
5250: 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 f defined(__i386
5260: 5f 5f 29 0a 2f 2a 20 52 65 74 75 72 6e 20 73 74 __)./* Return st
5270: 72 75 63 74 75 72 65 20 70 6f 69 6e 74 65 72 20 ructure pointer
5280: 69 73 20 70 61 73 73 65 64 20 69 6e 20 61 20 73 is passed in a s
5290: 70 65 63 69 61 6c 20 72 65 67 69 73 74 65 72 20 pecial register
52a0: 6f 72 20 61 73 20 66 69 72 73 74 20 61 72 67 2e or as first arg.
52b0: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
52c0: 5f 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 4c _start_struct2(L
52d0: 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 IST) \. ((LIST
52e0: 29 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f )->flags & __VA_
52f0: 4e 45 58 54 47 43 43 5f 53 54 52 55 43 54 5f 52 NEXTGCC_STRUCT_R
5300: 45 54 55 52 4e 09 09 09 09 5c 0a 20 20 20 3f 20 ETURN....\. ?
5310: 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 72 20 3d ((LIST)->raddr =
5320: 20 28 4c 49 53 54 29 2d 3e 73 74 72 75 63 74 72 (LIST)->structr
5330: 61 64 64 72 2c 20 30 29 09 20 2f 2a 20 73 70 65 addr, 0). /* spe
5340: 63 69 61 6c 20 72 65 67 69 73 74 65 72 20 2a 2f cial register */
5350: 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 54 29 2d .\. : ((LIST)-
5360: 3e 72 61 64 64 72 20 3d 20 2a 28 76 6f 69 64 2a >raddr = *(void*
5370: 20 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 *)((LIST)->aptr
5380: 29 2c 09 09 2f 2a 20 66 69 72 73 74 20 61 72 67 ),../* first arg
5390: 20 2a 2f 09 5c 0a 20 20 20 20 20 20 28 4c 49 53 */.\. (LIS
53a0: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 T)->aptr += size
53b0: 6f 66 28 76 6f 69 64 2a 29 2c 09 09 09 09 09 5c of(void*),.....\
53c0: 0a 20 20 20 20 20 20 30 09 09 09 09 09 09 09 09 . 0........
53d0: 09 5c 0a 20 20 29 20 20 29 0a 23 65 6e 64 69 66 .\. ) ).#endif
53e0: 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 61 .#if defined(__a
53f0: 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e lpha__) || defin
5400: 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 64 ed(__arm__) || d
5410: 65 66 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f efined(__rs6000_
5420: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
5430: 63 6f 6e 76 65 78 5f 5f 29 20 20 7c 7c 20 64 65 convex__) || de
5440: 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a fined(__s390__).
5450: 2f 2a 20 52 65 74 75 72 6e 20 73 74 72 75 63 74 /* Return struct
5460: 75 72 65 20 70 6f 69 6e 74 65 72 20 69 73 20 70 ure pointer is p
5470: 61 73 73 65 64 20 61 73 20 66 69 72 73 74 20 61 assed as first a
5480: 72 67 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f rg. */.#define _
5490: 5f 76 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 _va_start_struct
54a0: 32 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 2(LIST) \. ((L
54b0: 49 53 54 29 2d 3e 72 61 64 64 72 20 3d 20 2a 28 IST)->raddr = *(
54c0: 76 6f 69 64 2a 20 2a 29 28 28 4c 49 53 54 29 2d void* *)((LIST)-
54d0: 3e 61 70 74 72 29 2c 09 09 09 09 5c 0a 20 20 20 >aptr),....\.
54e0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 (LIST)->aptr +=
54f0: 73 69 7a 65 6f 66 28 76 6f 69 64 2a 29 2c 09 09 sizeof(void*),..
5500: 09 09 09 5c 0a 20 20 20 30 09 09 09 09 09 09 09 ...\. 0.......
5510: 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 ..\. ).#endif.#
5520: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
5530: 73 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 s__) || defined(
5540: 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 __mipsn32__) ||
5550: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 defined(__mips64
5560: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
5570: 5f 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 52 _sparc64__)./* R
5580: 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 65 20 eturn structure
5590: 70 6f 69 6e 74 65 72 20 69 73 20 70 61 73 73 65 pointer is passe
55a0: 64 20 61 73 20 66 69 72 73 74 20 61 72 67 2e 20 d as first arg.
55b0: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
55c0: 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 4c 49 start_struct2(LI
55d0: 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 ST) \. ((LIST)
55e0: 2d 3e 72 61 64 64 72 20 3d 20 2a 28 76 6f 69 64 ->raddr = *(void
55f0: 2a 20 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 * *)((LIST)->apt
5600: 72 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 r),....\. (LIS
5610: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 T)->aptr += size
5620: 6f 66 28 76 6f 69 64 2a 29 2c 09 09 09 09 09 5c of(void*),.....\
5630: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 6e 75 6d . (LIST)->anum
5640: 2b 2b 2c 09 09 09 09 09 09 09 5c 0a 20 20 20 30 ++,.......\. 0
5650: 09 09 09 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 .........\. ).#
5660: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
5670: 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a 2f 2a d(__x86_64__)./*
5680: 20 52 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 Return structur
5690: 65 20 70 6f 69 6e 74 65 72 20 69 73 20 70 61 73 e pointer is pas
56a0: 73 65 64 20 61 73 20 66 69 72 73 74 20 61 72 67 sed as first arg
56b0: 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
56c0: 61 5f 73 74 61 72 74 5f 73 74 72 75 63 74 32 28 a_start_struct2(
56d0: 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 LIST) \. ((LIS
56e0: 54 29 2d 3e 72 61 64 64 72 20 3d 20 28 76 6f 69 T)->raddr = (voi
56f0: 64 20 2a 29 28 2a 28 4c 49 53 54 29 2d 3e 6d 65 d *)(*(LIST)->me
5700: 6d 69 61 72 67 70 74 72 2b 2b 29 2c 09 09 09 5c miargptr++),...\
5710: 0a 20 20 20 30 09 09 09 09 09 09 09 09 09 5c 0a . 0.........\.
5720: 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 ).#endif.#if d
5730: 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 efined(__m68k__)
5740: 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 || (defined(__s
5750: 70 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 parc__) && !defi
5760: 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 ned(__sparc64__)
5770: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 68 ) || defined(__h
5780: 70 70 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 ppa__) || define
5790: 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 d(__m88k__) || d
57a0: 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f 29 efined(__ia64__)
57b0: 0a 2f 2a 20 52 65 74 75 72 6e 20 73 74 72 75 63 ./* Return struc
57c0: 74 75 72 65 20 70 6f 69 6e 74 65 72 20 69 73 20 ture pointer is
57d0: 70 61 73 73 65 64 20 69 6e 20 61 20 73 70 65 63 passed in a spec
57e0: 69 61 6c 20 72 65 67 69 73 74 65 72 2e 20 2a 2f ial register. */
57f0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 73 74 .#define __va_st
5800: 61 72 74 5f 73 74 72 75 63 74 32 28 4c 49 53 54 art_struct2(LIST
5810: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
5820: 72 61 64 64 72 20 3d 20 28 4c 49 53 54 29 2d 3e raddr = (LIST)->
5830: 73 74 72 75 63 74 72 61 64 64 72 2c 20 30 29 0a structraddr, 0).
5840: 23 65 6e 64 69 66 0a 0a 0a 2f 2a 0a 20 2a 20 44 #endif.../*. * D
5850: 65 66 69 6e 69 74 69 6f 6e 20 6f 66 20 74 68 65 efinition of the
5860: 20 76 61 5f 61 72 67 5f 78 78 78 20 6d 61 63 72 va_arg_xxx macr
5870: 6f 73 2e 0a 20 2a 2f 0a 0a 2f 2a 20 50 61 64 64 os.. */../* Padd
5880: 69 6e 67 20 6f 66 20 6e 6f 6e 2d 73 74 72 75 63 ing of non-struc
5890: 74 20 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a t arguments. */.
58a0: 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 #define __va_arg
58b0: 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 20 size(TYPE_SIZE)
58c0: 20 5c 0a 20 20 28 28 28 54 59 50 45 5f 53 49 5a \. (((TYPE_SIZ
58d0: 45 29 20 2b 20 73 69 7a 65 6f 66 28 5f 5f 76 61 E) + sizeof(__va
58e0: 77 6f 72 64 29 2d 31 29 20 26 20 2d 28 6c 6f 6e word)-1) & -(lon
58f0: 67 29 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 g)sizeof(__vawor
5900: 64 29 29 0a 23 69 66 20 64 65 66 69 6e 65 64 28 d)).#if defined(
5910: 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 65 66 __i386__) || def
5920: 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c ined(__m68k__) |
5930: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 | defined(__mips
5940: 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 __) && !defined(
5950: 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 __mipsn32__) ||
5960: 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 (defined(__sparc
5970: 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 __) && !defined(
5980: 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 20 7c 7c __sparc64__)) ||
5990: 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 defined(__alpha
59a0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
59b0: 5f 61 72 6d 5f 5f 29 20 7c 7c 20 28 64 65 66 69 _arm__) || (defi
59c0: 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 20 ned(__rs6000__)
59d0: 26 26 20 28 64 65 66 69 6e 65 64 28 5f 41 49 58 && (defined(_AIX
59e0: 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f ) || (defined(__
59f0: 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 69 6e MACH__) && defin
5a00: 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 29 ed(__APPLE__))))
5a10: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 || defined(__m8
5a20: 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 8k__) || defined
5a30: 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 (__convex__) ||
5a40: 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f 5f defined(__ia64__
5a50: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 78 ) || defined(__x
5a60: 38 36 5f 36 34 5f 5f 29 0a 2f 2a 20 61 72 67 73 86_64__)./* args
5a70: 20 67 72 6f 77 20 75 70 20 2a 2f 0a 2f 2a 20 73 grow up */./* s
5a80: 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 mall structures
5a90: 3c 20 31 20 77 6f 72 64 20 61 72 65 20 61 64 6a < 1 word are adj
5aa0: 75 73 74 65 64 20 64 65 70 65 6e 64 69 6e 67 20 usted depending
5ab0: 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a 2f 0a 23 on compiler */.#
5ac0: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
5ad0: 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 leftadjusted(LIS
5ae0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
5af0: 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c _ALIGN) \. ((L
5b00: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f IST)->aptr += __
5b10: 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f va_argsize(TYPE_
5b20: 53 49 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 SIZE),....\. (
5b30: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f LIST)->aptr - __
5b40: 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f va_argsize(TYPE_
5b50: 53 49 5a 45 29 09 09 09 09 5c 0a 20 20 29 0a 23 SIZE)....\. ).#
5b60: 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f define __va_arg_
5b70: 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 rightadjusted(LI
5b80: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
5b90: 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 E_ALIGN) \. ((
5ba0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f LIST)->aptr += _
5bb0: 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 _va_argsize(TYPE
5bc0: 5f 53 49 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 _SIZE),....\.
5bd0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 (LIST)->aptr - (
5be0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3c 20 73 69 (TYPE_SIZE) < si
5bf0: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 09 09 zeof(__vaword)..
5c00: 09 5c 0a 09 09 20 20 20 3f 20 28 54 59 50 45 5f .\... ? (TYPE_
5c10: 53 49 5a 45 29 09 09 09 09 09 5c 0a 09 09 20 20 SIZE).....\...
5c20: 20 3a 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 : __va_argsize(
5c30: 54 59 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a TYPE_SIZE)....\.
5c40: 09 09 20 20 29 09 09 09 09 09 09 09 5c 0a 20 20 .. ).......\.
5c50: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
5c60: 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 ined(__rs6000__)
5c70: 20 26 26 20 21 28 64 65 66 69 6e 65 64 28 5f 41 && !(defined(_A
5c80: 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 IX) || (defined(
5c90: 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 __MACH__) && def
5ca0: 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 ined(__APPLE__))
5cb0: 29 0a 2f 2a 20 61 72 67 73 20 67 72 6f 77 20 75 )./* args grow u
5cc0: 70 20 2a 2f 0a 2f 2a 20 73 6d 61 6c 6c 20 73 74 p */./* small st
5cd0: 72 75 63 74 75 72 65 73 20 3c 20 31 20 77 6f 72 ructures < 1 wor
5ce0: 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 64 d are adjusted d
5cf0: 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d 70 epending on comp
5d00: 69 6c 65 72 20 2a 2f 0a 2f 2a 20 41 6c 73 6f 20 iler */./* Also
5d10: 6d 61 6b 65 20 73 75 72 65 20 77 65 20 73 77 69 make sure we swi
5d20: 74 63 68 20 74 6f 20 74 68 65 20 73 74 61 63 6b tch to the stack
5d30: 20 70 6f 69 6e 74 65 72 20 61 66 74 65 72 20 38 pointer after 8
5d40: 20 61 72 67 73 20 2a 2f 0a 23 64 65 66 69 6e 65 args */.#define
5d50: 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 __va_arg_leftad
5d60: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
5d70: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
5d80: 29 20 20 5c 0a 20 20 28 28 28 28 4c 49 53 54 29 ) \. ((((LIST)
5d90: 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d 20 30 20 26 ->onstack == 0 &
5da0: 26 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3e & (LIST)->aptr >
5db0: 3d 20 28 6c 6f 6e 67 29 26 28 4c 49 53 54 29 2d = (long)&(LIST)-
5dc0: 3e 72 65 67 61 72 67 5b 38 5d 29 09 5c 0a 20 20 >regarg[8]).\.
5dd0: 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 ? ((LIST)->ons
5de0: 74 61 63 6b 3d 31 2c 20 28 4c 49 53 54 29 2d 3e tack=1, (LIST)->
5df0: 61 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e 73 aptr = (LIST)->s
5e00: 61 70 74 72 29 20 3a 20 30 29 2c 09 09 5c 0a 20 aptr) : 0),..\.
5e10: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
5e20: 3d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 = __va_argsize(T
5e30: 59 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 5c 0a YPE_SIZE),....\.
5e40: 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 (LIST)->aptr
5e50: 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 - __va_argsize(T
5e60: 59 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a 20 YPE_SIZE)....\.
5e70: 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f ).#define __va_
5e80: 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 arg_rightadjuste
5e90: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
5ea0: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
5eb0: 20 20 28 28 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 ((((LIST)->ons
5ec0: 74 61 63 6b 20 3d 3d 20 30 20 26 26 20 28 4c 49 tack == 0 && (LI
5ed0: 53 54 29 2d 3e 61 70 74 72 20 3e 3d 20 28 6c 6f ST)->aptr >= (lo
5ee0: 6e 67 29 26 28 4c 49 53 54 29 2d 3e 72 65 67 61 ng)&(LIST)->rega
5ef0: 72 67 5b 38 5d 29 09 5c 0a 20 20 20 20 3f 20 28 rg[8]).\. ? (
5f00: 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d (LIST)->onstack=
5f10: 31 2c 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 1, (LIST)->aptr
5f20: 3d 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 = (LIST)->saptr)
5f30: 20 3a 20 30 29 2c 09 09 5c 0a 20 20 20 28 4c 49 : 0),..\. (LI
5f40: 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 ST)->aptr += __v
5f50: 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 a_argsize(TYPE_S
5f60: 49 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c IZE),....\. (L
5f70: 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 28 28 54 IST)->aptr - ((T
5f80: 59 50 45 5f 53 49 5a 45 29 20 3c 20 73 69 7a 65 YPE_SIZE) < size
5f90: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 09 09 09 5c of(__vaword)...\
5fa0: 0a 09 09 20 20 20 3f 20 28 54 59 50 45 5f 53 49 ... ? (TYPE_SI
5fb0: 5a 45 29 09 09 09 09 09 5c 0a 09 09 20 20 20 3a ZE).....\... :
5fc0: 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 __va_argsize(TY
5fd0: 50 45 5f 53 49 5a 45 29 09 09 09 09 5c 0a 09 09 PE_SIZE)....\...
5fe0: 20 20 29 09 09 09 09 09 09 09 5c 0a 20 20 29 0a ).......\. ).
5ff0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
6000: 65 64 28 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 ed(__s390__)./*
6010: 61 72 67 73 20 67 72 6f 77 20 75 70 20 2a 2f 0a args grow up */.
6020: 2f 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 /* small structu
6030: 72 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 res < 1 word are
6040: 20 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 adjusted depend
6050: 69 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 ing on compiler
6060: 2a 2f 0a 2f 2a 20 41 6c 73 6f 20 6d 61 6b 65 20 */./* Also make
6070: 73 75 72 65 20 77 65 20 73 77 69 74 63 68 20 74 sure we switch t
6080: 6f 20 74 68 65 20 73 74 61 63 6b 20 70 6f 69 6e o the stack poin
6090: 74 65 72 20 61 66 74 65 72 20 35 20 61 72 67 73 ter after 5 args
60a0: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
60b0: 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 _arg_leftadjuste
60c0: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
60d0: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
60e0: 20 20 28 28 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 ((((LIST)->ons
60f0: 74 61 63 6b 20 3d 3d 20 30 20 26 26 20 28 4c 49 tack == 0 && (LI
6100: 53 54 29 2d 3e 61 70 74 72 20 3e 3d 20 28 6c 6f ST)->aptr >= (lo
6110: 6e 67 29 26 28 4c 49 53 54 29 2d 3e 72 65 67 61 ng)&(LIST)->rega
6120: 72 67 5b 35 5d 29 09 5c 0a 20 20 20 20 3f 20 28 rg[5]).\. ? (
6130: 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d (LIST)->onstack=
6140: 31 2c 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 1, (LIST)->aptr
6150: 3d 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 = (LIST)->saptr)
6160: 20 3a 20 30 29 2c 09 09 5c 0a 20 20 20 28 4c 49 : 0),..\. (LI
6170: 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 ST)->aptr += __v
6180: 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 a_argsize(TYPE_S
6190: 49 5a 45 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c IZE),....\. (L
61a0: 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f 76 IST)->aptr - __v
61b0: 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 a_argsize(TYPE_S
61c0: 49 5a 45 29 09 09 09 09 5c 0a 20 20 29 0a 23 64 IZE)....\. ).#d
61d0: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 72 efine __va_arg_r
61e0: 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 ightadjusted(LIS
61f0: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
6200: 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 28 _ALIGN) \. (((
6210: 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b ((LIST)->onstack
6220: 20 3d 3d 20 30 20 26 26 20 28 28 4c 49 53 54 29 == 0 && ((LIST)
6230: 2d 3e 61 70 74 72 20 3e 3d 20 28 6c 6f 6e 67 29 ->aptr >= (long)
6240: 26 28 4c 49 53 54 29 2d 3e 72 65 67 61 72 67 5b &(LIST)->regarg[
6250: 35 5d 29 29 20 5c 0a 20 20 20 7c 7c 20 28 28 54 5])) \. || ((T
6260: 59 50 45 5f 53 49 5a 45 29 20 3e 20 73 69 7a 65 YPE_SIZE) > size
6270: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 26 26 20 of(__vaword) &&
6280: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3e 3d 20 (LIST)->aptr >=
6290: 28 6c 6f 6e 67 29 26 28 4c 49 53 54 29 2d 3e 72 (long)&(LIST)->r
62a0: 65 67 61 72 67 5b 34 5d 29 29 20 5c 0a 20 20 20 egarg[4])) \.
62b0: 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 ? ((LIST)->onst
62c0: 61 63 6b 3d 31 2c 20 28 4c 49 53 54 29 2d 3e 61 ack=1, (LIST)->a
62d0: 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e 73 61 ptr = (LIST)->sa
62e0: 70 74 72 29 20 3a 20 30 29 2c 09 09 5c 0a 20 20 ptr) : 0),..\.
62f0: 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d (LIST)->aptr +=
6300: 20 5f 5f 76 61 5f 61 72 67 73 69 7a 65 28 54 59 __va_argsize(TY
6310: 50 45 5f 53 49 5a 45 29 2c 09 09 09 09 5c 0a 20 PE_SIZE),....\.
6320: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d (LIST)->aptr -
6330: 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3c 20 ((TYPE_SIZE) <
6340: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
6350: 09 09 09 5c 0a 09 09 20 20 20 3f 20 28 54 59 50 ...\... ? (TYP
6360: 45 5f 53 49 5a 45 29 09 09 09 09 09 5c 0a 09 09 E_SIZE).....\...
6370: 20 20 20 3a 20 5f 5f 76 61 5f 61 72 67 73 69 7a : __va_argsiz
6380: 65 28 54 59 50 45 5f 53 49 5a 45 29 09 09 09 09 e(TYPE_SIZE)....
6390: 5c 0a 09 09 20 20 29 09 09 09 09 09 09 09 5c 0a \... ).......\.
63a0: 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 ).#endif.#if d
63b0: 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 efined(__mipsn32
63c0: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
63d0: 5f 6d 69 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 _mips64__) || de
63e0: 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 36 34 5f fined(__sparc64_
63f0: 5f 29 0a 2f 2a 20 61 72 67 73 20 67 72 6f 77 20 _)./* args grow
6400: 75 70 20 2a 2f 0a 2f 2a 20 73 6d 61 6c 6c 20 73 up */./* small s
6410: 74 72 75 63 74 75 72 65 73 20 3c 20 31 20 77 6f tructures < 1 wo
6420: 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 64 20 rd are adjusted
6430: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d depending on com
6440: 70 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 6e 65 piler */.#define
6450: 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 __va_arg_leftad
6460: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
6470: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
6480: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
6490: 61 6e 75 6d 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 anum += __va_arg
64a0: 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2f size(TYPE_SIZE)/
64b0: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
64c0: 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e ,..\. (LIST)->
64d0: 61 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 67 aptr += __va_arg
64e0: 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 2c size(TYPE_SIZE),
64f0: 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d ....\. (LIST)-
6500: 3e 61 70 74 72 20 2d 20 5f 5f 76 61 5f 61 72 67 >aptr - __va_arg
6510: 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 09 size(TYPE_SIZE).
6520: 09 09 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 ...\. ).#define
6530: 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 61 __va_arg_righta
6540: 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 djusted(LIST,TYP
6550: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
6560: 4e 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d N) \. ((LIST)-
6570: 3e 61 6e 75 6d 20 2b 3d 20 5f 5f 76 61 5f 61 72 >anum += __va_ar
6580: 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 gsize(TYPE_SIZE)
6590: 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 /sizeof(__vaword
65a0: 29 2c 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d ),..\. (LIST)-
65b0: 3e 61 70 74 72 20 2b 3d 20 5f 5f 76 61 5f 61 72 >aptr += __va_ar
65c0: 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a 45 29 gsize(TYPE_SIZE)
65d0: 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 ,....\. (LIST)
65e0: 2d 3e 61 70 74 72 20 2d 20 28 28 54 59 50 45 5f ->aptr - ((TYPE_
65f0: 53 49 5a 45 29 20 3c 20 73 69 7a 65 6f 66 28 5f SIZE) < sizeof(_
6600: 5f 76 61 77 6f 72 64 29 09 09 09 5c 0a 09 09 20 _vaword)...\...
6610: 20 20 3f 20 28 54 59 50 45 5f 53 49 5a 45 29 09 ? (TYPE_SIZE).
6620: 09 09 09 09 5c 0a 09 09 20 20 20 3a 20 5f 5f 76 ....\... : __v
6630: 61 5f 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 a_argsize(TYPE_S
6640: 49 5a 45 29 09 09 09 09 5c 0a 09 09 20 20 29 09 IZE)....\... ).
6650: 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 ......\. ).#end
6660: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
6670: 5f 68 70 70 61 5f 5f 29 0a 2f 2a 20 61 72 67 73 _hppa__)./* args
6680: 20 67 72 6f 77 20 64 6f 77 6e 20 2a 2f 0a 23 64 grow down */.#d
6690: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c efine __va_arg_l
66a0: 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 eftadjusted(LIST
66b0: 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f ,TYPE_SIZE,TYPE_
66c0: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c 49 ALIGN) \. ((LI
66d0: 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 4c 49 53 ST)->aptr = (LIS
66e0: 54 29 2d 3e 61 70 74 72 20 2d 20 5f 5f 76 61 5f T)->aptr - __va_
66f0: 61 72 67 73 69 7a 65 28 54 59 50 45 5f 53 49 5a argsize(TYPE_SIZ
6700: 45 29 2c 09 09 5c 0a 20 20 20 28 28 54 59 50 45 E),..\. ((TYPE
6710: 5f 53 49 5a 45 29 20 3e 20 34 20 26 26 20 28 28 _SIZE) > 4 && ((
6720: 4c 49 53 54 29 2d 3e 61 70 74 72 20 26 3d 20 2d LIST)->aptr &= -
6730: 38 29 29 2c 09 09 09 09 5c 0a 20 20 20 28 4c 49 8)),....\. (LI
6740: 53 54 29 2d 3e 61 70 74 72 09 09 09 09 09 09 09 ST)->aptr.......
6750: 09 5c 0a 20 20 29 0a 23 64 65 66 69 6e 65 20 5f .\. ).#define _
6760: 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 61 64 6a _va_arg_rightadj
6770: 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f usted(LIST,TYPE_
6780: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
6790: 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 61 \. ((LIST)->a
67a0: 70 74 72 20 3d 20 28 4c 49 53 54 29 2d 3e 61 70 ptr = (LIST)->ap
67b0: 74 72 20 2d 20 5f 5f 76 61 5f 61 72 67 73 69 7a tr - __va_argsiz
67c0: 65 28 54 59 50 45 5f 53 49 5a 45 29 2c 09 09 5c e(TYPE_SIZE),..\
67d0: 0a 20 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 . ((TYPE_SIZE)
67e0: 20 3e 20 34 20 26 26 20 28 28 4c 49 53 54 29 2d > 4 && ((LIST)-
67f0: 3e 61 70 74 72 20 26 3d 20 2d 38 29 29 2c 09 09 >aptr &= -8)),..
6800: 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 ..\. (LIST)->a
6810: 70 74 72 20 2b 20 28 28 2d 28 54 59 50 45 5f 53 ptr + ((-(TYPE_S
6820: 49 5a 45 29 29 20 26 20 33 29 09 09 09 09 09 5c IZE)) & 3).....\
6830: 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 . ).#endif.#if
6840: 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 5f 5f defined(__i386__
6850: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 ) || defined(__a
6860: 6c 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e lpha__) || defin
6870: 65 64 28 5f 5f 69 61 36 34 5f 5f 29 0a 2f 2a 20 ed(__ia64__)./*
6880: 6c 69 74 74 6c 65 20 65 6e 64 69 61 6e 20 2d 3e little endian ->
6890: 20 73 6d 61 6c 6c 20 61 72 67 73 20 3c 20 31 20 small args < 1
68a0: 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 word are adjuste
68b0: 64 20 74 6f 20 74 68 65 20 6c 65 66 74 20 2a 2f d to the left */
68c0: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
68d0: 67 5f 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c g_adjusted(LIST,
68e0: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
68f0: 4c 49 47 4e 29 20 20 5c 0a 20 20 5f 5f 76 61 5f LIGN) \. __va_
6900: 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 arg_leftadjusted
6910: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
6920: 54 59 50 45 5f 41 4c 49 47 4e 29 0a 23 65 6e 64 TYPE_ALIGN).#end
6930: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
6940: 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 _m68k__) || defi
6950: 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 ned(__mipsn32__)
6960: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 || defined(__mi
6970: 70 73 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e ps64__) || defin
6980: 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 7c 7c ed(__sparc__) ||
6990: 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 63 defined(__sparc
69a0: 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 64__) || defined
69b0: 28 5f 5f 68 70 70 61 5f 5f 29 20 7c 7c 20 64 65 (__hppa__) || de
69c0: 66 69 6e 65 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c fined(__arm__) |
69d0: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 36 30 | defined(__rs60
69e0: 30 30 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 00__) || defined
69f0: 28 5f 5f 6d 38 38 6b 5f 5f 29 20 7c 7c 20 64 65 (__m88k__) || de
6a00: 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 5f 5f fined(__convex__
6a10: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
6a20: 33 39 30 5f 5f 29 0a 2f 2a 20 62 69 67 20 65 6e 390__)./* big en
6a30: 64 69 61 6e 20 2d 3e 20 73 6d 61 6c 6c 20 61 72 dian -> small ar
6a40: 67 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 gs < 1 word are
6a50: 61 64 6a 75 73 74 65 64 20 74 6f 20 74 68 65 20 adjusted to the
6a60: 72 69 67 68 74 20 2a 2f 0a 23 64 65 66 69 6e 65 right */.#define
6a70: 20 5f 5f 76 61 5f 61 72 67 5f 61 64 6a 75 73 74 __va_arg_adjust
6a80: 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ed(LIST,TYPE_SIZ
6a90: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
6aa0: 0a 20 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 . __va_arg_righ
6ab0: 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 tadjusted(LIST,T
6ac0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
6ad0: 49 47 4e 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 IGN).#endif.#if
6ae0: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f defined(__mips__
6af0: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
6b00: 6d 69 70 73 6e 33 32 5f 5f 29 0a 2f 2a 20 62 69 mipsn32__)./* bi
6b10: 67 20 65 6e 64 69 61 6e 20 2d 3e 20 73 6d 61 6c g endian -> smal
6b20: 6c 20 61 72 67 73 20 3c 20 31 20 77 6f 72 64 20 l args < 1 word
6b30: 61 72 65 20 61 64 6a 75 73 74 65 64 20 74 6f 20 are adjusted to
6b40: 74 68 65 20 72 69 67 68 74 20 2a 2f 0a 23 64 65 the right */.#de
6b50: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 61 64 fine __va_arg_ad
6b60: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
6b70: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
6b80: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
6b90: 61 6e 75 6d 2b 2b 2c 20 5f 5f 76 61 5f 61 72 67 anum++, __va_arg
6ba0: 5f 72 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c _rightadjusted(L
6bb0: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
6bc0: 50 45 5f 41 4c 49 47 4e 29 29 0a 23 65 6e 64 69 PE_ALIGN)).#endi
6bd0: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
6be0: 78 38 36 5f 36 34 5f 5f 29 0a 2f 2a 20 74 68 65 x86_64__)./* the
6bf0: 20 66 69 72 73 74 20 36 20 61 72 67 75 6d 65 6e first 6 argumen
6c00: 74 20 77 6f 72 64 73 20 61 72 65 20 70 61 73 73 t words are pass
6c10: 65 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 20 ed in registers
6c20: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
6c30: 61 72 67 5f 61 64 6a 75 73 74 65 64 28 4c 49 53 arg_adjusted(LIS
6c40: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
6c50: 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 4c _ALIGN) \. ((L
6c60: 49 53 54 29 2d 3e 6d 65 6d 69 61 72 67 70 74 72 IST)->memiargptr
6c70: 20 2b 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 + ((TYPE_SIZE)
6c80: 2b 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 + sizeof(__vawor
6c90: 64 29 2d 31 29 20 2f 20 73 69 7a 65 6f 66 28 5f d)-1) / sizeof(_
6ca0: 5f 76 61 77 6f 72 64 29 20 3c 3d 20 26 28 4c 49 _vaword) <= &(LI
6cb0: 53 54 29 2d 3e 69 61 72 67 5b 36 5d 20 5c 0a 20 ST)->iarg[6] \.
6cc0: 20 20 3f 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d ? ((LIST)->mem
6cd0: 69 61 72 67 70 74 72 20 2b 3d 20 28 28 54 59 50 iargptr += ((TYP
6ce0: 45 5f 53 49 5a 45 29 20 2b 20 73 69 7a 65 6f 66 E_SIZE) + sizeof
6cf0: 28 5f 5f 76 61 77 6f 72 64 29 2d 31 29 20 2f 20 (__vaword)-1) /
6d00: 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 sizeof(__vaword)
6d10: 2c 20 5c 0a 20 20 20 20 20 20 28 4c 49 53 54 29 , \. (LIST)
6d20: 2d 3e 6d 65 6d 69 61 72 67 70 74 72 20 2d 20 28 ->memiargptr - (
6d30: 28 54 59 50 45 5f 53 49 5a 45 29 20 2b 20 73 69 (TYPE_SIZE) + si
6d40: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 2d 31 zeof(__vaword)-1
6d50: 29 20 2f 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 ) / sizeof(__vaw
6d60: 6f 72 64 29 20 5c 0a 20 20 20 20 20 29 09 09 09 ord) \. )...
6d70: 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 28 76 6f ......\. : (vo
6d80: 69 64 2a 29 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 id*)__va_arg_lef
6d90: 74 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 tadjusted(LIST,T
6da0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
6db0: 49 47 4e 29 09 09 5c 0a 20 20 29 0a 23 65 6e 64 IGN)..\. ).#end
6dc0: 69 66 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f if.#define __va_
6dd0: 61 72 67 28 4c 49 53 54 2c 54 59 50 45 29 20 20 arg(LIST,TYPE)
6de0: 5c 0a 20 20 2a 28 54 59 50 45 2a 29 5f 5f 76 61 \. *(TYPE*)__va
6df0: 5f 61 72 67 5f 61 64 6a 75 73 74 65 64 28 4c 49 _arg_adjusted(LI
6e00: 53 54 2c 73 69 7a 65 6f 66 28 54 59 50 45 29 2c ST,sizeof(TYPE),
6e10: 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 54 59 50 __VA_alignof(TYP
6e20: 45 29 29 0a 0a 2f 2a 20 49 6e 74 65 67 65 72 20 E))../* Integer
6e30: 61 72 67 75 6d 65 6e 74 73 2e 20 2a 2f 0a 0a 23 arguments. */..#
6e40: 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 63 68 define va_arg_ch
6e50: 61 72 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 ar(LIST).__va_ar
6e60: 67 28 4c 49 53 54 2c 63 68 61 72 29 0a 23 64 65 g(LIST,char).#de
6e70: 66 69 6e 65 20 76 61 5f 61 72 67 5f 73 63 68 61 fine va_arg_scha
6e80: 72 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 r(LIST).__va_arg
6e90: 28 4c 49 53 54 2c 73 69 67 6e 65 64 20 63 68 61 (LIST,signed cha
6ea0: 72 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 r).#define va_ar
6eb0: 67 5f 75 63 68 61 72 28 4c 49 53 54 29 09 5f 5f g_uchar(LIST).__
6ec0: 76 61 5f 61 72 67 28 4c 49 53 54 2c 75 6e 73 69 va_arg(LIST,unsi
6ed0: 67 6e 65 64 20 63 68 61 72 29 0a 23 64 65 66 69 gned char).#defi
6ee0: 6e 65 20 76 61 5f 61 72 67 5f 73 68 6f 72 74 28 ne va_arg_short(
6ef0: 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c LIST).__va_arg(L
6f00: 49 53 54 2c 73 68 6f 72 74 29 0a 23 64 65 66 69 IST,short).#defi
6f10: 6e 65 20 76 61 5f 61 72 67 5f 75 73 68 6f 72 74 ne va_arg_ushort
6f20: 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 (LIST).__va_arg(
6f30: 4c 49 53 54 2c 75 6e 73 69 67 6e 65 64 20 73 68 LIST,unsigned sh
6f40: 6f 72 74 29 0a 23 64 65 66 69 6e 65 20 76 61 5f ort).#define va_
6f50: 61 72 67 5f 69 6e 74 28 4c 49 53 54 29 09 5f 5f arg_int(LIST).__
6f60: 76 61 5f 61 72 67 28 4c 49 53 54 2c 69 6e 74 29 va_arg(LIST,int)
6f70: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
6f80: 75 69 6e 74 28 4c 49 53 54 29 09 5f 5f 76 61 5f uint(LIST).__va_
6f90: 61 72 67 28 4c 49 53 54 2c 75 6e 73 69 67 6e 65 arg(LIST,unsigne
6fa0: 64 20 69 6e 74 29 0a 23 64 65 66 69 6e 65 20 76 d int).#define v
6fb0: 61 5f 61 72 67 5f 6c 6f 6e 67 28 4c 49 53 54 29 a_arg_long(LIST)
6fc0: 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 6c .__va_arg(LIST,l
6fd0: 6f 6e 67 29 0a 23 64 65 66 69 6e 65 20 76 61 5f ong).#define va_
6fe0: 61 72 67 5f 75 6c 6f 6e 67 28 4c 49 53 54 29 09 arg_ulong(LIST).
6ff0: 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 75 6e __va_arg(LIST,un
7000: 73 69 67 6e 65 64 20 6c 6f 6e 67 29 0a 0a 23 69 signed long)..#i
7010: 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 f defined(__mips
7020: 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 64__) || defined
7030: 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 20 7c 7c (__sparc64__) ||
7040: 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 61 defined(__alpha
7050: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7060: 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 _ia64__) || defi
7070: 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a ned(__x86_64__).
7080: 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 20 61 /* `long long' a
7090: 6e 64 20 60 6c 6f 6e 67 27 20 61 72 65 20 69 64 nd `long' are id
70a0: 65 6e 74 69 63 61 6c 2e 20 2a 2f 0a 23 64 65 66 entical. */.#def
70b0: 69 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c ine va_arg_longl
70c0: 6f 6e 67 09 09 76 61 5f 61 72 67 5f 6c 6f 6e 67 ong..va_arg_long
70d0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
70e0: 75 6c 6f 6e 67 6c 6f 6e 67 09 76 61 5f 61 72 67 ulonglong.va_arg
70f0: 5f 75 6c 6f 6e 67 0a 23 65 6c 69 66 20 64 65 66 _ulong.#elif def
7100: 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f ined(__mipsn32__
7110: 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 )./* `long long'
7120: 20 66 69 74 73 20 69 6e 20 5f 5f 76 61 77 6f 72 fits in __vawor
7130: 64 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 d. */.#define va
7140: 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 _arg_longlong(LI
7150: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
7160: 54 2c 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 64 65 T,long long).#de
7170: 66 69 6e 65 20 76 61 5f 61 72 67 5f 75 6c 6f 6e fine va_arg_ulon
7180: 67 6c 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 glong(LIST).__va
7190: 5f 61 72 67 28 4c 49 53 54 2c 75 6e 73 69 67 6e _arg(LIST,unsign
71a0: 65 64 20 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 65 ed long long).#e
71b0: 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 lif defined(__i3
71c0: 38 36 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 86__) || defined
71d0: 28 5f 5f 6d 36 38 6b 5f 5f 29 20 7c 7c 20 64 65 (__m68k__) || de
71e0: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 fined(__mips__)
71f0: 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 || (defined(__sp
7200: 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e arc__) && !defin
7210: 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 ed(__sparc64__))
7220: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 || defined(__hp
7230: 70 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 pa__) || defined
7240: 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 64 65 66 (__arm__) || def
7250: 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 ined(__rs6000__)
7260: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 || defined(__m8
7270: 38 6b 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 8k__) || defined
7280: 28 5f 5f 63 6f 6e 76 65 78 5f 5f 29 20 7c 7c 20 (__convex__) ||
7290: 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 30 5f 5f defined(__s390__
72a0: 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 )./* `long long'
72b0: 73 20 61 72 65 20 70 61 73 73 65 64 20 65 6d 62 s are passed emb
72c0: 65 64 64 65 64 20 6f 6e 20 74 68 65 20 61 72 67 edded on the arg
72d0: 20 73 74 61 63 6b 2e 20 2a 2f 0a 23 64 65 66 69 stack. */.#defi
72e0: 6e 65 20 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f ne va_arg_longlo
72f0: 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 72 ng(LIST).__va_ar
7300: 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c g_longlong(LIST,
7310: 6c 6f 6e 67 20 6c 6f 6e 67 29 0a 23 64 65 66 69 long long).#defi
7320: 6e 65 20 76 61 5f 61 72 67 5f 75 6c 6f 6e 67 6c ne va_arg_ulongl
7330: 6f 6e 67 28 4c 49 53 54 29 09 5f 5f 76 61 5f 61 ong(LIST).__va_a
7340: 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 rg_longlong(LIST
7350: 2c 75 6e 73 69 67 6e 65 64 20 6c 6f 6e 67 20 6c ,unsigned long l
7360: 6f 6e 67 29 0a 23 69 66 20 64 65 66 69 6e 65 64 ong).#if defined
7370: 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 65 (__i386__) || de
7380: 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 20 fined(__m68k__)
7390: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 72 6d || defined(__arm
73a0: 5f 5f 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 __) || (defined(
73b0: 5f 5f 72 73 36 30 30 30 5f 5f 29 20 26 26 20 28 __rs6000__) && (
73c0: 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c defined(_AIX) ||
73d0: 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 (defined(__MACH
73e0: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
73f0: 5f 41 50 50 4c 45 5f 5f 29 29 29 29 20 7c 7c 20 _APPLE__)))) ||
7400: 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e 76 65 78 defined(__convex
7410: 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e __)./* `long lon
7420: 67 27 73 20 61 72 65 20 28 61 74 20 6d 6f 73 74 g's are (at most
7430: 29 20 77 6f 72 64 2d 61 6c 69 67 6e 65 64 2e 20 ) word-aligned.
7440: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
7450: 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 arg_longlong(LIS
7460: 54 2c 54 59 50 45 29 09 5f 5f 76 61 5f 61 72 67 T,TYPE).__va_arg
7470: 28 4c 49 53 54 2c 54 59 50 45 29 0a 23 65 6e 64 (LIST,TYPE).#end
7480: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
7490: 5f 6d 69 70 73 5f 5f 29 20 7c 7c 20 28 64 65 66 _mips__) || (def
74a0: 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 ined(__rs6000__)
74b0: 20 26 26 20 21 28 64 65 66 69 6e 65 64 28 5f 41 && !(defined(_A
74c0: 49 58 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 IX) || (defined(
74d0: 5f 5f 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 __MACH__) && def
74e0: 69 6e 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 ined(__APPLE__))
74f0: 29 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f )) || defined(__
7500: 6d 38 38 6b 5f 5f 29 0a 2f 2a 20 60 6c 6f 6e 67 m88k__)./* `long
7510: 20 6c 6f 6e 67 27 73 20 68 61 76 65 20 61 6c 69 long's have ali
7520: 67 6e 6d 65 6e 74 20 38 2e 20 2a 2f 0a 23 64 65 gnment 8. */.#de
7530: 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 6f fine __va_arg_lo
7540: 6e 67 6c 6f 6e 67 28 4c 49 53 54 2c 54 59 50 45 nglong(LIST,TYPE
7550: 29 09 09 09 09 09 5c 0a 20 20 28 28 4c 49 53 54 ).....\. ((LIST
7560: 29 2d 3e 61 70 74 72 20 3d 20 28 28 28 4c 49 53 )->aptr = (((LIS
7570: 54 29 2d 3e 61 70 74 72 2b 5f 5f 56 41 5f 61 6c T)->aptr+__VA_al
7580: 69 67 6e 6f 66 28 54 59 50 45 29 2d 31 29 20 26 ignof(TYPE)-1) &
7590: 20 2d 28 6c 6f 6e 67 29 5f 5f 56 41 5f 61 6c 69 -(long)__VA_ali
75a0: 67 6e 6f 66 28 54 59 50 45 29 29 2c 20 5c 0a 20 gnof(TYPE)), \.
75b0: 20 20 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c __va_arg(LIST,
75c0: 54 59 50 45 29 29 0a 23 65 6e 64 69 66 0a 23 69 TYPE)).#endif.#i
75d0: 66 20 28 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 f (defined(__spa
75e0: 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 rc__) && !define
75f0: 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 29 20 d(__sparc64__))
7600: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 || defined(__s39
7610: 30 5f 5f 29 0a 2f 2a 20 57 69 74 68 69 6e 20 74 0__)./* Within t
7620: 68 65 20 61 72 67 20 73 74 61 63 6b 2c 20 74 68 he arg stack, th
7630: 65 20 61 6c 69 67 6e 6d 65 6e 74 20 69 73 20 6f e alignment is o
7640: 6e 6c 79 20 34 2c 20 6e 6f 74 20 38 2e 20 2a 2f nly 4, not 8. */
7650: 0a 2f 2a 20 42 65 77 61 72 65 20 61 67 61 69 6e ./* Beware again
7660: 73 74 20 75 6e 61 6c 69 67 6e 65 64 20 61 63 63 st unaligned acc
7670: 65 73 73 65 73 21 20 2a 2f 0a 23 64 65 66 69 6e esses! */.#defin
7680: 65 20 5f 5f 76 61 5f 61 72 67 5f 6c 6f 6e 67 6c e __va_arg_longl
7690: 6f 6e 67 28 4c 49 53 54 2c 54 59 50 45 29 09 09 ong(LIST,TYPE)..
76a0: 09 09 09 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ...\. ((LIST)->
76b0: 74 6d 70 2e 5f 77 6f 72 64 73 5b 30 5d 20 3d 20 tmp._words[0] =
76c0: 28 28 5f 5f 76 61 77 6f 72 64 2a 29 28 28 4c 49 ((__vaword*)((LI
76d0: 53 54 29 2d 3e 61 70 74 72 29 29 5b 30 5d 2c 09 ST)->aptr))[0],.
76e0: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 74 6d .\. (LIST)->tm
76f0: 70 2e 5f 77 6f 72 64 73 5b 31 5d 20 3d 20 28 28 p._words[1] = ((
7700: 5f 5f 76 61 77 6f 72 64 2a 29 28 28 4c 49 53 54 __vaword*)((LIST
7710: 29 2d 3e 61 70 74 72 29 29 5b 31 5d 2c 09 09 5c )->aptr))[1],..\
7720: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 . (LIST)->aptr
7730: 20 2b 3d 20 73 69 7a 65 6f 66 28 54 59 50 45 29 += sizeof(TYPE)
7740: 2c 09 09 09 09 09 5c 0a 20 20 20 28 54 59 50 45 ,.....\. (TYPE
7750: 29 28 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 6c )((LIST)->tmp._l
7760: 6f 6e 67 6c 6f 6e 67 29 09 09 09 09 09 5c 0a 20 onglong).....\.
7770: 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 ).#endif.#if de
7780: 66 69 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a fined(__hppa__).
7790: 2f 2a 20 60 6c 6f 6e 67 20 6c 6f 6e 67 27 73 20 /* `long long's
77a0: 68 61 76 65 20 61 6c 69 67 6e 6d 65 6e 74 20 38 have alignment 8
77b0: 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
77c0: 61 5f 61 72 67 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c a_arg_longlong(L
77d0: 49 53 54 2c 54 59 50 45 29 09 09 09 09 09 5c 0a IST,TYPE).....\.
77e0: 20 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 ((LIST)->aptr
77f0: 3d 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 = ((LIST)->aptr
7800: 26 20 2d 28 6c 6f 6e 67 29 5f 5f 56 41 5f 61 6c & -(long)__VA_al
7810: 69 67 6e 6f 66 28 54 59 50 45 29 29 2c 09 09 5c ignof(TYPE)),..\
7820: 0a 20 20 20 5f 5f 76 61 5f 61 72 67 28 4c 49 53 . __va_arg(LIS
7830: 54 2c 54 59 50 45 29 29 0a 23 65 6e 64 69 66 0a T,TYPE)).#endif.
7840: 23 65 6e 64 69 66 0a 0a 2f 2a 20 46 6c 6f 61 74 #endif../* Float
7850: 69 6e 67 20 70 6f 69 6e 74 20 61 72 67 75 6d 65 ing point argume
7860: 6e 74 73 2e 20 2a 2f 0a 0a 23 64 65 66 69 6e 65 nts. */..#define
7870: 20 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 va_arg_float(LI
7880: 53 54 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 ST) \. ((LIST)
7890: 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 54 ->flags & __VA_T
78a0: 52 41 44 49 54 49 4f 4e 41 4c 5f 46 4c 4f 41 54 RADITIONAL_FLOAT
78b0: 5f 41 52 47 53 09 09 09 09 5c 0a 20 20 20 3f 20 _ARGS....\. ?
78c0: 28 66 6c 6f 61 74 29 76 61 5f 61 72 67 5f 64 6f (float)va_arg_do
78d0: 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 uble(LIST)......
78e0: 5c 0a 20 20 20 3a 20 5f 5f 76 61 5f 61 72 67 5f \. : __va_arg_
78f0: 66 6c 6f 61 74 28 4c 49 53 54 29 09 09 09 09 09 float(LIST).....
7900: 09 5c 0a 20 20 29 0a 0a 23 69 66 20 64 65 66 69 .\. )..#if defi
7910: 6e 65 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c ned(__i386__) ||
7920: 20 64 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f defined(__m68k_
7930: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
7940: 6d 69 70 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 mipsn32__) || de
7950: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f fined(__mips64__
7960: 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 73 ) || defined(__s
7970: 70 61 72 63 5f 5f 29 20 7c 7c 20 64 65 66 69 6e parc__) || defin
7980: 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 20 ed(__sparc64__)
7990: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 || defined(__alp
79a0: 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 ha__) || defined
79b0: 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 64 65 66 (__arm__) || def
79c0: 69 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 ined(__rs6000__)
79d0: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f || defined(__co
79e0: 6e 76 65 78 5f 5f 29 20 7c 7c 20 64 65 66 69 6e nvex__) || defin
79f0: 65 64 28 5f 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 ed(__ia64__) ||
7a00: 64 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 defined(__x86_64
7a10: 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f __) || defined(_
7a20: 5f 73 33 39 30 5f 5f 29 0a 23 64 65 66 69 6e 65 _s390__).#define
7a30: 20 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 __va_align_doub
7a40: 6c 65 28 4c 49 53 54 29 0a 23 65 6e 64 69 66 0a le(LIST).#endif.
7a50: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 #if defined(__mi
7a60: 70 73 5f 5f 29 20 26 26 20 21 64 65 66 69 6e 65 ps__) && !define
7a70: 64 28 5f 5f 6d 69 70 73 6e 33 32 5f 5f 29 20 7c d(__mipsn32__) |
7a80: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 6d 38 38 6b | defined(__m88k
7a90: 5f 5f 29 0a 2f 2a 20 5f 5f 56 41 5f 61 6c 69 67 __)./* __VA_alig
7aa0: 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3e 20 73 69 nof(double) > si
7ab0: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 2a zeof(__vaword) *
7ac0: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
7ad0: 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 lign_double(LIST
7ae0: 29 20 20 5c 0a 20 20 28 4c 49 53 54 29 2d 3e 61 ) \. (LIST)->a
7af0: 70 74 72 20 3d 20 28 28 4c 49 53 54 29 2d 3e 61 ptr = ((LIST)->a
7b00: 70 74 72 20 2b 20 73 69 7a 65 6f 66 28 64 6f 75 ptr + sizeof(dou
7b10: 62 6c 65 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 ble)-1) & -(long
7b20: 29 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c )sizeof(double),
7b30: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
7b40: 6e 65 64 28 5f 5f 68 70 70 61 5f 5f 29 0a 23 64 ned(__hppa__).#d
7b50: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 6c 69 67 6e efine __va_align
7b60: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c _double(LIST) \
7b70: 0a 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 . (LIST)->aptr
7b80: 3d 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 26 = (LIST)->aptr &
7b90: 20 2d 28 6c 6f 6e 67 29 73 69 7a 65 6f 66 28 64 -(long)sizeof(d
7ba0: 6f 75 62 6c 65 29 2c 0a 23 65 6e 64 69 66 0a 0a ouble),.#endif..
7bb0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 #if defined(__sp
7bc0: 61 72 63 5f 5f 29 20 26 26 20 21 64 65 66 69 6e arc__) && !defin
7bd0: 65 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 0a ed(__sparc64__).
7be0: 2f 2a 20 42 65 77 61 72 65 20 61 67 61 69 6e 73 /* Beware agains
7bf0: 74 20 75 6e 61 6c 69 67 6e 65 64 20 60 64 6f 75 t unaligned `dou
7c00: 62 6c 65 27 20 61 63 63 65 73 73 65 73 21 20 2a ble' accesses! *
7c10: 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 /.#define va_arg
7c20: 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c _double(LIST) \
7c30: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 . (__va_align_d
7c40: 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 ouble(LIST).....
7c50: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 74 6d .\. (LIST)->tm
7c60: 70 2e 5f 77 6f 72 64 73 5b 30 5d 20 3d 20 28 28 p._words[0] = ((
7c70: 5f 5f 76 61 77 6f 72 64 2a 29 28 28 4c 49 53 54 __vaword*)((LIST
7c80: 29 2d 3e 61 70 74 72 29 29 5b 30 5d 2c 09 09 5c )->aptr))[0],..\
7c90: 0a 20 20 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e . (LIST)->tmp.
7ca0: 5f 77 6f 72 64 73 5b 31 5d 20 3d 20 28 28 5f 5f _words[1] = ((__
7cb0: 76 61 77 6f 72 64 2a 29 28 28 4c 49 53 54 29 2d vaword*)((LIST)-
7cc0: 3e 61 70 74 72 29 29 5b 31 5d 2c 09 09 5c 0a 20 >aptr))[1],..\.
7cd0: 20 20 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (LIST)->aptr +
7ce0: 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 = sizeof(double)
7cf0: 2c 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 ,.....\. (LIST
7d00: 29 2d 3e 74 6d 70 2e 5f 64 6f 75 62 6c 65 09 09 )->tmp._double..
7d10: 09 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 69 .....\. ).#endi
7d20: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
7d30: 61 6c 70 68 61 5f 5f 29 0a 2f 2a 20 54 68 65 20 alpha__)./* The
7d40: 66 69 72 73 74 20 36 20 66 6c 6f 61 74 69 6e 67 first 6 floating
7d50: 20 70 6f 69 6e 74 20 72 65 67 69 73 74 65 72 73 point registers
7d60: 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f 72 65 have been store
7d70: 64 20 69 6e 20 61 6e 6f 74 68 65 72 20 70 6c 61 d in another pla
7d80: 63 65 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 ce. */.#define v
7d90: 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 a_arg_double(LIS
7da0: 54 29 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 29 T) \. (((LIST)
7db0: 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 ->aptr += sizeof
7dc0: 28 64 6f 75 62 6c 65 29 29 20 3c 3d 20 28 4c 49 (double)) <= (LI
7dd0: 53 54 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 ST)->memargptr..
7de0: 5c 0a 20 20 20 3f 20 2a 28 64 6f 75 62 6c 65 2a \. ? *(double*
7df0: 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d )((LIST)->aptr -
7e00: 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 20 sizeof(double)
7e10: 2d 20 36 2a 73 69 7a 65 6f 66 28 64 6f 75 62 6c - 6*sizeof(doubl
7e20: 65 29 29 09 5c 0a 20 20 20 3a 20 2a 28 64 6f 75 e)).\. : *(dou
7e30: 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 ble*)((LIST)->ap
7e40: 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 tr - sizeof(doub
7e50: 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 0a 23 64 le))....\. ).#d
7e60: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 efine __va_arg_f
7e70: 6c 6f 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 loat(LIST) \.
7e80: 28 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b (((LIST)->aptr +
7e90: 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 = sizeof(double)
7ea0: 29 20 3c 3d 20 28 4c 49 53 54 29 2d 3e 6d 65 6d ) <= (LIST)->mem
7eb0: 61 72 67 70 74 72 09 09 5c 0a 20 20 20 3f 20 2f argptr..\. ? /
7ec0: 2a 20 54 68 65 20 66 69 72 73 74 20 36 20 61 72 * The first 6 ar
7ed0: 67 73 20 68 61 76 65 20 62 65 65 6e 20 70 75 74 gs have been put
7ee0: 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 20 62 79 20 into memory by
7ef0: 22 73 74 74 22 20 69 6e 73 74 72 75 63 74 69 6f "stt" instructio
7f00: 6e 73 20 2a 2f 5c 0a 20 20 20 20 20 2f 2a 20 28 ns */\. /* (
7f10: 73 65 65 20 76 61 63 61 6c 6c 2d 61 6c 70 68 61 see vacall-alpha
7f20: 2e 73 21 29 2e 20 54 68 65 72 65 66 6f 72 65 20 .s!). Therefore
7f30: 6c 6f 61 64 20 74 68 65 6d 20 61 73 20 64 6f 75 load them as dou
7f40: 62 6c 65 73 2e 20 2a 2f 09 5c 0a 20 20 20 20 20 bles. */.\.
7f50: 2f 2a 20 57 68 65 6e 20 76 69 65 77 65 64 20 61 /* When viewed a
7f60: 73 20 66 6c 6f 61 74 73 2c 20 74 68 65 20 76 61 s floats, the va
7f70: 6c 75 65 20 77 69 6c 6c 20 62 65 20 74 68 65 20 lue will be the
7f80: 63 6f 72 72 65 63 74 20 6f 6e 65 2e 20 2a 2f 09 correct one. */.
7f90: 5c 0a 20 20 20 20 20 28 66 6c 6f 61 74 29 2a 28 \. (float)*(
7fa0: 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d double*)((LIST)-
7fb0: 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 >aptr - sizeof(d
7fc0: 6f 75 62 6c 65 29 20 2d 20 36 2a 73 69 7a 65 6f ouble) - 6*sizeo
7fd0: 66 28 64 6f 75 62 6c 65 29 29 20 5c 0a 20 20 20 f(double)) \.
7fe0: 3a 20 2f 2a 20 54 68 65 73 65 20 61 72 67 73 20 : /* These args
7ff0: 68 61 76 65 20 62 65 65 6e 20 70 75 74 20 69 6e have been put in
8000: 74 6f 20 6d 65 6d 6f 72 79 20 62 79 20 22 73 74 to memory by "st
8010: 73 22 20 69 6e 73 74 72 75 63 74 69 6f 6e 73 2c s" instructions,
8020: 20 2a 2f 09 5c 0a 20 20 20 20 20 2f 2a 20 74 68 */.\. /* th
8030: 65 72 65 66 6f 72 65 20 6c 6f 61 64 20 74 68 65 erefore load the
8040: 6d 20 61 73 20 66 6c 6f 61 74 73 2e 20 2a 2f 09 m as floats. */.
8050: 09 09 09 5c 0a 20 20 20 20 20 2a 28 66 6c 6f 61 ...\. *(floa
8060: 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 t*)((LIST)->aptr
8070: 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 - sizeof(double
8080: 29 29 09 09 09 09 5c 0a 20 20 29 0a 23 65 6e 64 ))....\. ).#end
8090: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
80a0: 5f 68 70 70 61 5f 5f 29 0a 2f 2a 20 54 68 65 20 _hppa__)./* The
80b0: 66 69 72 73 74 20 34 20 66 6c 6f 61 74 20 72 65 first 4 float re
80c0: 67 69 73 74 65 72 73 20 61 6e 64 20 74 68 65 20 gisters and the
80d0: 66 69 72 73 74 20 32 20 64 6f 75 62 6c 65 20 72 first 2 double r
80e0: 65 67 69 73 74 65 72 73 20 61 72 65 20 73 74 6f egisters are sto
80f0: 72 65 64 0a 20 2a 20 65 6c 73 65 77 68 65 72 65 red. * elsewhere
8100: 2e 0a 20 2a 2f 0a 23 69 66 20 31 20 2f 2a 20 67 .. */.#if 1 /* g
8110: 63 63 2d 32 2e 35 2e 32 20 70 61 73 73 65 73 20 cc-2.5.2 passes
8120: 74 68 65 73 65 20 61 72 67 73 20 69 6e 20 67 65 these args in ge
8130: 6e 65 72 61 6c 20 72 65 67 69 73 74 65 72 73 21 neral registers!
8140: 20 41 20 62 75 67 2c 20 49 20 74 68 69 6e 6b 2e A bug, I think.
8150: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 */.#define __va
8160: 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 _arg_float(LIST)
8170: 20 20 5c 0a 20 20 28 2a 28 66 6c 6f 61 74 2a 29 \. (*(float*)
8180: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 3d ((LIST)->aptr -=
8190: 20 73 69 7a 65 6f 66 28 66 6c 6f 61 74 29 29 29 sizeof(float)))
81a0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f .#define va_arg_
81b0: 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a double(LIST) \.
81c0: 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f (__va_align_do
81d0: 75 62 6c 65 28 4c 49 53 54 29 09 09 09 09 09 09 uble(LIST)......
81e0: 5c 0a 20 20 20 2a 28 64 6f 75 62 6c 65 2a 29 28 \. *(double*)(
81f0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 3d 20 (LIST)->aptr -=
8200: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 sizeof(double)).
8210: 09 09 09 5c 0a 20 20 29 0a 23 65 6c 73 65 20 2f ...\. ).#else /
8220: 2a 20 74 68 69 73 20 77 6f 75 6c 64 20 62 65 20 * this would be
8230: 63 6f 72 72 65 63 74 20 69 66 20 74 68 65 20 61 correct if the a
8240: 72 67 73 20 77 65 72 65 20 70 61 73 73 65 64 20 rgs were passed
8250: 69 6e 20 66 6c 6f 61 74 20 72 65 67 69 73 74 65 in float registe
8260: 72 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f rs. */.#define _
8270: 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 _va_arg_float(LI
8280: 53 54 29 20 20 5c 0a 20 20 28 28 28 4c 49 53 54 ST) \. (((LIST
8290: 29 2d 3e 61 70 74 72 20 2d 3d 20 73 69 7a 65 6f )->aptr -= sizeo
82a0: 66 28 66 6c 6f 61 74 29 29 20 3e 3d 20 28 4c 49 f(float)) >= (LI
82b0: 53 54 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 ST)->memargptr..
82c0: 09 5c 0a 20 20 20 3f 20 2f 2a 20 54 68 65 20 66 .\. ? /* The f
82d0: 69 72 73 74 20 34 20 66 6c 6f 61 74 20 61 72 67 irst 4 float arg
82e0: 73 20 61 72 65 20 73 74 6f 72 65 64 20 73 65 70 s are stored sep
82f0: 61 72 61 74 65 6c 79 2e 20 2a 2f 09 09 5c 0a 20 arately. */..\.
8300: 20 20 20 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c *(float*)((L
8310: 49 53 54 29 2d 3e 61 70 74 72 20 2b 20 28 4c 49 IST)->aptr + (LI
8320: 53 54 29 2d 3e 66 61 72 67 5f 6f 66 66 73 65 74 ST)->farg_offset
8330: 29 09 09 09 5c 0a 20 20 20 3a 20 2a 28 66 6c 6f )...\. : *(flo
8340: 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 at*)((LIST)->apt
8350: 72 29 09 09 09 09 09 09 5c 0a 20 20 29 0a 23 64 r)......\. ).#d
8360: 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 efine va_arg_dou
8370: 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 ble(LIST) \. (
8380: 5f 5f 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c __va_align_doubl
8390: 65 28 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 e(LIST)......\.
83a0: 20 20 28 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 (((LIST)->aptr
83b0: 20 2d 3d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c -= sizeof(doubl
83c0: 65 29 29 20 3e 3d 20 28 4c 49 53 54 29 2d 3e 6d e)) >= (LIST)->m
83d0: 65 6d 61 72 67 70 74 72 09 09 5c 0a 20 20 20 20 emargptr..\.
83e0: 3f 20 2f 2a 20 54 68 65 20 66 69 72 73 74 20 32 ? /* The first 2
83f0: 20 64 6f 75 62 6c 65 20 61 72 67 73 20 61 72 65 double args are
8400: 20 73 74 6f 72 65 64 20 73 65 70 61 72 61 74 65 stored separate
8410: 6c 79 2e 20 2a 2f 09 09 5c 0a 20 20 20 20 20 20 ly. */..\.
8420: 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 *(double*)((LIST
8430: 29 2d 3e 61 70 74 72 20 2b 20 28 4c 49 53 54 29 )->aptr + (LIST)
8440: 2d 3e 64 61 72 67 5f 6f 66 66 73 65 74 29 09 09 ->darg_offset)..
8450: 09 5c 0a 20 20 20 20 3a 20 2a 28 64 6f 75 62 6c .\. : *(doubl
8460: 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 e*)((LIST)->aptr
8470: 29 09 09 09 09 09 09 5c 0a 20 20 29 29 0a 23 65 )......\. )).#e
8480: 6e 64 69 66 0a 23 65 6e 64 69 66 0a 23 69 66 20 ndif.#endif.#if
8490: 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f defined(__mips__
84a0: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 5f 5f ) && !defined(__
84b0: 6d 69 70 73 6e 33 32 5f 5f 29 0a 2f 2a 20 54 68 mipsn32__)./* Th
84c0: 65 20 66 69 72 73 74 20 30 2c 31 2c 32 20 72 65 e first 0,1,2 re
84d0: 67 69 73 74 65 72 73 20 61 72 65 20 73 74 6f 72 gisters are stor
84e0: 65 64 20 65 6c 73 65 77 68 65 72 65 20 69 66 20 ed elsewhere if
84f0: 74 68 65 79 20 61 72 65 20 66 6c 6f 61 74 69 6e they are floatin
8500: 67 2d 70 6f 69 6e 74 0a 20 2a 20 70 61 72 61 6d g-point. * param
8510: 65 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 eters.. */.#defi
8520: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 ne __va_arg_floa
8530: 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c t(LIST) \. ((L
8540: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
8550: 7a 65 6f 66 28 66 6c 6f 61 74 29 2c 09 09 09 09 zeof(float),....
8560: 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d 3e 61 6e .\. (LIST)->an
8570: 75 6d 2b 2b 2c 09 09 09 09 09 09 09 5c 0a 20 20 um++,.......\.
8580: 20 28 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 20 3d ((LIST)->anum =
8590: 3d 20 31 09 09 09 09 09 09 09 5c 0a 20 20 20 20 = 1.......\.
85a0: 3f 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 ? ((LIST)->flags
85b0: 20 7c 3d 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 31 |= __VA_FLOAT_1
85c0: 2c 20 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 30 , (LIST)->farg[0
85d0: 5d 29 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 4c ])...\. : ((L
85e0: 49 53 54 29 2d 3e 61 6e 75 6d 20 3d 3d 20 32 20 IST)->anum == 2
85f0: 26 26 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 && ((LIST)->flag
8600: 73 20 26 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 31 s & __VA_FLOAT_1
8610: 29 09 09 5c 0a 20 20 20 20 20 20 20 3f 20 28 2f )..\. ? (/
8620: 2a 20 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 * (LIST)->flags
8630: 7c 3d 20 5f 5f 56 41 5f 46 4c 4f 41 54 5f 32 2c |= __VA_FLOAT_2,
8640: 20 2a 2f 20 28 4c 49 53 54 29 2d 3e 66 61 72 67 */ (LIST)->farg
8650: 5b 31 5d 29 09 09 5c 0a 20 20 20 20 20 20 20 3a [1])..\. :
8660: 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 *(float*)((LIST
8670: 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 )->aptr - sizeof
8680: 28 66 6c 6f 61 74 29 29 09 09 09 5c 0a 20 20 29 (float))...\. )
8690: 29 20 20 29 0a 23 64 65 66 69 6e 65 20 76 61 5f ) ).#define va_
86a0: 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 arg_double(LIST)
86b0: 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 \. (__va_alig
86c0: 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 n_double(LIST)..
86d0: 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 29 2d ....\. (LIST)-
86e0: 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 >aptr += sizeof(
86f0: 64 6f 75 62 6c 65 29 2c 09 09 09 09 09 5c 0a 20 double),.....\.
8700: 20 20 28 4c 49 53 54 29 2d 3e 61 6e 75 6d 2b 2b (LIST)->anum++
8710: 2c 09 09 09 09 09 09 09 5c 0a 20 20 20 28 28 4c ,.......\. ((L
8720: 49 53 54 29 2d 3e 61 6e 75 6d 20 3d 3d 20 31 09 IST)->anum == 1.
8730: 09 09 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 28 ......\. ? ((
8740: 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 LIST)->flags |=
8750: 5f 5f 56 41 5f 46 4c 4f 41 54 5f 31 2c 20 28 4c __VA_FLOAT_1, (L
8760: 49 53 54 29 2d 3e 64 61 72 67 5b 30 5d 29 09 09 IST)->darg[0])..
8770: 09 5c 0a 20 20 20 20 3a 20 28 28 4c 49 53 54 29 .\. : ((LIST)
8780: 2d 3e 61 6e 75 6d 20 3d 3d 20 32 20 26 26 20 28 ->anum == 2 && (
8790: 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 20 (LIST)->flags &
87a0: 5f 5f 56 41 5f 46 4c 4f 41 54 5f 31 29 09 09 5c __VA_FLOAT_1)..\
87b0: 0a 20 20 20 20 20 20 20 3f 20 28 2f 2a 20 28 4c . ? (/* (L
87c0: 49 53 54 29 2d 3e 66 6c 61 67 73 20 7c 3d 20 5f IST)->flags |= _
87d0: 5f 56 41 5f 46 4c 4f 41 54 5f 32 2c 20 2a 2f 20 _VA_FLOAT_2, */
87e0: 28 4c 49 53 54 29 2d 3e 64 61 72 67 5b 31 5d 29 (LIST)->darg[1])
87f0: 09 09 5c 0a 20 20 20 20 20 20 20 3a 20 2a 28 64 ..\. : *(d
8800: 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e ouble*)((LIST)->
8810: 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f aptr - sizeof(do
8820: 75 62 6c 65 29 29 09 09 09 5c 0a 20 20 29 29 20 uble))...\. ))
8830: 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 ).#endif.#if de
8840: 66 69 6e 65 64 28 5f 5f 6d 69 70 73 6e 33 32 5f fined(__mipsn32_
8850: 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f _) || defined(__
8860: 6d 69 70 73 36 34 5f 5f 29 0a 2f 2a 20 54 68 65 mips64__)./* The
8870: 20 66 69 72 73 74 20 30 2c 2e 2e 2c 38 20 72 65 first 0,..,8 re
8880: 67 69 73 74 65 72 73 20 61 72 65 20 73 74 6f 72 gisters are stor
8890: 65 64 20 65 6c 73 65 77 68 65 72 65 20 69 66 20 ed elsewhere if
88a0: 74 68 65 79 20 61 72 65 20 66 6c 6f 61 74 69 6e they are floatin
88b0: 67 2d 70 6f 69 6e 74 0a 20 2a 20 70 61 72 61 6d g-point. * param
88c0: 65 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 eters.. */.#defi
88d0: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 ne __va_arg_floa
88e0: 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f t(LIST) \. (__
88f0: 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 va_align_double(
8900: 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 LIST)......\.
8910: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 (LIST)->aptr +=
8920: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 sizeof(double),.
8930: 09 09 09 09 5c 0a 20 20 20 28 2b 2b 28 4c 49 53 ....\. (++(LIS
8940: 54 29 2d 3e 61 6e 75 6d 20 3c 3d 20 38 09 09 09 T)->anum <= 8...
8950: 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 53 ....\. ? (LIS
8960: 54 29 2d 3e 66 61 72 67 5b 28 4c 49 53 54 29 2d T)->farg[(LIST)-
8970: 3e 61 6e 75 6d 20 2d 20 31 5d 09 09 09 09 09 5c >anum - 1].....\
8980: 0a 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a 29 . : *(float*)
8990: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 ((LIST)->aptr -
89a0: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 sizeof(double)).
89b0: 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e ...\. )).#defin
89c0: 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 e va_arg_double(
89d0: 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 LIST) \. (__va
89e0: 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 _align_double(LI
89f0: 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 28 4c ST)......\. (L
8a00: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
8a10: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 zeof(double),...
8a20: 09 09 5c 0a 20 20 20 28 2b 2b 28 4c 49 53 54 29 ..\. (++(LIST)
8a30: 2d 3e 61 6e 75 6d 20 3c 3d 20 38 09 09 09 09 09 ->anum <= 8.....
8a40: 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 53 54 29 ..\. ? (LIST)
8a50: 2d 3e 64 61 72 67 5b 28 4c 49 53 54 29 2d 3e 61 ->darg[(LIST)->a
8a60: 6e 75 6d 20 2d 20 31 5d 09 09 09 09 09 5c 0a 20 num - 1].....\.
8a70: 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 28 : *(double*)(
8a80: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 (LIST)->aptr - s
8a90: 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 izeof(double))..
8aa0: 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a ..\. )).#endif.
8ab0: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 70 #if defined(__sp
8ac0: 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 54 68 65 20 arc64__)./* The
8ad0: 66 69 72 73 74 20 30 2c 2e 2e 2c 31 36 20 72 65 first 0,..,16 re
8ae0: 67 69 73 74 65 72 73 20 61 72 65 20 73 74 6f 72 gisters are stor
8af0: 65 64 20 65 6c 73 65 77 68 65 72 65 20 69 66 20 ed elsewhere if
8b00: 74 68 65 79 20 61 72 65 20 66 6c 6f 61 74 69 6e they are floatin
8b10: 67 2d 70 6f 69 6e 74 0a 20 2a 20 70 61 72 61 6d g-point. * param
8b20: 65 74 65 72 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 eters.. */.#defi
8b30: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 ne __va_arg_floa
8b40: 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f t(LIST) \. (__
8b50: 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 va_align_double(
8b60: 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 LIST)......\.
8b70: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 (LIST)->aptr +=
8b80: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 sizeof(double),.
8b90: 09 09 09 09 5c 0a 20 20 20 28 2b 2b 28 4c 49 53 ....\. (++(LIS
8ba0: 54 29 2d 3e 61 6e 75 6d 20 3c 3d 20 31 36 09 09 T)->anum <= 16..
8bb0: 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 53 ....\. ? (LIS
8bc0: 54 29 2d 3e 66 61 72 67 5b 28 4c 49 53 54 29 2d T)->farg[(LIST)-
8bd0: 3e 61 6e 75 6d 20 2d 20 31 5d 09 09 09 09 09 5c >anum - 1].....\
8be0: 0a 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a 29 . : *(float*)
8bf0: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 ((LIST)->aptr -
8c00: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 sizeof(double)).
8c10: 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e ...\. )).#defin
8c20: 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 e va_arg_double(
8c30: 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 LIST) \. (__va
8c40: 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 _align_double(LI
8c50: 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 28 4c ST)......\. (L
8c60: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
8c70: 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 zeof(double),...
8c80: 09 09 5c 0a 20 20 20 28 2b 2b 28 4c 49 53 54 29 ..\. (++(LIST)
8c90: 2d 3e 61 6e 75 6d 20 3c 3d 20 31 36 09 09 09 09 ->anum <= 16....
8ca0: 09 09 5c 0a 20 20 20 20 3f 20 28 4c 49 53 54 29 ..\. ? (LIST)
8cb0: 2d 3e 64 61 72 67 5b 28 4c 49 53 54 29 2d 3e 61 ->darg[(LIST)->a
8cc0: 6e 75 6d 20 2d 20 31 5d 09 09 09 09 09 5c 0a 20 num - 1].....\.
8cd0: 20 20 20 3a 20 2a 28 64 6f 75 62 6c 65 2a 29 28 : *(double*)(
8ce0: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 (LIST)->aptr - s
8cf0: 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 29 09 09 izeof(double))..
8d00: 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 69 66 0a ..\. )).#endif.
8d10: 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 72 73 #if defined(__rs
8d20: 36 30 30 30 5f 5f 29 20 26 26 20 28 64 65 66 69 6000__) && (defi
8d30: 6e 65 64 28 5f 41 49 58 29 20 7c 7c 20 28 64 65 ned(_AIX) || (de
8d40: 66 69 6e 65 64 28 5f 5f 4d 41 43 48 5f 5f 29 20 fined(__MACH__)
8d50: 26 26 20 64 65 66 69 6e 65 64 28 5f 5f 41 50 50 && defined(__APP
8d60: 4c 45 5f 5f 29 29 29 0a 2f 2a 20 54 68 65 20 66 LE__)))./* The f
8d70: 69 72 73 74 20 31 33 20 66 6c 6f 61 74 69 6e 67 irst 13 floating
8d80: 2d 70 6f 69 6e 74 20 61 72 67 73 20 68 61 76 65 -point args have
8d90: 20 62 65 65 6e 20 73 74 6f 72 65 64 20 65 6c 73 been stored els
8da0: 65 77 68 65 72 65 2e 20 2a 2f 0a 23 64 65 66 69 ewhere. */.#defi
8db0: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 ne __va_arg_floa
8dc0: 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 4c t(LIST) \. ((L
8dd0: 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 IST)->aptr += si
8de0: 7a 65 6f 66 28 66 6c 6f 61 74 29 2c 09 09 09 09 zeof(float),....
8df0: 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 6d .\. ((LIST)->m
8e00: 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 emfargptr < &(LI
8e10: 53 54 29 2d 3e 66 61 72 67 5b 31 33 5d 09 09 09 ST)->farg[13]...
8e20: 09 5c 0a 20 20 20 20 3f 20 28 66 6c 6f 61 74 29 .\. ? (float)
8e30: 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 *((LIST)->memfa
8e40: 72 67 70 74 72 2b 2b 29 09 09 09 09 09 5c 0a 20 rgptr++).....\.
8e50: 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a 29 28 28 : *(float*)((
8e60: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 LIST)->aptr - si
8e70: 7a 65 6f 66 28 66 6c 6f 61 74 29 29 09 09 09 09 zeof(float))....
8e80: 5c 0a 20 20 29 29 0a 23 64 65 66 69 6e 65 20 76 \. )).#define v
8e90: 61 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 a_arg_double(LIS
8ea0: 54 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c T) \. (__va_al
8eb0: 69 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 ign_double(LIST)
8ec0: 09 09 09 09 09 09 5c 0a 20 20 20 28 4c 49 53 54 ......\. (LIST
8ed0: 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f )->aptr += sizeo
8ee0: 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 09 09 5c f(double),.....\
8ef0: 0a 20 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d . ((LIST)->mem
8f00: 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 fargptr < &(LIST
8f10: 29 2d 3e 66 61 72 67 5b 31 33 5d 09 09 09 09 5c )->farg[13]....\
8f20: 0a 20 20 20 20 3f 20 2a 28 28 4c 49 53 54 29 2d . ? *((LIST)-
8f30: 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 >memfargptr++)..
8f40: 09 09 09 09 5c 0a 20 20 20 20 3a 20 2a 28 64 6f ....\. : *(do
8f50: 75 62 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 uble*)((LIST)->a
8f60: 70 74 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 ptr - sizeof(dou
8f70: 62 6c 65 29 29 09 09 09 09 5c 0a 20 20 29 29 0a ble))....\. )).
8f80: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
8f90: 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 20 26 ed(__rs6000__) &
8fa0: 26 20 21 28 64 65 66 69 6e 65 64 28 5f 41 49 58 & !(defined(_AIX
8fb0: 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f ) || (defined(__
8fc0: 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 69 6e MACH__) && defin
8fd0: 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 0a ed(__APPLE__))).
8fe0: 2f 2a 20 54 68 65 20 66 69 72 73 74 20 38 20 66 /* The first 8 f
8ff0: 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 20 61 72 loating-point ar
9000: 67 73 20 68 61 76 65 20 62 65 65 6e 20 73 74 6f gs have been sto
9010: 72 65 64 20 65 6c 73 65 77 68 65 72 65 2e 20 2a red elsewhere. *
9020: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
9030: 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 29 20 20 rg_float(LIST)
9040: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d \. ((LIST)->mem
9050: 66 61 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 fargptr < &(LIST
9060: 29 2d 3e 66 61 72 67 5b 38 5d 09 09 09 09 5c 0a )->farg[8]....\.
9070: 20 20 20 3f 20 28 66 6c 6f 61 74 29 20 2a 28 28 ? (float) *((
9080: 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 LIST)->memfargpt
9090: 72 2b 2b 29 09 09 09 09 09 5c 0a 20 20 20 3a 20 r++).....\. :
90a0: 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 ((LIST)->aptr =
90b0: 28 28 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b ((LIST)->onstack
90c0: 20 3d 3d 20 30 20 20 20 20 20 20 20 20 20 20 20 == 0
90d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
90e0: 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 \.
90f0: 20 20 20 20 20 20 20 20 20 20 20 20 3f 20 28 28 ? ((
9100: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 LIST)->onstack=1
9110: 2c 20 28 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 , (LIST)->saptr)
9120: 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 \.
9130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9140: 20 20 20 20 20 20 3a 20 28 4c 49 53 54 29 2d 3e : (LIST)->
9150: 61 70 74 72 20 20 20 20 20 20 20 20 20 20 20 20 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 5c 0a 20 20 20 20 20 20 20 \.
9180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 )
9190: 2c 20 20 20 20 20 20 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 5c 0a 20 20 20 20 20 20 28 4c 49 53 54 29 2d \. (LIST)-
91d0: 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 >aptr += sizeof(
91e0: 66 6c 6f 61 74 29 2c 09 09 09 09 09 5c 0a 20 20 float),.....\.
91f0: 20 20 20 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c *(float*)((L
9200: 49 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a IST)->aptr - siz
9210: 65 6f 66 28 66 6c 6f 61 74 29 29 09 09 09 09 5c eof(float))....\
9220: 0a 20 20 29 29 0a 23 64 65 66 69 6e 65 20 76 61 . )).#define va
9230: 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 _arg_double(LIST
9240: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
9250: 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c memfargptr < &(L
9260: 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d 09 09 09 IST)->farg[8]...
9270: 09 5c 0a 20 20 20 20 3f 20 2a 28 28 4c 49 53 54 .\. ? *((LIST
9280: 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 29 )->memfargptr++)
9290: 09 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 ......\. : ((
92a0: 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 LIST)->aptr = ((
92b0: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d LIST)->onstack =
92c0: 3d 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 = 0
92d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
92e0: 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
92f0: 20 20 20 20 20 20 20 20 20 3f 20 28 28 4c 49 53 ? ((LIS
9300: 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 T)->onstack=1, (
9310: 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 20 20 LIST)->saptr)
9320: 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 \.
9330: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9340: 20 20 20 3a 20 28 4c 49 53 54 29 2d 3e 61 70 74 : (LIST)->apt
9350: 72 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r
9360: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9370: 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 \.
9380: 20 20 20 20 20 20 20 20 20 20 20 20 29 2c 20 20 ),
9390: 20 20 20 20 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 5c 0a \.
93c0: 20 20 20 20 20 20 20 5f 5f 76 61 5f 61 6c 69 67 __va_alig
93d0: 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 n_double(LIST)..
93e0: 09 09 09 09 5c 0a 20 20 20 20 20 20 20 28 4c 49 ....\. (LI
93f0: 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a ST)->aptr += siz
9400: 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 09 eof(double),....
9410: 09 5c 0a 20 20 20 20 20 20 20 2a 28 64 6f 75 62 .\. *(doub
9420: 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 le*)((LIST)->apt
9430: 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c r - sizeof(doubl
9440: 65 29 29 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e e))...\. )).#en
9450: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
9460: 5f 5f 73 33 39 30 5f 5f 29 0a 2f 2a 20 54 68 65 __s390__)./* The
9470: 20 66 69 72 73 74 20 32 20 66 6c 6f 61 74 69 6e first 2 floatin
9480: 67 2d 70 6f 69 6e 74 20 61 72 67 73 20 68 61 76 g-point args hav
9490: 65 20 62 65 65 6e 20 73 74 6f 72 65 64 20 65 6c e been stored el
94a0: 73 65 77 68 65 72 65 2e 20 2a 2f 0a 23 64 65 66 sewhere. */.#def
94b0: 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f ine __va_arg_flo
94c0: 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 at(LIST) \. ((
94d0: 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 LIST)->memfargpt
94e0: 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 61 72 r < &(LIST)->far
94f0: 67 5b 32 5d 09 09 09 09 5c 0a 20 20 20 3f 20 28 g[2]....\. ? (
9500: 4c 49 53 54 29 2d 3e 6d 65 6d 64 61 72 67 70 74 LIST)->memdargpt
9510: 72 2b 2b 2c 20 28 66 6c 6f 61 74 29 20 2a 28 28 r++, (float) *((
9520: 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 LIST)->memfargpt
9530: 72 2b 2b 29 09 09 5c 0a 20 20 20 3a 20 28 28 4c r++)..\. : ((L
9540: 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 4c IST)->aptr = ((L
9550: 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d 3d IST)->onstack ==
9560: 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0
9570: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9580: 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
9590: 20 20 20 20 20 20 20 20 20 3f 20 28 28 4c 49 53 ? ((LIS
95a0: 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 T)->onstack=1, (
95b0: 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 20 20 LIST)->saptr)
95c0: 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 \.
95d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
95e0: 20 20 20 3a 20 28 4c 49 53 54 29 2d 3e 61 70 74 : (LIST)->apt
95f0: 72 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r
9600: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9610: 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 \.
9620: 20 20 20 20 20 20 20 20 20 20 20 20 29 2c 20 20 ),
9630: 20 20 20 20 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 5c 0a \.
9660: 20 20 20 20 20 20 28 4c 49 53 54 29 2d 3e 61 70 (LIST)->ap
9670: 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 66 6c 6f tr += sizeof(flo
9680: 61 74 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 20 at),.....\.
9690: 20 2a 28 66 6c 6f 61 74 2a 29 28 28 4c 49 53 54 *(float*)((LIST
96a0: 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 )->aptr - sizeof
96b0: 28 66 6c 6f 61 74 29 29 09 09 09 09 5c 0a 20 20 (float))....\.
96c0: 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 61 72 )).#define va_ar
96d0: 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 20 g_double(LIST)
96e0: 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e 6d 65 6d \. ((LIST)->mem
96f0: 64 61 72 67 70 74 72 20 3c 20 26 28 4c 49 53 54 dargptr < &(LIST
9700: 29 2d 3e 64 61 72 67 5b 32 5d 09 09 09 09 5c 0a )->darg[2]....\.
9710: 20 20 20 20 3f 20 28 4c 49 53 54 29 2d 3e 6d 65 ? (LIST)->me
9720: 6d 66 61 72 67 70 74 72 2b 2b 2c 20 2a 28 28 4c mfargptr++, *((L
9730: 49 53 54 29 2d 3e 6d 65 6d 64 61 72 67 70 74 72 IST)->memdargptr
9740: 2b 2b 29 09 09 09 5c 0a 20 20 20 20 3a 20 28 28 ++)...\. : ((
9750: 4c 49 53 54 29 2d 3e 61 70 74 72 20 3d 20 28 28 LIST)->aptr = ((
9760: 4c 49 53 54 29 2d 3e 6f 6e 73 74 61 63 6b 20 3d LIST)->onstack =
9770: 3d 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 = 0
9780: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9790: 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
97a0: 20 20 20 20 20 20 20 20 20 3f 20 28 28 4c 49 53 ? ((LIS
97b0: 54 29 2d 3e 6f 6e 73 74 61 63 6b 3d 31 2c 20 28 T)->onstack=1, (
97c0: 4c 49 53 54 29 2d 3e 73 61 70 74 72 29 20 20 20 LIST)->saptr)
97d0: 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 \.
97e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
97f0: 20 20 20 3a 20 28 4c 49 53 54 29 2d 3e 61 70 74 : (LIST)->apt
9800: 72 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r
9810: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9820: 20 20 20 20 5c 0a 20 20 20 20 20 20 20 20 20 20 \.
9830: 20 20 20 20 20 20 20 20 20 20 20 20 29 2c 20 20 ),
9840: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9850: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9860: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a \.
9870: 20 20 20 20 20 20 20 5f 5f 76 61 5f 61 6c 69 67 __va_alig
9880: 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 09 09 n_double(LIST)..
9890: 09 09 09 09 5c 0a 20 20 20 20 20 20 20 28 4c 49 ....\. (LI
98a0: 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a ST)->aptr += siz
98b0: 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 09 09 09 eof(double),....
98c0: 09 5c 0a 20 20 20 20 20 20 20 2a 28 64 6f 75 62 .\. *(doub
98d0: 6c 65 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 le*)((LIST)->apt
98e0: 72 20 2d 20 73 69 7a 65 6f 66 28 64 6f 75 62 6c r - sizeof(doubl
98f0: 65 29 29 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e e))...\. )).#en
9900: 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 dif.#if defined(
9910: 5f 5f 69 61 36 34 5f 5f 29 0a 2f 2a 20 54 68 65 __ia64__)./* The
9920: 20 66 69 72 73 74 20 38 20 66 6c 6f 61 74 69 6e first 8 floatin
9930: 67 2d 70 6f 69 6e 74 20 61 72 67 73 20 68 61 76 g-point args hav
9940: 65 20 62 65 65 6e 20 73 74 6f 72 65 64 20 65 6c e been stored el
9950: 73 65 77 68 65 72 65 2e 20 2a 2f 0a 23 64 65 66 sewhere. */.#def
9960: 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 66 6c 6f ine __va_arg_flo
9970: 61 74 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 28 at(LIST) \. ((
9980: 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 LIST)->aptr += s
9990: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 2c izeof(__vaword),
99a0: 09 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 .....\. ((LIST
99b0: 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 )->memfargptr <
99c0: 26 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d &(LIST)->farg[8]
99d0: 09 09 09 09 5c 0a 20 20 20 20 3f 20 28 66 6c 6f ....\. ? (flo
99e0: 61 74 29 20 2a 28 28 4c 49 53 54 29 2d 3e 6d 65 at) *((LIST)->me
99f0: 6d 66 61 72 67 70 74 72 2b 2b 29 09 09 09 09 09 mfargptr++).....
9a00: 5c 0a 20 20 20 20 3a 20 2a 28 66 6c 6f 61 74 2a \. : *(float*
9a10: 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2d )((LIST)->aptr -
9a20: 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 sizeof(__vaword
9a30: 29 29 09 09 09 5c 0a 20 20 29 29 0a 23 64 65 66 ))...\. )).#def
9a40: 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f 75 62 6c ine va_arg_doubl
9a50: 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 28 5f 5f e(LIST) \. (__
9a60: 76 61 5f 61 6c 69 67 6e 5f 64 6f 75 62 6c 65 28 va_align_double(
9a70: 4c 49 53 54 29 09 09 09 09 09 09 5c 0a 20 20 20 LIST)......\.
9a80: 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 2b 3d 20 (LIST)->aptr +=
9a90: 73 69 7a 65 6f 66 28 64 6f 75 62 6c 65 29 2c 09 sizeof(double),.
9aa0: 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 ....\. ((LIST)
9ab0: 2d 3e 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 ->memfargptr < &
9ac0: 28 4c 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d 09 (LIST)->farg[8].
9ad0: 09 09 09 5c 0a 20 20 20 20 3f 20 2a 28 28 4c 49 ...\. ? *((LI
9ae0: 53 54 29 2d 3e 6d 65 6d 66 61 72 67 70 74 72 2b ST)->memfargptr+
9af0: 2b 29 09 09 09 09 09 09 5c 0a 20 20 20 20 3a 20 +)......\. :
9b00: 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 53 54 *(double*)((LIST
9b10: 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 6f 66 )->aptr - sizeof
9b20: 28 64 6f 75 62 6c 65 29 29 09 09 09 09 5c 0a 20 (double))....\.
9b30: 20 29 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 )).#endif.#if d
9b40: 65 66 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f efined(__x86_64_
9b50: 5f 29 0a 2f 2a 20 54 68 65 20 66 69 72 73 74 20 _)./* The first
9b60: 38 20 66 6c 6f 61 74 69 6e 67 2d 70 6f 69 6e 74 8 floating-point
9b70: 20 61 72 67 73 20 68 61 76 65 20 62 65 65 6e 20 args have been
9b80: 73 74 6f 72 65 64 20 65 6c 73 65 77 68 65 72 65 stored elsewhere
9b90: 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 . */.#define __v
9ba0: 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 53 54 a_arg_float(LIST
9bb0: 29 20 20 5c 0a 20 20 28 28 4c 49 53 54 29 2d 3e ) \. ((LIST)->
9bc0: 6d 65 6d 66 61 72 67 70 74 72 20 3c 20 26 28 4c memfargptr < &(L
9bd0: 49 53 54 29 2d 3e 66 61 72 67 5b 38 5d 09 09 09 IST)->farg[8]...
9be0: 09 5c 0a 20 20 20 3f 20 28 28 4c 49 53 54 29 2d .\. ? ((LIST)-
9bf0: 3e 6d 65 6d 66 61 72 67 70 74 72 2b 2b 2c 09 09 >memfargptr++,..
9c00: 09 09 09 09 5c 0a 20 20 20 20 20 20 2a 28 66 6c ....\. *(fl
9c10: 6f 61 74 2a 29 28 28 4c 49 53 54 29 2d 3e 6d 65 oat*)((LIST)->me
9c20: 6d 66 61 72 67 70 74 72 20 2d 20 31 29 09 09 09 mfargptr - 1)...
9c30: 09 09 5c 0a 20 20 20 20 20 29 09 09 09 09 09 09 ..\. )......
9c40: 09 09 09 5c 0a 20 20 20 3a 20 28 28 4c 49 53 54 ...\. : ((LIST
9c50: 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 6f )->aptr += sizeo
9c60: 66 28 5f 5f 76 61 77 6f 72 64 29 2c 09 09 09 09 f(__vaword),....
9c70: 09 5c 0a 20 20 20 20 20 20 2a 28 66 6c 6f 61 74 .\. *(float
9c80: 2a 29 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 20 *)((LIST)->aptr
9c90: 2d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 - sizeof(__vawor
9ca0: 64 29 29 09 09 09 5c 0a 20 20 29 20 20 29 0a 23 d))...\. ) ).#
9cb0: 64 65 66 69 6e 65 20 76 61 5f 61 72 67 5f 64 6f define va_arg_do
9cc0: 75 62 6c 65 28 4c 49 53 54 29 20 20 5c 0a 20 20 uble(LIST) \.
9cd0: 28 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 67 ((LIST)->memfarg
9ce0: 70 74 72 20 3c 20 26 28 4c 49 53 54 29 2d 3e 66 ptr < &(LIST)->f
9cf0: 61 72 67 5b 38 5d 09 09 09 09 5c 0a 20 20 20 3f arg[8]....\. ?
9d00: 20 2a 28 4c 49 53 54 29 2d 3e 6d 65 6d 66 61 72 *(LIST)->memfar
9d10: 67 70 74 72 2b 2b 09 09 09 09 09 09 5c 0a 20 20 gptr++......\.
9d20: 20 3a 20 28 28 4c 49 53 54 29 2d 3e 61 70 74 72 : ((LIST)->aptr
9d30: 20 2b 3d 20 73 69 7a 65 6f 66 28 5f 5f 76 61 77 += sizeof(__vaw
9d40: 6f 72 64 29 2c 09 09 09 09 09 5c 0a 20 20 20 20 ord),.....\.
9d50: 20 20 2a 28 64 6f 75 62 6c 65 2a 29 28 28 4c 49 *(double*)((LI
9d60: 53 54 29 2d 3e 61 70 74 72 20 2d 20 73 69 7a 65 ST)->aptr - size
9d70: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 09 09 09 of(__vaword))...
9d80: 5c 0a 20 20 29 20 20 29 0a 23 65 6e 64 69 66 0a \. ) ).#endif.
9d90: 23 69 66 6e 64 65 66 20 5f 5f 76 61 5f 61 72 67 #ifndef __va_arg
9da0: 5f 66 6c 6f 61 74 0a 23 64 65 66 69 6e 65 20 5f _float.#define _
9db0: 5f 76 61 5f 61 72 67 5f 66 6c 6f 61 74 28 4c 49 _va_arg_float(LI
9dc0: 53 54 29 09 5f 5f 76 61 5f 61 72 67 28 4c 49 53 ST).__va_arg(LIS
9dd0: 54 2c 66 6c 6f 61 74 29 0a 23 65 6e 64 69 66 0a T,float).#endif.
9de0: 23 69 66 6e 64 65 66 20 76 61 5f 61 72 67 5f 64 #ifndef va_arg_d
9df0: 6f 75 62 6c 65 0a 23 64 65 66 69 6e 65 20 76 61 ouble.#define va
9e00: 5f 61 72 67 5f 64 6f 75 62 6c 65 28 4c 49 53 54 _arg_double(LIST
9e10: 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 ) \. (__va_ali
9e20: 67 6e 5f 64 6f 75 62 6c 65 28 4c 49 53 54 29 20 gn_double(LIST)
9e30: 5f 5f 76 61 5f 61 72 67 28 4c 49 53 54 2c 64 6f __va_arg(LIST,do
9e40: 75 62 6c 65 29 29 0a 23 65 6e 64 69 66 0a 0a 2f uble)).#endif../
9e50: 2a 20 50 6f 69 6e 74 65 72 20 61 72 67 75 6d 65 * Pointer argume
9e60: 6e 74 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 nts. */.#define
9e70: 76 61 5f 61 72 67 5f 70 74 72 28 4c 49 53 54 2c va_arg_ptr(LIST,
9e80: 54 59 50 45 29 09 5f 5f 76 61 5f 61 72 67 28 4c TYPE).__va_arg(L
9e90: 49 53 54 2c 54 59 50 45 29 0a 0a 2f 2a 20 53 74 IST,TYPE)../* St
9ea0: 72 75 63 74 75 72 65 20 61 72 67 75 6d 65 6e 74 ructure argument
9eb0: 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 s. */.#define va
9ec0: 5f 61 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 _arg_struct(LIST
9ed0: 2c 54 59 50 45 29 20 20 5c 0a 20 20 2a 28 54 59 ,TYPE) \. *(TY
9ee0: 50 45 2a 29 5f 5f 76 61 5f 61 72 67 5f 73 74 72 PE*)__va_arg_str
9ef0: 75 63 74 28 4c 49 53 54 2c 73 69 7a 65 6f 66 28 uct(LIST,sizeof(
9f00: 54 59 50 45 29 2c 5f 5f 56 41 5f 61 6c 69 67 6e TYPE),__VA_align
9f10: 6f 66 28 54 59 50 45 29 29 0a 2f 2a 20 5f 76 61 of(TYPE))./* _va
9f20: 5f 61 72 67 5f 73 74 72 75 63 74 28 29 20 69 73 _arg_struct() is
9f30: 20 6c 69 6b 65 20 76 61 5f 61 72 67 5f 73 74 72 like va_arg_str
9f40: 75 63 74 28 29 2c 20 65 78 63 65 70 74 20 74 68 uct(), except th
9f50: 61 74 20 79 6f 75 20 70 61 73 73 20 74 68 65 20 at you pass the
9f60: 74 79 70 65 27 73 0a 20 2a 20 73 69 7a 65 20 61 type's. * size a
9f70: 6e 64 20 61 6c 69 67 6e 6d 65 6e 74 20 69 6e 73 nd alignment ins
9f80: 74 65 61 64 20 6f 66 20 74 68 65 20 74 79 70 65 tead of the type
9f90: 20 61 6e 64 20 67 65 74 20 74 68 65 20 76 61 6c and get the val
9fa0: 75 65 27 73 20 61 64 64 72 65 73 73 20 69 6e 73 ue's address ins
9fb0: 74 65 61 64 0a 20 2a 20 6f 66 20 74 68 65 20 76 tead. * of the v
9fc0: 61 6c 75 65 20 69 74 73 65 6c 66 2e 0a 20 2a 2f alue itself.. */
9fd0: 0a 23 64 65 66 69 6e 65 20 5f 76 61 5f 61 72 67 .#define _va_arg
9fe0: 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 _struct(LIST,TYP
9ff0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
a000: 4e 29 20 20 5c 0a 20 20 28 76 6f 69 64 2a 29 5f N) \. (void*)_
a010: 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c _va_arg_struct(L
a020: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
a030: 50 45 5f 41 4c 49 47 4e 29 0a 2f 2a 20 53 74 72 PE_ALIGN)./* Str
a040: 75 63 74 75 72 65 20 61 72 67 75 6d 65 6e 74 20 ucture argument
a050: 61 6c 69 67 6e 6d 65 6e 74 2e 20 2a 2f 0a 23 69 alignment. */.#i
a060: 66 20 64 65 66 69 6e 65 64 28 5f 5f 69 33 38 36 f defined(__i386
a070: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
a080: 4d 53 43 5f 56 45 52 29 0a 2f 2a 20 49 6e 20 4d MSC_VER)./* In M
a090: 53 56 43 2c 20 64 6f 75 62 6c 65 73 20 69 6e 73 SVC, doubles ins
a0a0: 69 64 65 20 73 74 72 75 63 74 75 72 65 73 20 68 ide structures h
a0b0: 61 76 65 20 61 6c 69 67 6e 6d 65 6e 74 20 38 2c ave alignment 8,
a0c0: 20 69 2e 65 2e 0a 20 2a 20 5f 5f 56 41 5f 61 6c i.e.. * __VA_al
a0d0: 69 67 6e 6f 66 28 64 6f 75 62 6c 65 29 20 3d 20 ignof(double) =
a0e0: 38 2c 20 62 75 74 20 64 6f 75 62 6c 65 73 20 28 8, but doubles (
a0f0: 61 6e 64 20 61 6c 73 6f 20 73 74 72 75 63 74 75 and also structu
a100: 72 65 73 20 63 6f 6e 74 61 69 6e 69 6e 67 0a 20 res containing.
a110: 2a 20 64 6f 75 62 6c 65 73 29 20 61 72 65 20 70 * doubles) are p
a120: 61 73 73 65 64 20 6f 6e 20 74 68 65 20 73 74 61 assed on the sta
a130: 63 6b 20 77 69 74 68 20 61 6c 69 67 6e 6d 65 6e ck with alignmen
a140: 74 20 34 2e 20 4c 6f 6f 6b 73 20 72 65 61 6c 6c t 4. Looks reall
a150: 79 20 77 65 69 72 64 2e 0a 20 2a 2f 0a 23 64 65 y weird.. */.#de
a160: 66 69 6e 65 20 5f 5f 76 61 5f 73 74 72 75 63 74 fine __va_struct
a170: 5f 61 6c 69 67 6e 6d 65 6e 74 28 54 59 50 45 5f _alignment(TYPE_
a180: 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 28 54 59 ALIGN) \. ((TY
a190: 50 45 5f 41 4c 49 47 4e 29 20 3c 3d 20 34 20 3f PE_ALIGN) <= 4 ?
a1a0: 20 28 54 59 50 45 5f 41 4c 49 47 4e 29 20 3a 20 (TYPE_ALIGN) :
a1b0: 34 29 0a 23 65 6c 73 65 0a 23 64 65 66 69 6e 65 4).#else.#define
a1c0: 20 5f 5f 76 61 5f 73 74 72 75 63 74 5f 61 6c 69 __va_struct_ali
a1d0: 67 6e 6d 65 6e 74 28 54 59 50 45 5f 41 4c 49 47 gnment(TYPE_ALIG
a1e0: 4e 29 20 20 5c 0a 20 20 28 54 59 50 45 5f 41 4c N) \. (TYPE_AL
a1f0: 49 47 4e 29 0a 23 65 6e 64 69 66 0a 23 64 65 66 IGN).#endif.#def
a200: 69 6e 65 20 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 ine __va_align_s
a210: 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f truct(LIST,TYPE_
a220: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
a230: 20 20 5c 0a 20 20 28 4c 49 53 54 29 2d 3e 61 70 \. (LIST)->ap
a240: 74 72 20 3d 20 28 28 4c 49 53 54 29 2d 3e 61 70 tr = ((LIST)->ap
a250: 74 72 20 2b 20 5f 5f 76 61 5f 73 74 72 75 63 74 tr + __va_struct
a260: 5f 61 6c 69 67 6e 6d 65 6e 74 28 54 59 50 45 5f _alignment(TYPE_
a270: 41 4c 49 47 4e 29 2d 31 29 20 26 20 2d 28 6c 6f ALIGN)-1) & -(lo
a280: 6e 67 29 5f 5f 76 61 5f 73 74 72 75 63 74 5f 61 ng)__va_struct_a
a290: 6c 69 67 6e 6d 65 6e 74 28 54 59 50 45 5f 41 4c lignment(TYPE_AL
a2a0: 49 47 4e 29 2c 0a 23 69 66 20 64 65 66 69 6e 65 IGN),.#if define
a2b0: 64 28 5f 5f 69 33 38 36 5f 5f 29 20 7c 7c 20 64 d(__i386__) || d
a2c0: 65 66 69 6e 65 64 28 5f 5f 6d 36 38 6b 5f 5f 29 efined(__m68k__)
a2d0: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c || defined(__al
a2e0: 70 68 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 pha__) || define
a2f0: 64 28 5f 5f 61 72 6d 5f 5f 29 20 7c 7c 20 64 65 d(__arm__) || de
a300: 66 69 6e 65 64 28 5f 5f 6d 38 38 6b 5f 5f 29 20 fined(__m88k__)
a310: 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 6f 6e || defined(__con
a320: 76 65 78 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 vex__) || define
a330: 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 0a 23 64 d(__x86_64__).#d
a340: 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 efine __va_arg_s
a350: 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f truct(LIST,TYPE_
a360: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
a370: 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 \. (__va_alig
a380: 6e 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 n_struct(LIST,TY
a390: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 PE_SIZE,TYPE_ALI
a3a0: 47 4e 29 09 09 09 09 5c 0a 20 20 20 5f 5f 76 61 GN)....\. __va
a3b0: 5f 61 72 67 5f 61 64 6a 75 73 74 65 64 28 4c 49 _arg_adjusted(LI
a3c0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
a3d0: 45 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 E_ALIGN)....\.
a3e0: 29 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 ).#endif.#if def
a3f0: 69 6e 65 64 28 5f 5f 6d 69 70 73 5f 5f 29 20 26 ined(__mips__) &
a400: 26 20 21 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 & !defined(__mip
a410: 73 6e 33 32 5f 5f 29 0a 2f 2a 20 73 6d 61 6c 6c sn32__)./* small
a420: 20 73 74 72 75 63 74 75 72 65 73 20 3c 20 31 20 structures < 1
a430: 77 6f 72 64 20 61 72 65 20 61 64 6a 75 73 74 65 word are adjuste
a440: 64 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 d depending on c
a450: 6f 6d 70 69 6c 65 72 20 2a 2f 0a 23 64 65 66 69 ompiler */.#defi
a460: 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 ne __va_arg_stru
a470: 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a ct(LIST,TYPE_SIZ
a480: 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c E,TYPE_ALIGN) \
a490: 0a 20 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 . (__va_align_s
a4a0: 74 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f truct(LIST,TYPE_
a4b0: 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 SIZE,TYPE_ALIGN)
a4c0: 09 09 09 09 5c 0a 20 20 20 28 28 4c 49 53 54 29 ....\. ((LIST)
a4d0: 2d 3e 66 6c 61 67 73 20 26 20 5f 5f 56 41 5f 53 ->flags & __VA_S
a4e0: 47 49 43 43 5f 53 54 52 55 43 54 5f 41 52 47 53 GICC_STRUCT_ARGS
a4f0: 09 09 09 09 5c 0a 20 20 20 20 3f 20 2f 2a 20 53 ....\. ? /* S
a500: 47 49 20 4d 49 50 53 20 63 63 20 70 61 73 73 65 GI MIPS cc passe
a510: 73 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 s small structur
a520: 65 73 20 6c 65 66 74 2d 61 64 6a 75 73 74 65 64 es left-adjusted
a530: 2c 20 61 6c 74 68 6f 75 67 68 20 62 69 67 2d 65 , although big-e
a540: 6e 64 69 61 6e 21 20 2a 2f 5c 0a 20 20 20 20 20 ndian! */\.
a550: 20 5f 5f 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 __va_arg_leftad
a560: 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 justed(LIST,TYPE
a570: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
a580: 29 09 09 09 5c 0a 20 20 20 20 3a 20 2f 2a 20 53 )...\. : /* S
a590: 47 49 20 4d 49 50 53 20 67 63 63 20 70 61 73 73 GI MIPS gcc pass
a5a0: 65 73 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 es small structu
a5b0: 72 65 73 20 77 69 74 68 69 6e 20 74 68 65 20 66 res within the f
a5c0: 69 72 73 74 20 66 6f 75 72 20 77 6f 72 64 73 20 irst four words
a5d0: 6c 65 66 74 2d 09 20 20 20 5c 0a 20 20 20 20 20 left-. \.
a5e0: 20 20 2a 20 61 64 6a 75 73 74 65 64 2c 20 66 6f * adjusted, fo
a5f0: 72 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 r compatibility
a600: 77 69 74 68 20 63 63 2e 20 42 75 74 20 73 74 72 with cc. But str
a610: 75 63 74 75 72 65 73 20 69 6e 20 6d 65 6d 6f 72 uctures in memor
a620: 79 20 61 72 65 20 70 61 73 73 65 64 20 20 5c 0a y are passed \.
a630: 20 20 20 20 20 20 20 2a 20 72 69 67 68 74 2d 61 * right-a
a640: 64 6a 75 73 74 65 64 21 21 20 53 65 65 20 67 63 djusted!! See gc
a650: 63 2d 32 2e 36 2e 33 2f 63 6f 6e 66 69 67 2f 6d c-2.6.3/config/m
a660: 69 70 73 2f 6d 69 70 73 2e 63 3a 66 75 6e 63 74 ips/mips.c:funct
a670: 69 6f 6e 5f 61 72 67 28 29 2e 09 20 20 20 5c 0a ion_arg().. \.
a680: 20 20 20 20 20 20 20 2a 2f 09 09 09 09 09 09 09 */.......
a690: 09 09 20 20 20 5c 0a 20 20 20 20 20 20 28 28 4c .. \. ((L
a6a0: 49 53 54 29 2d 3e 61 70 74 72 20 3c 20 28 4c 49 IST)->aptr < (LI
a6b0: 53 54 29 2d 3e 6d 65 6d 61 72 67 70 74 72 09 09 ST)->memargptr..
a6c0: 09 09 09 5c 0a 20 20 20 20 20 20 20 3f 20 5f 5f ...\. ? __
a6d0: 76 61 5f 61 72 67 5f 6c 65 66 74 61 64 6a 75 73 va_arg_leftadjus
a6e0: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
a6f0: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
a700: 5c 0a 20 20 20 20 20 20 20 3a 20 5f 5f 76 61 5f \. : __va_
a710: 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 74 65 arg_rightadjuste
a720: 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 d(LIST,TYPE_SIZE
a730: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 5c 0a ,TYPE_ALIGN)..\.
a740: 20 20 29 29 20 20 29 0a 23 65 6e 64 69 66 0a 23 )) ).#endif.#
a750: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
a760: 73 6e 33 32 5f 5f 29 20 7c 7c 20 64 65 66 69 6e sn32__) || defin
a770: 65 64 28 5f 5f 6d 69 70 73 36 34 5f 5f 29 0a 2f ed(__mips64__)./
a780: 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 72 * small structur
a790: 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 20 es < 1 word are
a7a0: 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 69 adjusted dependi
a7b0: 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 2a ng on compiler *
a7c0: 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 /.#define __va_a
a7d0: 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 rg_struct(LIST,T
a7e0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
a7f0: 49 47 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f IGN) \. (__va_
a800: 61 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 53 align_struct(LIS
a810: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
a820: 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 20 _ALIGN)....\.
a830: 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 26 ((LIST)->flags &
a840: 20 5f 5f 56 41 5f 53 47 49 43 43 5f 53 54 52 55 __VA_SGICC_STRU
a850: 43 54 5f 41 52 47 53 09 09 09 09 5c 0a 20 20 20 CT_ARGS....\.
a860: 20 3f 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 63 ? /* SGI MIPS c
a870: 63 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 73 c passes small s
a880: 74 72 75 63 74 75 72 65 73 20 6c 65 66 74 2d 61 tructures left-a
a890: 64 6a 75 73 74 65 64 2c 20 61 6c 74 68 6f 75 67 djusted, althoug
a8a0: 68 20 62 69 67 2d 65 6e 64 69 61 6e 21 20 2a 2f h big-endian! */
a8b0: 5c 0a 20 20 20 20 20 20 5f 5f 76 61 5f 61 72 67 \. __va_arg
a8c0: 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 4c 49 _leftadjusted(LI
a8d0: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
a8e0: 45 5f 41 4c 49 47 4e 29 09 09 09 5c 0a 20 20 20 E_ALIGN)...\.
a8f0: 20 3a 20 2f 2a 20 53 47 49 20 4d 49 50 53 20 67 : /* SGI MIPS g
a900: 63 63 20 70 61 73 73 65 73 20 73 6d 61 6c 6c 20 cc passes small
a910: 73 74 72 75 63 74 75 72 65 73 20 72 69 67 68 74 structures right
a920: 2d 61 64 6a 75 73 74 65 64 2e 20 2a 2f 09 5c 0a -adjusted. */.\.
a930: 20 20 20 20 20 20 5f 5f 76 61 5f 61 72 67 5f 72 __va_arg_r
a940: 69 67 68 74 61 64 6a 75 73 74 65 64 28 4c 49 53 ightadjusted(LIS
a950: 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 T,TYPE_SIZE,TYPE
a960: 5f 41 4c 49 47 4e 29 09 09 09 5c 0a 20 20 29 29 _ALIGN)...\. ))
a970: 0a 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 .#endif.#if defi
a980: 6e 65 64 28 5f 5f 72 73 36 30 30 30 5f 5f 29 20 ned(__rs6000__)
a990: 26 26 20 28 64 65 66 69 6e 65 64 28 5f 41 49 58 && (defined(_AIX
a9a0: 29 20 7c 7c 20 28 64 65 66 69 6e 65 64 28 5f 5f ) || (defined(__
a9b0: 4d 41 43 48 5f 5f 29 20 26 26 20 64 65 66 69 6e MACH__) && defin
a9c0: 65 64 28 5f 5f 41 50 50 4c 45 5f 5f 29 29 29 0a ed(__APPLE__))).
a9d0: 2f 2a 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 /* small structu
a9e0: 72 65 73 20 3c 20 31 20 77 6f 72 64 20 61 72 65 res < 1 word are
a9f0: 20 61 64 6a 75 73 74 65 64 20 64 65 70 65 6e 64 adjusted depend
aa00: 69 6e 67 20 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 ing on compiler
aa10: 2a 2f 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f */.#define __va_
aa20: 61 72 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c arg_struct(LIST,
aa30: 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 TYPE_SIZE,TYPE_A
aa40: 4c 49 47 4e 29 20 20 5c 0a 20 20 28 5f 5f 76 61 LIGN) \. (__va
aa50: 5f 61 6c 69 67 6e 5f 73 74 72 75 63 74 28 4c 49 _align_struct(LI
aa60: 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 50 ST,TYPE_SIZE,TYP
aa70: 45 5f 41 4c 49 47 4e 29 09 09 09 09 5c 0a 20 20 E_ALIGN)....\.
aa80: 20 28 28 4c 49 53 54 29 2d 3e 66 6c 61 67 73 20 ((LIST)->flags
aa90: 26 20 5f 5f 56 41 5f 41 49 58 43 43 5f 53 54 52 & __VA_AIXCC_STR
aaa0: 55 43 54 5f 41 52 47 53 09 09 09 09 5c 0a 20 20 UCT_ARGS....\.
aab0: 20 20 3f 20 2f 2a 20 41 49 58 20 63 63 20 61 6e ? /* AIX cc an
aac0: 64 20 78 6c 63 20 70 61 73 73 20 73 6d 61 6c 6c d xlc pass small
aad0: 20 73 74 72 75 63 74 75 72 65 73 20 6c 65 66 74 structures left
aae0: 2d 61 64 6a 75 73 74 65 64 2c 20 61 6c 74 68 6f -adjusted, altho
aaf0: 75 67 68 20 62 69 67 2d 65 6e 64 69 61 6e 21 20 ugh big-endian!
ab00: 2a 2f 5c 0a 20 20 20 20 20 20 5f 5f 76 61 5f 61 */\. __va_a
ab10: 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 rg_leftadjusted(
ab20: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
ab30: 59 50 45 5f 41 4c 49 47 4e 29 09 09 09 5c 0a 20 YPE_ALIGN)...\.
ab40: 20 20 20 3a 20 2f 2a 20 67 63 63 20 70 61 73 73 : /* gcc pass
ab50: 65 73 20 73 6d 61 6c 6c 20 73 74 72 75 63 74 75 es small structu
ab60: 72 65 73 20 72 69 67 68 74 2d 61 64 6a 75 73 74 res right-adjust
ab70: 65 64 2e 20 2a 2f 09 09 09 5c 0a 20 20 20 20 20 ed. */...\.
ab80: 20 5f 5f 76 61 5f 61 72 67 5f 72 69 67 68 74 61 __va_arg_righta
ab90: 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 59 50 djusted(LIST,TYP
aba0: 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 E_SIZE,TYPE_ALIG
abb0: 4e 29 09 09 09 5c 0a 20 20 29 29 0a 23 65 6e 64 N)...\. )).#end
abc0: 69 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f if.#if defined(_
abd0: 5f 72 73 36 30 30 30 5f 5f 29 20 26 26 20 21 28 _rs6000__) && !(
abe0: 64 65 66 69 6e 65 64 28 5f 41 49 58 29 20 7c 7c defined(_AIX) ||
abf0: 20 28 64 65 66 69 6e 65 64 28 5f 5f 4d 41 43 48 (defined(__MACH
ac00: 5f 5f 29 20 26 26 20 64 65 66 69 6e 65 64 28 5f __) && defined(_
ac10: 5f 41 50 50 4c 45 5f 5f 29 29 29 0a 2f 2a 20 53 _APPLE__)))./* S
ac20: 74 72 75 63 74 75 72 65 73 20 61 72 65 20 70 61 tructures are pa
ac30: 73 73 65 64 20 61 73 20 70 6f 69 6e 74 65 72 73 ssed as pointers
ac40: 20 74 6f 20 63 61 6c 6c 65 72 2d 6d 61 64 65 20 to caller-made
ac50: 6c 6f 63 61 6c 20 63 6f 70 69 65 73 2e 20 2a 2f local copies. */
ac60: 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 61 72 .#define __va_ar
ac70: 67 5f 73 74 72 75 63 74 28 4c 49 53 54 2c 54 59 g_struct(LIST,TY
ac80: 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 PE_SIZE,TYPE_ALI
ac90: 47 4e 29 20 20 5c 0a 20 20 76 61 5f 61 72 67 5f GN) \. va_arg_
aca0: 70 74 72 28 4c 49 53 54 2c 76 6f 69 64 2a 29 0a ptr(LIST,void*).
acb0: 23 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e #endif.#if defin
acc0: 65 64 28 5f 5f 73 70 61 72 63 5f 5f 29 20 26 26 ed(__sparc__) &&
acd0: 20 21 64 65 66 69 6e 65 64 28 5f 5f 73 70 61 72 !defined(__spar
ace0: 63 36 34 5f 5f 29 0a 2f 2a 20 53 74 72 75 63 74 c64__)./* Struct
acf0: 75 72 65 73 20 61 72 65 20 70 61 73 73 65 64 20 ures are passed
ad00: 61 73 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 as pointers to c
ad10: 61 6c 6c 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c aller-made local
ad20: 20 63 6f 70 69 65 73 2e 20 2a 2f 0a 23 64 65 66 copies. */.#def
ad30: 69 6e 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 ine __va_arg_str
ad40: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 uct(LIST,TYPE_SI
ad50: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 ZE,TYPE_ALIGN)
ad60: 5c 0a 20 20 76 61 5f 61 72 67 5f 70 74 72 28 4c \. va_arg_ptr(L
ad70: 49 53 54 2c 76 6f 69 64 2a 29 0a 23 65 6e 64 69 IST,void*).#endi
ad80: 66 0a 23 69 66 20 64 65 66 69 6e 65 64 28 5f 5f f.#if defined(__
ad90: 73 70 61 72 63 36 34 5f 5f 29 0a 2f 2a 20 53 6d sparc64__)./* Sm
ada0: 61 6c 6c 20 73 74 72 75 63 74 75 72 65 73 20 61 all structures a
adb0: 72 65 20 70 61 73 73 65 64 20 6c 65 66 74 2d 61 re passed left-a
adc0: 64 6a 75 73 74 65 64 2c 20 61 6c 74 68 6f 75 67 djusted, althoug
add0: 68 20 62 69 67 2d 65 6e 64 69 61 6e 21 20 2a 2f h big-endian! */
ade0: 0a 2f 2a 20 42 69 67 20 73 74 72 75 63 74 75 72 ./* Big structur
adf0: 65 73 20 61 72 65 20 70 61 73 73 65 64 20 61 73 es are passed as
ae00: 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 63 61 6c pointers to cal
ae10: 6c 65 72 2d 6d 61 64 65 20 6c 6f 63 61 6c 20 63 ler-made local c
ae20: 6f 70 69 65 73 2e 20 2a 2f 0a 23 64 65 66 69 6e opies. */.#defin
ae30: 65 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 e __va_arg_struc
ae40: 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 t(LIST,TYPE_SIZE
ae50: 2c 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a ,TYPE_ALIGN) \.
ae60: 20 20 28 28 54 59 50 45 5f 53 49 5a 45 29 20 3c ((TYPE_SIZE) <
ae70: 3d 20 31 36 09 09 09 09 09 09 09 5c 0a 20 20 20 = 16.......\.
ae80: 3f 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 ? (__va_align_st
ae90: 72 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 ruct(LIST,TYPE_S
aea0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 IZE,TYPE_ALIGN).
aeb0: 09 09 5c 0a 20 20 20 20 20 20 5f 5f 76 61 5f 61 ..\. __va_a
aec0: 72 67 5f 6c 65 66 74 61 64 6a 75 73 74 65 64 28 rg_leftadjusted(
aed0: 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 LIST,TYPE_SIZE,T
aee0: 59 50 45 5f 41 4c 49 47 4e 29 29 09 09 09 5c 0a YPE_ALIGN))...\.
aef0: 20 20 20 3a 20 76 61 5f 61 72 67 5f 70 74 72 28 : va_arg_ptr(
af00: 4c 49 53 54 2c 76 6f 69 64 2a 29 09 09 09 09 09 LIST,void*).....
af10: 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 .\. ).#endif.#i
af20: 66 20 64 65 66 69 6e 65 64 28 5f 5f 73 33 39 30 f defined(__s390
af30: 5f 5f 29 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 __)./* Structure
af40: 73 20 3c 3d 20 38 20 62 79 74 65 73 20 61 72 65 s <= 8 bytes are
af50: 20 70 61 73 73 65 64 20 61 73 20 65 6d 62 65 64 passed as embed
af60: 64 65 64 20 63 6f 70 69 65 73 20 6f 6e 20 74 68 ded copies on th
af70: 65 20 61 72 67 20 73 74 61 63 6b 2e 0a 20 2a 20 e arg stack.. *
af80: 42 69 67 20 73 74 72 75 63 74 75 72 65 73 20 61 Big structures a
af90: 72 65 20 70 61 73 73 65 64 20 61 73 20 70 6f 69 re passed as poi
afa0: 6e 74 65 72 73 20 74 6f 20 63 61 6c 6c 65 72 2d nters to caller-
afb0: 6d 61 64 65 20 6c 6f 63 61 6c 20 63 6f 70 69 65 made local copie
afc0: 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f s.. */.#define _
afd0: 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c _va_arg_struct(L
afe0: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
aff0: 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 PE_ALIGN) \. (
b000: 28 54 59 50 45 5f 53 49 5a 45 29 20 21 3d 20 31 (TYPE_SIZE) != 1
b010: 20 26 26 20 28 54 59 50 45 5f 53 49 5a 45 29 20 && (TYPE_SIZE)
b020: 21 3d 20 32 20 26 26 20 28 54 59 50 45 5f 53 49 != 2 && (TYPE_SI
b030: 5a 45 29 20 21 3d 20 34 20 26 26 20 28 54 59 50 ZE) != 4 && (TYP
b040: 45 5f 53 49 5a 45 29 20 21 3d 20 38 20 5c 0a 20 E_SIZE) != 8 \.
b050: 20 20 3f 20 76 61 5f 61 72 67 5f 70 74 72 28 4c ? va_arg_ptr(L
b060: 49 53 54 2c 76 6f 69 64 2a 29 09 09 09 09 09 09 IST,void*)......
b070: 5c 0a 20 20 20 3a 20 28 76 6f 69 64 2a 29 5f 5f \. : (void*)__
b080: 76 61 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 va_arg_rightadju
b090: 73 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 sted(LIST,TYPE_S
b0a0: 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 IZE,TYPE_ALIGN).
b0b0: 09 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 .\. ).#endif.#i
b0c0: 66 20 64 65 66 69 6e 65 64 28 5f 5f 68 70 70 61 f defined(__hppa
b0d0: 5f 5f 29 0a 2f 2a 20 53 74 72 75 63 74 75 72 65 __)./* Structure
b0e0: 73 20 3c 3d 20 38 20 62 79 74 65 73 20 61 72 65 s <= 8 bytes are
b0f0: 20 70 61 73 73 65 64 20 61 73 20 65 6d 62 65 64 passed as embed
b100: 64 65 64 20 63 6f 70 69 65 73 20 6f 6e 20 74 68 ded copies on th
b110: 65 20 61 72 67 20 73 74 61 63 6b 2e 0a 20 2a 20 e arg stack.. *
b120: 42 69 67 20 73 74 72 75 63 74 75 72 65 73 20 61 Big structures a
b130: 72 65 20 70 61 73 73 65 64 20 61 73 20 70 6f 69 re passed as poi
b140: 6e 74 65 72 73 20 74 6f 20 63 61 6c 6c 65 72 2d nters to caller-
b150: 6d 61 64 65 20 6c 6f 63 61 6c 20 63 6f 70 69 65 made local copie
b160: 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 5f s.. */.#define _
b170: 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 28 4c _va_arg_struct(L
b180: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
b190: 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 20 28 PE_ALIGN) \. (
b1a0: 28 54 59 50 45 5f 53 49 5a 45 29 20 3e 20 38 09 (TYPE_SIZE) > 8.
b1b0: 09 09 09 09 09 09 5c 0a 20 20 20 3f 20 76 61 5f ......\. ? va_
b1c0: 61 72 67 5f 70 74 72 28 4c 49 53 54 2c 76 6f 69 arg_ptr(LIST,voi
b1d0: 64 2a 29 09 09 09 09 09 09 5c 0a 20 20 20 3a 20 d*)......\. :
b1e0: 2f 2a 20 46 49 58 4d 45 3a 20 67 63 63 2d 32 2e /* FIXME: gcc-2.
b1f0: 36 2e 33 20 70 61 73 73 65 73 20 73 74 72 75 63 6.3 passes struc
b200: 74 75 72 65 73 20 3c 3d 20 34 20 62 79 74 65 73 tures <= 4 bytes
b210: 20 69 6e 20 6d 65 6d 6f 72 79 20 6c 65 66 74 2d in memory left-
b220: 61 64 6a 75 73 74 65 64 21 20 3f 3f 20 2a 2f 5c adjusted! ?? */\
b230: 0a 20 20 20 20 20 28 76 6f 69 64 2a 29 5f 5f 76 . (void*)__v
b240: 61 5f 61 72 67 5f 72 69 67 68 74 61 64 6a 75 73 a_arg_rightadjus
b250: 74 65 64 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 ted(LIST,TYPE_SI
b260: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
b270: 5c 0a 20 20 29 0a 23 65 6e 64 69 66 0a 23 69 66 \. ).#endif.#if
b280: 20 64 65 66 69 6e 65 64 28 5f 5f 69 61 36 34 5f defined(__ia64_
b290: 5f 29 0a 2f 2a 20 54 79 70 65 73 20 6c 61 72 67 _)./* Types larg
b2a0: 65 72 20 74 68 61 6e 20 61 20 77 6f 72 64 20 68 er than a word h
b2b0: 61 76 65 20 32 2d 77 6f 72 64 20 61 6c 69 67 6e ave 2-word align
b2c0: 6d 65 6e 74 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 ment. */.#define
b2d0: 20 5f 5f 76 61 5f 61 72 67 5f 73 74 72 75 63 74 __va_arg_struct
b2e0: 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c (LIST,TYPE_SIZE,
b2f0: 54 59 50 45 5f 41 4c 49 47 4e 29 20 20 5c 0a 20 TYPE_ALIGN) \.
b300: 20 28 5f 5f 76 61 5f 61 6c 69 67 6e 5f 73 74 72 (__va_align_str
b310: 75 63 74 28 4c 49 53 54 2c 54 59 50 45 5f 53 49 uct(LIST,TYPE_SI
b320: 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e 29 09 09 ZE,TYPE_ALIGN)..
b330: 09 09 5c 0a 20 20 20 28 28 54 59 50 45 5f 53 49 ..\. ((TYPE_SI
b340: 5a 45 29 20 3e 20 73 69 7a 65 6f 66 28 5f 5f 76 ZE) > sizeof(__v
b350: 61 77 6f 72 64 29 20 26 26 20 28 28 28 5f 5f 76 aword) && (((__v
b360: 61 77 6f 72 64 2a 29 28 4c 49 53 54 29 2d 3e 61 aword*)(LIST)->a
b370: 70 74 72 20 2d 20 28 4c 49 53 54 29 2d 3e 73 61 ptr - (LIST)->sa
b380: 70 74 72 29 20 26 20 31 29 20 3f 20 28 4c 49 53 ptr) & 1) ? (LIS
b390: 54 29 2d 3e 61 70 74 72 20 2b 3d 20 73 69 7a 65 T)->aptr += size
b3a0: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3a 20 30 of(__vaword) : 0
b3b0: 29 2c 20 5c 0a 20 20 20 5f 5f 76 61 5f 61 72 67 ), \. __va_arg
b3c0: 5f 61 64 6a 75 73 74 65 64 28 4c 49 53 54 2c 54 _adjusted(LIST,T
b3d0: 59 50 45 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c YPE_SIZE,TYPE_AL
b3e0: 49 47 4e 29 09 09 09 09 5c 0a 20 20 29 0a 23 65 IGN)....\. ).#e
b3f0: 6e 64 69 66 0a 0a 0a 2f 2a 0a 20 2a 20 44 65 66 ndif.../*. * Def
b400: 69 6e 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 76 inition of the v
b410: 61 5f 72 65 74 75 72 6e 5f 78 78 78 20 6d 61 63 a_return_xxx mac
b420: 72 6f 73 2e 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 ros.. */.#define
b430: 20 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 __va_return(LIS
b440: 54 2c 52 45 54 54 59 50 45 29 20 20 5c 0a 20 20 T,RETTYPE) \.
b450: 28 28 28 4c 49 53 54 29 2d 3e 72 74 79 70 65 20 (((LIST)->rtype
b460: 3d 3d 20 28 52 45 54 54 59 50 45 29 29 20 7c 7c == (RETTYPE)) ||
b470: 20 5f 5f 76 61 5f 65 72 72 6f 72 31 28 28 4c 49 __va_error1((LI
b480: 53 54 29 2d 3e 72 74 79 70 65 2c 52 45 54 54 59 ST)->rtype,RETTY
b490: 50 45 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f PE)).#define va_
b4a0: 72 65 74 75 72 6e 5f 76 6f 69 64 28 4c 49 53 54 return_void(LIST
b4b0: 29 20 20 5c 0a 20 20 5f 5f 76 61 5f 72 65 74 75 ) \. __va_retu
b4c0: 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 76 6f 69 64 rn(LIST,__VAvoid
b4d0: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 ).#define va_ret
b4e0: 75 72 6e 5f 63 68 61 72 28 4c 49 53 54 2c 56 41 urn_char(LIST,VA
b4f0: 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 L) \. (__va_re
b500: 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 63 68 turn(LIST,__VAch
b510: 61 72 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 ar), (LIST)->tmp
b520: 2e 5f 63 68 61 72 20 3d 20 28 56 41 4c 29 29 0a ._char = (VAL)).
b530: 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 #define va_retur
b540: 6e 5f 73 63 68 61 72 28 4c 49 53 54 2c 56 41 4c n_schar(LIST,VAL
b550: 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 ) \. (__va_ret
b560: 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 73 63 68 urn(LIST,__VAsch
b570: 61 72 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 ar), (LIST)->tmp
b580: 2e 5f 73 63 68 61 72 20 3d 20 28 56 41 4c 29 29 ._schar = (VAL))
b590: 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 .#define va_retu
b5a0: 72 6e 5f 75 63 68 61 72 28 4c 49 53 54 2c 56 41 rn_uchar(LIST,VA
b5b0: 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 L) \. (__va_re
b5c0: 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 75 63 turn(LIST,__VAuc
b5d0: 68 61 72 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d har), (LIST)->tm
b5e0: 70 2e 5f 75 63 68 61 72 20 3d 20 28 56 41 4c 29 p._uchar = (VAL)
b5f0: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 ).#define va_ret
b600: 75 72 6e 5f 73 68 6f 72 74 28 4c 49 53 54 2c 56 urn_short(LIST,V
b610: 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 AL) \. (__va_r
b620: 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 73 eturn(LIST,__VAs
b630: 68 6f 72 74 29 2c 20 28 4c 49 53 54 29 2d 3e 74 hort), (LIST)->t
b640: 6d 70 2e 5f 73 68 6f 72 74 20 3d 20 28 56 41 4c mp._short = (VAL
b650: 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 )).#define va_re
b660: 74 75 72 6e 5f 75 73 68 6f 72 74 28 4c 49 53 54 turn_ushort(LIST
b670: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
b680: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
b690: 41 75 73 68 6f 72 74 29 2c 20 28 4c 49 53 54 29 Aushort), (LIST)
b6a0: 2d 3e 74 6d 70 2e 5f 75 73 68 6f 72 74 20 3d 20 ->tmp._ushort =
b6b0: 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 (VAL)).#define v
b6c0: 61 5f 72 65 74 75 72 6e 5f 69 6e 74 28 4c 49 53 a_return_int(LIS
b6d0: 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 T,VAL) \. (__v
b6e0: 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f a_return(LIST,__
b6f0: 56 41 69 6e 74 29 2c 20 28 4c 49 53 54 29 2d 3e VAint), (LIST)->
b700: 74 6d 70 2e 5f 69 6e 74 20 3d 20 28 56 41 4c 29 tmp._int = (VAL)
b710: 29 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 ).#define va_ret
b720: 75 72 6e 5f 75 69 6e 74 28 4c 49 53 54 2c 56 41 urn_uint(LIST,VA
b730: 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 L) \. (__va_re
b740: 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 75 69 turn(LIST,__VAui
b750: 6e 74 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 nt), (LIST)->tmp
b760: 2e 5f 75 69 6e 74 20 3d 20 28 56 41 4c 29 29 0a ._uint = (VAL)).
b770: 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 #define va_retur
b780: 6e 5f 6c 6f 6e 67 28 4c 49 53 54 2c 56 41 4c 29 n_long(LIST,VAL)
b790: 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 \. (__va_retu
b7a0: 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 6c 6f 6e 67 rn(LIST,__VAlong
b7b0: 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f ), (LIST)->tmp._
b7c0: 6c 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a 23 64 long = (VAL)).#d
b7d0: 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 6e 5f efine va_return_
b7e0: 75 6c 6f 6e 67 28 4c 49 53 54 2c 56 41 4c 29 20 ulong(LIST,VAL)
b7f0: 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 \. (__va_retur
b800: 6e 28 4c 49 53 54 2c 5f 5f 56 41 75 6c 6f 6e 67 n(LIST,__VAulong
b810: 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f ), (LIST)->tmp._
b820: 75 6c 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a 23 ulong = (VAL)).#
b830: 69 66 20 64 65 66 69 6e 65 64 28 5f 5f 6d 69 70 if defined(__mip
b840: 73 36 34 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 s64__) || define
b850: 64 28 5f 5f 73 70 61 72 63 36 34 5f 5f 29 20 7c d(__sparc64__) |
b860: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 61 6c 70 68 | defined(__alph
b870: 61 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65 64 28 a__) || defined(
b880: 5f 5f 69 61 36 34 5f 5f 29 20 7c 7c 20 64 65 66 __ia64__) || def
b890: 69 6e 65 64 28 5f 5f 78 38 36 5f 36 34 5f 5f 29 ined(__x86_64__)
b8a0: 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 .#define va_retu
b8b0: 72 6e 5f 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 rn_longlong(LIST
b8c0: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
b8d0: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
b8e0: 41 6c 6f 6e 67 6c 6f 6e 67 29 2c 20 28 4c 49 53 Alonglong), (LIS
b8f0: 54 29 2d 3e 74 6d 70 2e 5f 6c 6f 6e 67 20 3d 20 T)->tmp._long =
b900: 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 (VAL)).#define v
b910: 61 5f 72 65 74 75 72 6e 5f 75 6c 6f 6e 67 6c 6f a_return_ulonglo
b920: 6e 67 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a ng(LIST,VAL) \.
b930: 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c (__va_return(L
b940: 49 53 54 2c 5f 5f 56 41 75 6c 6f 6e 67 6c 6f 6e IST,__VAulonglon
b950: 67 29 2c 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e g), (LIST)->tmp.
b960: 5f 75 6c 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a _ulong = (VAL)).
b970: 23 65 6c 73 65 0a 23 64 65 66 69 6e 65 20 76 61 #else.#define va
b980: 5f 72 65 74 75 72 6e 5f 6c 6f 6e 67 6c 6f 6e 67 _return_longlong
b990: 28 4c 49 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 (LIST,VAL) \.
b9a0: 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 (__va_return(LIS
b9b0: 54 2c 5f 5f 56 41 6c 6f 6e 67 6c 6f 6e 67 29 2c T,__VAlonglong),
b9c0: 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 6c 6f (LIST)->tmp._lo
b9d0: 6e 67 6c 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a nglong = (VAL)).
b9e0: 23 64 65 66 69 6e 65 20 76 61 5f 72 65 74 75 72 #define va_retur
b9f0: 6e 5f 75 6c 6f 6e 67 6c 6f 6e 67 28 4c 49 53 54 n_ulonglong(LIST
ba00: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
ba10: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
ba20: 41 75 6c 6f 6e 67 6c 6f 6e 67 29 2c 20 28 4c 49 Aulonglong), (LI
ba30: 53 54 29 2d 3e 74 6d 70 2e 5f 75 6c 6f 6e 67 6c ST)->tmp._ulongl
ba40: 6f 6e 67 20 3d 20 28 56 41 4c 29 29 0a 23 65 6e ong = (VAL)).#en
ba50: 64 69 66 0a 23 64 65 66 69 6e 65 20 76 61 5f 72 dif.#define va_r
ba60: 65 74 75 72 6e 5f 66 6c 6f 61 74 28 4c 49 53 54 eturn_float(LIST
ba70: 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f 76 61 ,VAL) \. (__va
ba80: 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 _return(LIST,__V
ba90: 41 66 6c 6f 61 74 29 2c 20 28 4c 49 53 54 29 2d Afloat), (LIST)-
baa0: 3e 74 6d 70 2e 5f 66 6c 6f 61 74 20 3d 20 28 56 >tmp._float = (V
bab0: 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 76 61 5f AL)).#define va_
bac0: 72 65 74 75 72 6e 5f 64 6f 75 62 6c 65 28 4c 49 return_double(LI
bad0: 53 54 2c 56 41 4c 29 20 20 5c 0a 20 20 28 5f 5f ST,VAL) \. (__
bae0: 76 61 5f 72 65 74 75 72 6e 28 4c 49 53 54 2c 5f va_return(LIST,_
baf0: 5f 56 41 64 6f 75 62 6c 65 29 2c 20 28 4c 49 53 _VAdouble), (LIS
bb00: 54 29 2d 3e 74 6d 70 2e 5f 64 6f 75 62 6c 65 20 T)->tmp._double
bb10: 3d 20 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 = (VAL)).#define
bb20: 20 76 61 5f 72 65 74 75 72 6e 5f 70 74 72 28 4c va_return_ptr(L
bb30: 49 53 54 2c 54 59 50 45 2c 56 41 4c 29 20 20 5c IST,TYPE,VAL) \
bb40: 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 6e 28 . (__va_return(
bb50: 4c 49 53 54 2c 5f 5f 56 41 76 6f 69 64 70 29 2c LIST,__VAvoidp),
bb60: 20 28 4c 49 53 54 29 2d 3e 74 6d 70 2e 5f 70 74 (LIST)->tmp._pt
bb70: 72 20 3d 20 28 76 6f 69 64 2a 29 28 54 59 50 45 r = (void*)(TYPE
bb80: 29 28 56 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 )(VAL)).#define
bb90: 76 61 5f 72 65 74 75 72 6e 5f 73 74 72 75 63 74 va_return_struct
bba0: 28 4c 49 53 54 2c 54 59 50 45 2c 56 41 4c 29 20 (LIST,TYPE,VAL)
bbb0: 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 74 75 72 \. (__va_retur
bbc0: 6e 28 4c 49 53 54 2c 5f 5f 56 41 73 74 72 75 63 n(LIST,__VAstruc
bbd0: 74 29 2c 20 2a 28 54 59 50 45 2a 29 28 28 4c 49 t), *(TYPE*)((LI
bbe0: 53 54 29 2d 3e 72 61 64 64 72 29 20 3d 20 28 56 ST)->raddr) = (V
bbf0: 41 4c 29 29 0a 23 64 65 66 69 6e 65 20 5f 76 61 AL)).#define _va
bc00: 5f 72 65 74 75 72 6e 5f 73 74 72 75 63 74 28 4c _return_struct(L
bc10: 49 53 54 2c 54 59 50 45 5f 53 49 5a 45 2c 54 59 IST,TYPE_SIZE,TY
bc20: 50 45 5f 41 4c 49 47 4e 2c 56 41 4c 5f 41 44 44 PE_ALIGN,VAL_ADD
bc30: 52 29 20 20 5c 0a 20 20 28 5f 5f 76 61 5f 72 65 R) \. (__va_re
bc40: 74 75 72 6e 28 4c 49 53 54 2c 5f 5f 56 41 73 74 turn(LIST,__VAst
bc50: 72 75 63 74 29 2c 09 09 09 09 09 5c 0a 20 20 20 ruct),.....\.
bc60: 5f 5f 73 74 72 75 63 74 63 70 79 28 28 76 6f 69 __structcpy((voi
bc70: 64 2a 29 28 28 4c 49 53 54 29 2d 3e 72 61 64 64 d*)((LIST)->radd
bc80: 72 29 2c 56 41 4c 5f 41 44 44 52 2c 54 59 50 45 r),VAL_ADDR,TYPE
bc90: 5f 53 49 5a 45 2c 54 59 50 45 5f 41 4c 49 47 4e _SIZE,TYPE_ALIGN
bca0: 29 09 5c 0a 20 20 29 0a 0a 0a 2f 2a 20 44 65 74 ).\. ).../* Det
bcb0: 65 72 6d 69 6e 65 20 77 68 65 74 68 65 72 20 61 ermine whether a
bcc0: 20 73 74 72 75 63 74 20 74 79 70 65 20 69 73 20 struct type is
bcd0: 77 6f 72 64 2d 73 70 6c 69 74 74 61 62 6c 65 2c word-splittable,
bce0: 20 69 2e 65 2e 20 77 68 65 74 68 65 72 20 65 61 i.e. whether ea
bcf0: 63 68 20 6f 66 0a 20 2a 20 69 74 73 20 63 6f 6d ch of. * its com
bd00: 70 6f 6e 65 6e 74 73 20 66 69 74 20 69 6e 74 6f ponents fit into
bd10: 20 61 20 72 65 67 69 73 74 65 72 2e 0a 20 2a 20 a register.. *
bd20: 54 68 65 20 65 6e 74 69 72 65 20 63 6f 6d 70 75 The entire compu
bd30: 74 61 74 69 6f 6e 20 69 73 20 64 6f 6e 65 20 61 tation is done a
bd40: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 0a t compile time..
bd50: 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 61 5f 77 */.#define va_w
bd60: 6f 72 64 5f 73 70 6c 69 74 74 61 62 6c 65 5f 31 ord_splittable_1
bd70: 28 73 6c 6f 74 31 29 20 20 5c 0a 20 20 28 5f 5f (slot1) \. (__
bd80: 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 va_offset1(slot1
bd90: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
bda0: 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 d) == (__va_offs
bdb0: 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 7a 65 6f et1(slot1)+sizeo
bdc0: 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 69 7a 65 f(slot1)-1)/size
bdd0: 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 0a 23 64 of(__vaword)).#d
bde0: 65 66 69 6e 65 20 76 61 5f 77 6f 72 64 5f 73 70 efine va_word_sp
bdf0: 6c 69 74 74 61 62 6c 65 5f 32 28 73 6c 6f 74 31 littable_2(slot1
be00: 2c 73 6c 6f 74 32 29 20 20 5c 0a 20 20 28 28 5f ,slot2) \. ((_
be10: 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 _va_offset1(slot
be20: 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 1)/sizeof(__vawo
be30: 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 rd) == (__va_off
be40: 73 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 7a 65 set1(slot1)+size
be50: 6f 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 69 7a of(slot1)-1)/siz
be60: 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c eof(__vaword)) \
be70: 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 66 . && (__va_off
be80: 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 set2(slot1,slot2
be90: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
bea0: 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 d) == (__va_offs
beb0: 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 et2(slot1,slot2)
bec0: 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2d 31 +sizeof(slot2)-1
bed0: 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 )/sizeof(__vawor
bee0: 64 29 29 20 5c 0a 20 20 29 0a 23 64 65 66 69 6e d)) \. ).#defin
bef0: 65 20 76 61 5f 77 6f 72 64 5f 73 70 6c 69 74 74 e va_word_splitt
bf00: 61 62 6c 65 5f 33 28 73 6c 6f 74 31 2c 73 6c 6f able_3(slot1,slo
bf10: 74 32 2c 73 6c 6f 74 33 29 20 20 5c 0a 20 20 28 t2,slot3) \. (
bf20: 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c (__va_offset1(sl
bf30: 6f 74 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 ot1)/sizeof(__va
bf40: 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f word) == (__va_o
bf50: 66 66 73 65 74 31 28 73 6c 6f 74 31 29 2b 73 69 ffset1(slot1)+si
bf60: 7a 65 6f 66 28 73 6c 6f 74 31 29 2d 31 29 2f 73 zeof(slot1)-1)/s
bf70: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 izeof(__vaword))
bf80: 20 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f \. && (__va_o
bf90: 66 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f ffset2(slot1,slo
bfa0: 74 32 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 t2)/sizeof(__vaw
bfb0: 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 61 5f 6f 66 ord) == (__va_of
bfc0: 66 73 65 74 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 fset2(slot1,slot
bfd0: 32 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2)+sizeof(slot2)
bfe0: 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 77 -1)/sizeof(__vaw
bff0: 6f 72 64 29 29 20 5c 0a 20 20 20 26 26 20 28 5f ord)) \. && (_
c000: 5f 76 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 _va_offset3(slot
c010: 31 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 2f 73 1,slot2,slot3)/s
c020: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 izeof(__vaword)
c030: 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 33 == (__va_offset3
c040: 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f (slot1,slot2,slo
c050: 74 33 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 33 t3)+sizeof(slot3
c060: 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f 5f 76 61 )-1)/sizeof(__va
c070: 77 6f 72 64 29 29 20 5c 0a 20 20 29 0a 23 64 65 word)) \. ).#de
c080: 66 69 6e 65 20 76 61 5f 77 6f 72 64 5f 73 70 6c fine va_word_spl
c090: 69 74 74 61 62 6c 65 5f 34 28 73 6c 6f 74 31 2c ittable_4(slot1,
c0a0: 73 6c 6f 74 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 slot2,slot3,slot
c0b0: 34 29 20 20 5c 0a 20 20 28 28 5f 5f 76 61 5f 6f 4) \. ((__va_o
c0c0: 66 66 73 65 74 31 28 73 6c 6f 74 31 29 2f 73 69 ffset1(slot1)/si
c0d0: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3d zeof(__vaword) =
c0e0: 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 31 28 = (__va_offset1(
c0f0: 73 6c 6f 74 31 29 2b 73 69 7a 65 6f 66 28 73 6c slot1)+sizeof(sl
c100: 6f 74 31 29 2d 31 29 2f 73 69 7a 65 6f 66 28 5f ot1)-1)/sizeof(_
c110: 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 20 20 26 _vaword)) \. &
c120: 26 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 32 28 & (__va_offset2(
c130: 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 2f 73 69 7a slot1,slot2)/siz
c140: 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 3d 3d eof(__vaword) ==
c150: 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 32 28 73 (__va_offset2(s
c160: 6c 6f 74 31 2c 73 6c 6f 74 32 29 2b 73 69 7a 65 lot1,slot2)+size
c170: 6f 66 28 73 6c 6f 74 32 29 2d 31 29 2f 73 69 7a of(slot2)-1)/siz
c180: 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c eof(__vaword)) \
c190: 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 66 . && (__va_off
c1a0: 73 65 74 33 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 set3(slot1,slot2
c1b0: 2c 73 6c 6f 74 33 29 2f 73 69 7a 65 6f 66 28 5f ,slot3)/sizeof(_
c1c0: 5f 76 61 77 6f 72 64 29 20 3d 3d 20 28 5f 5f 76 _vaword) == (__v
c1d0: 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 31 2c a_offset3(slot1,
c1e0: 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 2b 73 69 7a slot2,slot3)+siz
c1f0: 65 6f 66 28 73 6c 6f 74 33 29 2d 31 29 2f 73 69 eof(slot3)-1)/si
c200: 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 zeof(__vaword))
c210: 5c 0a 20 20 20 26 26 20 28 5f 5f 76 61 5f 6f 66 \. && (__va_of
c220: 66 73 65 74 34 28 73 6c 6f 74 31 2c 73 6c 6f 74 fset4(slot1,slot
c230: 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 34 29 2f 73 2,slot3,slot4)/s
c240: 69 7a 65 6f 66 28 5f 5f 76 61 77 6f 72 64 29 20 izeof(__vaword)
c250: 3d 3d 20 28 5f 5f 76 61 5f 6f 66 66 73 65 74 34 == (__va_offset4
c260: 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c 73 6c 6f (slot1,slot2,slo
c270: 74 33 2c 73 6c 6f 74 34 29 2b 73 69 7a 65 6f 66 t3,slot4)+sizeof
c280: 28 73 6c 6f 74 34 29 2d 31 29 2f 73 69 7a 65 6f (slot4)-1)/sizeo
c290: 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 5c 0a 20 f(__vaword)) \.
c2a0: 20 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f ).#define __va_
c2b0: 6f 66 66 73 65 74 31 28 73 6c 6f 74 31 29 20 20 offset1(slot1)
c2c0: 5c 0a 20 20 30 0a 23 64 65 66 69 6e 65 20 5f 5f \. 0.#define __
c2d0: 76 61 5f 6f 66 66 73 65 74 32 28 73 6c 6f 74 31 va_offset2(slot1
c2e0: 2c 73 6c 6f 74 32 29 20 20 5c 0a 20 20 28 28 5f ,slot2) \. ((_
c2f0: 5f 76 61 5f 6f 66 66 73 65 74 31 28 73 6c 6f 74 _va_offset1(slot
c300: 31 29 2b 73 69 7a 65 6f 66 28 73 6c 6f 74 31 29 1)+sizeof(slot1)
c310: 2b 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 73 6c +__VA_alignof(sl
c320: 6f 74 32 29 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 ot2)-1) & -(long
c330: 29 5f 5f 56 41 5f 61 6c 69 67 6e 6f 66 28 73 6c )__VA_alignof(sl
c340: 6f 74 32 29 29 0a 23 64 65 66 69 6e 65 20 5f 5f ot2)).#define __
c350: 76 61 5f 6f 66 66 73 65 74 33 28 73 6c 6f 74 31 va_offset3(slot1
c360: 2c 73 6c 6f 74 32 2c 73 6c 6f 74 33 29 20 20 5c ,slot2,slot3) \
c370: 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 65 74 . ((__va_offset
c380: 32 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 29 2b 73 2(slot1,slot2)+s
c390: 69 7a 65 6f 66 28 73 6c 6f 74 32 29 2b 5f 5f 56 izeof(slot2)+__V
c3a0: 41 5f 61 6c 69 67 6e 6f 66 28 73 6c 6f 74 33 29 A_alignof(slot3)
c3b0: 2d 31 29 20 26 20 2d 28 6c 6f 6e 67 29 5f 5f 56 -1) & -(long)__V
c3c0: 41 5f 61 6c 69 67 6e 6f 66 28 73 6c 6f 74 33 29 A_alignof(slot3)
c3d0: 29 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 5f 6f ).#define __va_o
c3e0: 66 66 73 65 74 34 28 73 6c 6f 74 31 2c 73 6c 6f ffset4(slot1,slo
c3f0: 74 32 2c 73 6c 6f 74 33 2c 73 6c 6f 74 34 29 20 t2,slot3,slot4)
c400: 20 5c 0a 20 20 28 28 5f 5f 76 61 5f 6f 66 66 73 \. ((__va_offs
c410: 65 74 33 28 73 6c 6f 74 31 2c 73 6c 6f 74 32 2c et3(slot1,slot2,
c420: 73 6c 6f 74 33 29 2b 73 69 7a 65 6f 66 28 73 6c slot3)+sizeof(sl
c430: 6f 74 33 29 2b 5f 5f 56 41 5f 61 6c 69 67 6e 6f ot3)+__VA_aligno
c440: 66 28 73 6c 6f 74 34 29 2d 31 29 20 26 20 2d 28 f(slot4)-1) & -(
c450: 6c 6f 6e 67 29 5f 5f 56 41 5f 61 6c 69 67 6e 6f long)__VA_aligno
c460: 66 28 73 6c 6f 74 34 29 29 0a 0a 0a 2f 2a 0a 20 f(slot4)).../*.
c470: 2a 20 4d 69 73 63 65 6c 6c 61 6e 65 6f 75 73 20 * Miscellaneous
c480: 64 65 63 6c 61 72 61 74 69 6f 6e 73 2e 0a 20 2a declarations.. *
c490: 2f 0a 23 69 66 64 65 66 20 5f 5f 63 70 6c 75 73 /.#ifdef __cplus
c4a0: 70 6c 75 73 0a 65 78 74 65 72 6e 20 22 43 22 20 plus.extern "C"
c4b0: 76 6f 69 64 20 5f 5f 76 61 63 61 6c 6c 5f 72 20 void __vacall_r
c4c0: 28 29 3b 20 2f 2a 20 74 68 65 20 72 65 74 75 72 (); /* the retur
c4d0: 6e 20 74 79 70 65 20 69 73 20 76 61 72 69 61 62 n type is variab
c4e0: 6c 65 2c 20 6e 6f 74 20 76 6f 69 64 21 20 2a 2f le, not void! */
c4f0: 0a 23 65 6c 73 65 0a 65 78 74 65 72 6e 20 76 6f .#else.extern vo
c500: 69 64 20 5f 5f 76 61 63 61 6c 6c 5f 72 20 28 29 id __vacall_r ()
c510: 3b 20 2f 2a 20 74 68 65 20 72 65 74 75 72 6e 20 ; /* the return
c520: 74 79 70 65 20 69 73 20 76 61 72 69 61 62 6c 65 type is variable
c530: 2c 20 6e 6f 74 20 76 6f 69 64 21 20 2a 2f 0a 23 , not void! */.#
c540: 65 6e 64 69 66 0a 23 69 66 20 64 65 66 69 6e 65 endif.#if define
c550: 64 28 5f 5f 53 54 44 43 5f 5f 29 20 7c 7c 20 64 d(__STDC__) || d
c560: 65 66 69 6e 65 64 28 5f 5f 47 4e 55 43 5f 5f 29 efined(__GNUC__)
c570: 20 7c 7c 20 64 65 66 69 6e 65 64 28 5f 5f 63 70 || defined(__cp
c580: 6c 75 73 70 6c 75 73 29 0a 65 78 74 65 72 6e 20 lusplus).extern
c590: 69 6e 74 20 5f 5f 76 61 5f 65 72 72 6f 72 31 20 int __va_error1
c5a0: 28 65 6e 75 6d 20 5f 5f 56 41 74 79 70 65 2c 20 (enum __VAtype,
c5b0: 65 6e 75 6d 20 5f 5f 56 41 74 79 70 65 29 3b 0a enum __VAtype);.
c5c0: 65 78 74 65 72 6e 20 69 6e 74 20 5f 5f 76 61 5f extern int __va_
c5d0: 65 72 72 6f 72 32 20 28 75 6e 73 69 67 6e 65 64 error2 (unsigned
c5e0: 20 69 6e 74 29 3b 0a 65 78 74 65 72 6e 20 76 6f int);.extern vo
c5f0: 69 64 20 5f 5f 73 74 72 75 63 74 63 70 79 20 28 id __structcpy (
c600: 76 6f 69 64 2a 20 64 65 73 74 2c 20 76 6f 69 64 void* dest, void
c610: 2a 20 73 72 63 2c 20 75 6e 73 69 67 6e 65 64 20 * src, unsigned
c620: 6c 6f 6e 67 20 73 69 7a 65 2c 20 75 6e 73 69 67 long size, unsig
c630: 6e 65 64 20 6c 6f 6e 67 20 61 6c 69 67 6e 6d 65 ned long alignme
c640: 6e 74 29 3b 0a 23 65 6c 73 65 0a 65 78 74 65 72 nt);.#else.exter
c650: 6e 20 69 6e 74 20 5f 5f 76 61 5f 65 72 72 6f 72 n int __va_error
c660: 31 20 28 29 3b 0a 65 78 74 65 72 6e 20 69 6e 74 1 ();.extern int
c670: 20 5f 5f 76 61 5f 65 72 72 6f 72 32 20 28 29 3b __va_error2 ();
c680: 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 5f 5f 73 .extern void __s
c690: 74 72 75 63 74 63 70 79 20 28 29 3b 0a 23 65 6e tructcpy ();.#en
c6a0: 64 69 66 0a 74 79 70 65 64 65 66 20 75 6e 69 6f dif.typedef unio
c6b0: 6e 20 7b 20 5f 5f 76 61 77 6f 72 64 20 72 6f 6f n { __vaword roo
c6c0: 6d 5b 5f 5f 56 41 5f 41 4c 49 53 54 5f 57 4f 52 m[__VA_ALIST_WOR
c6d0: 44 53 5d 3b 20 64 6f 75 62 6c 65 20 61 6c 69 67 DS]; double alig
c6e0: 6e 3b 20 7d 20 5f 5f 76 61 5f 73 74 72 75 63 74 n; } __va_struct
c6f0: 5f 62 75 66 66 65 72 5f 74 3b 0a 65 78 74 65 72 _buffer_t;.exter
c700: 6e 20 5f 5f 76 61 5f 73 74 72 75 63 74 5f 62 75 n __va_struct_bu
c710: 66 66 65 72 5f 74 20 5f 5f 76 61 5f 73 74 72 75 ffer_t __va_stru
c720: 63 74 5f 62 75 66 66 65 72 3b 0a 0a 0a 23 65 6e ct_buffer;...#en
c730: 64 69 66 20 2f 2a 20 5f 56 41 43 41 4c 4c 5f 52 dif /* _VACALL_R
c740: 5f 48 20 2a 2f 0a _H */.