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