Artifact
063b7ef48216e137c00de697219fdc4244813071:
0000: 2f 2a 20 76 61 63 61 6c 6c 20 66 75 6e 63 74 69 /* vacall functi
0010: 6f 6e 20 66 6f 72 20 6d 36 38 6b 20 43 50 55 20 on for m68k CPU
0020: 2a 2f 0a 0a 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 */../*. * Copyri
0030: 67 68 74 20 31 39 39 35 2d 32 30 30 36 20 42 72 ght 1995-2006 Br
0040: 75 6e 6f 20 48 61 69 62 6c 65 2c 20 3c 62 72 75 uno Haible, <bru
0050: 6e 6f 40 63 6c 69 73 70 2e 6f 72 67 3e 0a 20 2a no@clisp.org>. *
0060: 0a 20 2a 20 54 68 69 73 20 69 73 20 66 72 65 65 . * This is free
0070: 20 73 6f 66 74 77 61 72 65 20 64 69 73 74 72 69 software distri
0080: 62 75 74 65 64 20 75 6e 64 65 72 20 74 68 65 20 buted under the
0090: 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 6c GNU General Publ
00a0: 69 63 20 4c 69 63 65 6e 63 65 0a 20 2a 20 64 65 ic Licence. * de
00b0: 73 63 72 69 62 65 64 20 69 6e 20 74 68 65 20 66 scribed in the f
00c0: 69 6c 65 20 43 4f 50 59 49 4e 47 2e 20 43 6f 6e ile COPYING. Con
00d0: 74 61 63 74 20 74 68 65 20 61 75 74 68 6f 72 20 tact the author
00e0: 69 66 20 79 6f 75 20 64 6f 6e 27 74 20 68 61 76 if you don't hav
00f0: 65 20 74 68 69 73 0a 20 2a 20 6f 72 20 63 61 6e e this. * or can
0100: 27 74 20 6c 69 76 65 20 77 69 74 68 20 69 74 2e 't live with it.
0110: 20 54 68 65 72 65 20 69 73 20 41 42 53 4f 4c 55 There is ABSOLU
0120: 54 45 4c 59 20 4e 4f 20 57 41 52 52 41 4e 54 59 TELY NO WARRANTY
0130: 2c 20 65 78 70 6c 69 63 69 74 20 6f 72 20 69 6d , explicit or im
0140: 70 6c 69 65 64 2c 0a 20 2a 20 6f 6e 20 74 68 69 plied,. * on thi
0150: 73 20 73 6f 66 74 77 61 72 65 2e 0a 20 2a 2f 0a s software.. */.
0160: 0a 23 69 66 6e 64 65 66 20 52 45 45 4e 54 52 41 .#ifndef REENTRA
0170: 4e 54 0a 23 69 6e 63 6c 75 64 65 20 22 76 61 63 NT.#include "vac
0180: 61 6c 6c 2e 68 2e 69 6e 22 0a 23 65 6c 73 65 20 all.h.in".#else
0190: 2f 2a 20 52 45 45 4e 54 52 41 4e 54 20 2a 2f 0a /* REENTRANT */.
01a0: 23 69 6e 63 6c 75 64 65 20 22 76 61 63 61 6c 6c #include "vacall
01b0: 5f 72 2e 68 2e 69 6e 22 0a 23 65 6e 64 69 66 0a _r.h.in".#endif.
01c0: 0a 23 69 66 64 65 66 20 52 45 45 4e 54 52 41 4e .#ifdef REENTRAN
01d0: 54 0a 23 64 65 66 69 6e 65 20 5f 5f 76 61 63 61 T.#define __vaca
01e0: 6c 6c 20 5f 5f 76 61 63 61 6c 6c 5f 72 0a 72 65 ll __vacall_r.re
01f0: 67 69 73 74 65 72 20 73 74 72 75 63 74 20 7b 20 gister struct {
0200: 76 6f 69 64 20 28 2a 76 61 63 61 6c 6c 5f 66 75 void (*vacall_fu
0210: 6e 63 74 69 6f 6e 29 20 28 76 6f 69 64 2a 2c 76 nction) (void*,v
0220: 61 5f 61 6c 69 73 74 29 3b 20 76 6f 69 64 2a 20 a_alist); void*
0230: 61 72 67 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 arg; }.
0240: 2a 09 65 6e 76 0a 23 69 66 64 65 66 20 5f 5f 4e *.env.#ifdef __N
0250: 65 74 42 53 44 5f 5f 0a 09 09 09 5f 5f 61 73 6d etBSD__....__asm
0260: 5f 5f 28 22 61 31 22 29 3b 0a 23 65 6c 73 65 0a __("a1");.#else.
0270: 09 09 09 5f 5f 61 73 6d 5f 5f 28 22 61 30 22 29 ...__asm__("a0")
0280: 3b 0a 23 65 6e 64 69 66 0a 23 65 6e 64 69 66 0a ;.#endif.#endif.
0290: 72 65 67 69 73 74 65 72 20 76 6f 69 64 2a 09 73 register void*.s
02a0: 72 65 74 09 5f 5f 61 73 6d 5f 5f 28 22 61 31 22 ret.__asm__("a1"
02b0: 29 3b 0a 72 65 67 69 73 74 65 72 20 69 6e 74 09 );.register int.
02c0: 69 72 65 74 09 5f 5f 61 73 6d 5f 5f 28 22 64 30 iret.__asm__("d0
02d0: 22 29 3b 0a 72 65 67 69 73 74 65 72 20 69 6e 74 ");.register int
02e0: 09 69 72 65 74 32 09 5f 5f 61 73 6d 5f 5f 28 22 .iret2.__asm__("
02f0: 64 31 22 29 3b 0a 72 65 67 69 73 74 65 72 20 69 d1");.register i
0300: 6e 74 09 70 72 65 74 09 5f 5f 61 73 6d 5f 5f 28 nt.pret.__asm__(
0310: 22 61 30 22 29 3b 09 2f 2a 20 73 6f 6d 65 20 63 "a0");./* some c
0320: 6f 6d 70 69 6c 65 72 73 20 72 65 74 75 72 6e 20 ompilers return
0330: 70 6f 69 6e 74 65 72 73 20 69 6e 20 61 30 20 2a pointers in a0 *
0340: 2f 0a 72 65 67 69 73 74 65 72 20 66 6c 6f 61 74 /.register float
0350: 09 66 72 65 74 09 5f 5f 61 73 6d 5f 5f 28 22 64 .fret.__asm__("d
0360: 30 22 29 3b 09 2f 2a 20 64 30 20 2a 2f 0a 72 65 0");./* d0 */.re
0370: 67 69 73 74 65 72 20 64 6f 75 62 6c 65 09 64 72 gister double.dr
0380: 65 74 09 5f 5f 61 73 6d 5f 5f 28 22 64 30 22 29 et.__asm__("d0")
0390: 3b 09 2f 2a 20 64 30 2c 64 31 20 2a 2f 0a 72 65 ;./* d0,d1 */.re
03a0: 67 69 73 74 65 72 20 66 6c 6f 61 74 09 66 70 5f gister float.fp_
03b0: 66 72 65 74 09 5f 5f 61 73 6d 5f 5f 28 22 66 70 fret.__asm__("fp
03c0: 30 22 29 3b 0a 72 65 67 69 73 74 65 72 20 64 6f 0");.register do
03d0: 75 62 6c 65 09 66 70 5f 64 72 65 74 09 5f 5f 61 uble.fp_dret.__a
03e0: 73 6d 5f 5f 28 22 66 70 30 22 29 3b 0a 0a 76 6f sm__("fp0");..vo
03f0: 69 64 20 2f 2a 20 74 68 65 20 72 65 74 75 72 6e id /* the return
0400: 20 74 79 70 65 20 69 73 20 76 61 72 69 61 62 6c type is variabl
0410: 65 2c 20 6e 6f 74 20 76 6f 69 64 21 20 2a 2f 0a e, not void! */.
0420: 5f 5f 76 61 63 61 6c 6c 20 28 5f 5f 76 61 77 6f __vacall (__vawo
0430: 72 64 20 66 69 72 73 74 77 6f 72 64 29 0a 7b 0a rd firstword).{.
0440: 20 20 5f 5f 76 61 5f 61 6c 69 73 74 20 6c 69 73 __va_alist lis
0450: 74 3b 0a 20 20 2f 2a 20 50 72 65 70 61 72 65 20 t;. /* Prepare
0460: 74 68 65 20 76 61 5f 61 6c 69 73 74 2e 20 2a 2f the va_alist. */
0470: 0a 20 20 6c 69 73 74 2e 66 6c 61 67 73 20 3d 20 . list.flags =
0480: 30 3b 0a 20 20 6c 69 73 74 2e 61 70 74 72 20 3d 0;. list.aptr =
0490: 20 28 6c 6f 6e 67 29 26 66 69 72 73 74 77 6f 72 (long)&firstwor
04a0: 64 3b 0a 20 20 6c 69 73 74 2e 72 61 64 64 72 20 d;. list.raddr
04b0: 3d 20 28 76 6f 69 64 2a 29 30 3b 0a 20 20 6c 69 = (void*)0;. li
04c0: 73 74 2e 72 74 79 70 65 20 3d 20 5f 5f 56 41 76 st.rtype = __VAv
04d0: 6f 69 64 3b 0a 20 20 6c 69 73 74 2e 73 74 72 75 oid;. list.stru
04e0: 63 74 72 61 64 64 72 20 3d 20 73 72 65 74 3b 0a ctraddr = sret;.
04f0: 20 20 2f 2a 20 43 61 6c 6c 20 76 61 63 61 6c 6c /* Call vacall
0500: 5f 66 75 6e 63 74 69 6f 6e 2e 20 54 68 65 20 6d _function. The m
0510: 61 63 72 6f 73 20 64 6f 20 61 6c 6c 20 74 68 65 acros do all the
0520: 20 72 65 73 74 2e 20 2a 2f 0a 23 69 66 6e 64 65 rest. */.#ifnde
0530: 66 20 52 45 45 4e 54 52 41 4e 54 0a 20 20 28 2a f REENTRANT. (*
0540: 76 61 63 61 6c 6c 5f 66 75 6e 63 74 69 6f 6e 29 vacall_function)
0550: 20 28 26 6c 69 73 74 29 3b 0a 23 65 6c 73 65 20 (&list);.#else
0560: 2f 2a 20 52 45 45 4e 54 52 41 4e 54 20 2a 2f 0a /* REENTRANT */.
0570: 20 20 28 2a 65 6e 76 2d 3e 76 61 63 61 6c 6c 5f (*env->vacall_
0580: 66 75 6e 63 74 69 6f 6e 29 20 28 65 6e 76 2d 3e function) (env->
0590: 61 72 67 2c 26 6c 69 73 74 29 3b 0a 23 65 6e 64 arg,&list);.#end
05a0: 69 66 0a 20 20 2f 2a 20 50 75 74 20 72 65 74 75 if. /* Put retu
05b0: 72 6e 20 76 61 6c 75 65 20 69 6e 74 6f 20 70 72 rn value into pr
05c0: 6f 70 65 72 20 72 65 67 69 73 74 65 72 2e 20 2a oper register. *
05d0: 2f 0a 20 20 69 66 20 28 6c 69 73 74 2e 72 74 79 /. if (list.rty
05e0: 70 65 20 3d 3d 20 5f 5f 56 41 76 6f 69 64 29 20 pe == __VAvoid)
05f0: 7b 0a 20 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 {. } else. if
0600: 28 6c 69 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f (list.rtype == _
0610: 5f 56 41 63 68 61 72 29 20 7b 0a 20 20 20 20 69 _VAchar) {. i
0620: 72 65 74 20 3d 20 6c 69 73 74 2e 74 6d 70 2e 5f ret = list.tmp._
0630: 63 68 61 72 3b 0a 20 20 7d 20 65 6c 73 65 0a 20 char;. } else.
0640: 20 69 66 20 28 6c 69 73 74 2e 72 74 79 70 65 20 if (list.rtype
0650: 3d 3d 20 5f 5f 56 41 73 63 68 61 72 29 20 7b 0a == __VAschar) {.
0660: 20 20 20 20 69 72 65 74 20 3d 20 6c 69 73 74 2e iret = list.
0670: 74 6d 70 2e 5f 73 63 68 61 72 3b 0a 20 20 7d 20 tmp._schar;. }
0680: 65 6c 73 65 0a 20 20 69 66 20 28 6c 69 73 74 2e else. if (list.
0690: 72 74 79 70 65 20 3d 3d 20 5f 5f 56 41 75 63 68 rtype == __VAuch
06a0: 61 72 29 20 7b 0a 20 20 20 20 69 72 65 74 20 3d ar) {. iret =
06b0: 20 6c 69 73 74 2e 74 6d 70 2e 5f 75 63 68 61 72 list.tmp._uchar
06c0: 3b 0a 20 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 ;. } else. if
06d0: 28 6c 69 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f (list.rtype == _
06e0: 5f 56 41 73 68 6f 72 74 29 20 7b 0a 20 20 20 20 _VAshort) {.
06f0: 69 72 65 74 20 3d 20 6c 69 73 74 2e 74 6d 70 2e iret = list.tmp.
0700: 5f 73 68 6f 72 74 3b 0a 20 20 7d 20 65 6c 73 65 _short;. } else
0710: 0a 20 20 69 66 20 28 6c 69 73 74 2e 72 74 79 70 . if (list.rtyp
0720: 65 20 3d 3d 20 5f 5f 56 41 75 73 68 6f 72 74 29 e == __VAushort)
0730: 20 7b 0a 20 20 20 20 69 72 65 74 20 3d 20 6c 69 {. iret = li
0740: 73 74 2e 74 6d 70 2e 5f 75 73 68 6f 72 74 3b 0a st.tmp._ushort;.
0750: 20 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 28 6c } else. if (l
0760: 69 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f 5f 56 ist.rtype == __V
0770: 41 69 6e 74 29 20 7b 0a 20 20 20 20 69 72 65 74 Aint) {. iret
0780: 20 3d 20 6c 69 73 74 2e 74 6d 70 2e 5f 69 6e 74 = list.tmp._int
0790: 3b 0a 20 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 ;. } else. if
07a0: 28 6c 69 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f (list.rtype == _
07b0: 5f 56 41 75 69 6e 74 29 20 7b 0a 20 20 20 20 69 _VAuint) {. i
07c0: 72 65 74 20 3d 20 6c 69 73 74 2e 74 6d 70 2e 5f ret = list.tmp._
07d0: 75 69 6e 74 3b 0a 20 20 7d 20 65 6c 73 65 0a 20 uint;. } else.
07e0: 20 69 66 20 28 6c 69 73 74 2e 72 74 79 70 65 20 if (list.rtype
07f0: 3d 3d 20 5f 5f 56 41 6c 6f 6e 67 29 20 7b 0a 20 == __VAlong) {.
0800: 20 20 20 69 72 65 74 20 3d 20 6c 69 73 74 2e 74 iret = list.t
0810: 6d 70 2e 5f 6c 6f 6e 67 3b 0a 20 20 7d 20 65 6c mp._long;. } el
0820: 73 65 0a 20 20 69 66 20 28 6c 69 73 74 2e 72 74 se. if (list.rt
0830: 79 70 65 20 3d 3d 20 5f 5f 56 41 75 6c 6f 6e 67 ype == __VAulong
0840: 29 20 7b 0a 20 20 20 20 69 72 65 74 20 3d 20 6c ) {. iret = l
0850: 69 73 74 2e 74 6d 70 2e 5f 75 6c 6f 6e 67 3b 0a ist.tmp._ulong;.
0860: 20 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 28 6c } else. if (l
0870: 69 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f 5f 56 ist.rtype == __V
0880: 41 6c 6f 6e 67 6c 6f 6e 67 20 7c 7c 20 6c 69 73 Alonglong || lis
0890: 74 2e 72 74 79 70 65 20 3d 3d 20 5f 5f 56 41 75 t.rtype == __VAu
08a0: 6c 6f 6e 67 6c 6f 6e 67 29 20 7b 0a 20 20 20 20 longlong) {.
08b0: 69 72 65 74 20 20 3d 20 28 28 5f 5f 76 61 77 6f iret = ((__vawo
08c0: 72 64 20 2a 29 20 26 6c 69 73 74 2e 74 6d 70 2e rd *) &list.tmp.
08d0: 5f 6c 6f 6e 67 6c 6f 6e 67 29 5b 30 5d 3b 0a 20 _longlong)[0];.
08e0: 20 20 20 69 72 65 74 32 20 3d 20 28 28 5f 5f 76 iret2 = ((__v
08f0: 61 77 6f 72 64 20 2a 29 20 26 6c 69 73 74 2e 74 aword *) &list.t
0900: 6d 70 2e 5f 6c 6f 6e 67 6c 6f 6e 67 29 5b 31 5d mp._longlong)[1]
0910: 3b 0a 20 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 ;. } else. if
0920: 28 6c 69 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f (list.rtype == _
0930: 5f 56 41 66 6c 6f 61 74 29 20 7b 0a 20 20 20 20 _VAfloat) {.
0940: 69 66 20 28 6c 69 73 74 2e 66 6c 61 67 73 20 26 if (list.flags &
0950: 20 5f 5f 56 41 5f 46 52 45 47 5f 46 4c 4f 41 54 __VA_FREG_FLOAT
0960: 5f 52 45 54 55 52 4e 29 20 7b 0a 20 20 20 20 20 _RETURN) {.
0970: 20 66 70 5f 66 72 65 74 20 3d 20 6c 69 73 74 2e fp_fret = list.
0980: 74 6d 70 2e 5f 66 6c 6f 61 74 3b 0a 20 20 20 20 tmp._float;.
0990: 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20 69 } else {. i
09a0: 66 20 28 6c 69 73 74 2e 66 6c 61 67 73 20 26 20 f (list.flags &
09b0: 5f 5f 56 41 5f 53 55 4e 43 43 5f 46 4c 4f 41 54 __VA_SUNCC_FLOAT
09c0: 5f 52 45 54 55 52 4e 29 20 7b 0a 20 20 20 20 20 _RETURN) {.
09d0: 20 20 20 64 72 65 74 20 3d 20 28 64 6f 75 62 6c dret = (doubl
09e0: 65 29 6c 69 73 74 2e 74 6d 70 2e 5f 66 6c 6f 61 e)list.tmp._floa
09f0: 74 3b 0a 20 20 20 20 20 20 7d 20 65 6c 73 65 20 t;. } else
0a00: 7b 0a 20 20 20 20 20 20 20 20 66 72 65 74 20 3d {. fret =
0a10: 20 6c 69 73 74 2e 74 6d 70 2e 5f 66 6c 6f 61 74 list.tmp._float
0a20: 3b 0a 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 0a ;. }. }.
0a30: 20 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 28 6c } else. if (l
0a40: 69 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f 5f 56 ist.rtype == __V
0a50: 41 64 6f 75 62 6c 65 29 20 7b 0a 20 20 20 20 69 Adouble) {. i
0a60: 66 20 28 6c 69 73 74 2e 66 6c 61 67 73 20 26 20 f (list.flags &
0a70: 5f 5f 56 41 5f 46 52 45 47 5f 46 4c 4f 41 54 5f __VA_FREG_FLOAT_
0a80: 52 45 54 55 52 4e 29 20 7b 0a 20 20 20 20 20 20 RETURN) {.
0a90: 66 70 5f 64 72 65 74 20 3d 20 6c 69 73 74 2e 74 fp_dret = list.t
0aa0: 6d 70 2e 5f 64 6f 75 62 6c 65 3b 0a 20 20 20 20 mp._double;.
0ab0: 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20 64 } else {. d
0ac0: 72 65 74 20 3d 20 6c 69 73 74 2e 74 6d 70 2e 5f ret = list.tmp._
0ad0: 64 6f 75 62 6c 65 3b 0a 20 20 20 20 7d 0a 20 20 double;. }.
0ae0: 7d 20 65 6c 73 65 0a 20 20 69 66 20 28 6c 69 73 } else. if (lis
0af0: 74 2e 72 74 79 70 65 20 3d 3d 20 5f 5f 56 41 76 t.rtype == __VAv
0b00: 6f 69 64 70 29 20 7b 0a 20 20 20 20 70 72 65 74 oidp) {. pret
0b10: 20 3d 20 69 72 65 74 20 3d 20 28 6c 6f 6e 67 29 = iret = (long)
0b20: 6c 69 73 74 2e 74 6d 70 2e 5f 70 74 72 3b 0a 20 list.tmp._ptr;.
0b30: 20 7d 20 65 6c 73 65 0a 20 20 69 66 20 28 6c 69 } else. if (li
0b40: 73 74 2e 72 74 79 70 65 20 3d 3d 20 5f 5f 56 41 st.rtype == __VA
0b50: 73 74 72 75 63 74 29 20 7b 0a 20 20 20 20 2f 2a struct) {. /*
0b60: 20 4e 42 3a 20 4f 6e 20 6d 36 38 6b 2c 20 61 6c NB: On m68k, al
0b70: 6c 20 73 74 72 75 63 74 75 72 65 20 73 69 7a 65 l structure size
0b80: 73 20 61 72 65 20 64 69 76 69 73 69 62 6c 65 20 s are divisible
0b90: 62 79 20 32 2e 20 2a 2f 0a 20 20 20 20 69 66 20 by 2. */. if
0ba0: 28 6c 69 73 74 2e 66 6c 61 67 73 20 26 20 5f 5f (list.flags & __
0bb0: 56 41 5f 52 45 47 49 53 54 45 52 5f 53 54 52 55 VA_REGISTER_STRU
0bc0: 43 54 5f 52 45 54 55 52 4e 29 20 7b 0a 20 20 20 CT_RETURN) {.
0bd0: 20 20 20 69 66 20 28 6c 69 73 74 2e 72 73 69 7a if (list.rsiz
0be0: 65 20 3d 3d 20 73 69 7a 65 6f 66 28 63 68 61 72 e == sizeof(char
0bf0: 29 29 20 7b 20 2f 2a 20 63 61 6e 27 74 20 6f 63 )) { /* can't oc
0c00: 63 75 72 20 2a 2f 0a 20 20 20 20 20 20 20 20 69 cur */. i
0c10: 72 65 74 20 3d 20 2a 28 75 6e 73 69 67 6e 65 64 ret = *(unsigned
0c20: 20 63 68 61 72 20 2a 29 20 6c 69 73 74 2e 72 61 char *) list.ra
0c30: 64 64 72 3b 0a 20 20 20 20 20 20 20 20 67 6f 74 ddr;. got
0c40: 6f 20 64 6f 6e 65 3b 0a 20 20 20 20 20 20 7d 20 o done;. }
0c50: 65 6c 73 65 0a 20 20 20 20 20 20 69 66 20 28 6c else. if (l
0c60: 69 73 74 2e 72 73 69 7a 65 20 3d 3d 20 73 69 7a ist.rsize == siz
0c70: 65 6f 66 28 73 68 6f 72 74 29 29 20 7b 0a 20 20 eof(short)) {.
0c80: 20 20 20 20 20 20 69 72 65 74 20 3d 20 2a 28 75 iret = *(u
0c90: 6e 73 69 67 6e 65 64 20 73 68 6f 72 74 20 2a 29 nsigned short *)
0ca0: 20 6c 69 73 74 2e 72 61 64 64 72 3b 0a 20 20 20 list.raddr;.
0cb0: 20 20 20 20 20 67 6f 74 6f 20 64 6f 6e 65 3b 0a goto done;.
0cc0: 20 20 20 20 20 20 7d 20 65 6c 73 65 0a 20 20 20 } else.
0cd0: 20 20 20 69 66 20 28 6c 69 73 74 2e 72 73 69 7a if (list.rsiz
0ce0: 65 20 3d 3d 20 73 69 7a 65 6f 66 28 69 6e 74 29 e == sizeof(int)
0cf0: 29 20 7b 0a 20 20 20 20 20 20 20 20 69 72 65 74 ) {. iret
0d00: 20 3d 20 2a 28 75 6e 73 69 67 6e 65 64 20 69 6e = *(unsigned in
0d10: 74 20 2a 29 20 6c 69 73 74 2e 72 61 64 64 72 3b t *) list.raddr;
0d20: 0a 20 20 20 20 20 20 20 20 67 6f 74 6f 20 64 6f . goto do
0d30: 6e 65 3b 0a 20 20 20 20 20 20 7d 20 65 6c 73 65 ne;. } else
0d40: 0a 20 20 20 20 20 20 69 66 20 28 6c 69 73 74 2e . if (list.
0d50: 72 73 69 7a 65 20 3d 3d 20 32 2a 73 69 7a 65 6f rsize == 2*sizeo
0d60: 66 28 5f 5f 76 61 77 6f 72 64 29 29 20 7b 0a 20 f(__vaword)) {.
0d70: 20 20 20 20 20 20 20 69 72 65 74 20 20 3d 20 28 iret = (
0d80: 28 5f 5f 76 61 77 6f 72 64 20 2a 29 20 6c 69 73 (__vaword *) lis
0d90: 74 2e 72 61 64 64 72 29 5b 30 5d 3b 0a 20 20 20 t.raddr)[0];.
0da0: 20 20 20 20 20 69 72 65 74 32 20 3d 20 28 28 5f iret2 = ((_
0db0: 5f 76 61 77 6f 72 64 20 2a 29 20 6c 69 73 74 2e _vaword *) list.
0dc0: 72 61 64 64 72 29 5b 31 5d 3b 0a 20 20 20 20 20 raddr)[1];.
0dd0: 20 20 20 67 6f 74 6f 20 64 6f 6e 65 3b 0a 20 20 goto done;.
0de0: 20 20 20 20 7d 0a 20 20 20 20 7d 0a 20 20 20 20 }. }.
0df0: 69 66 20 28 6c 69 73 74 2e 66 6c 61 67 73 20 26 if (list.flags &
0e00: 20 5f 5f 56 41 5f 50 43 43 5f 53 54 52 55 43 54 __VA_PCC_STRUCT
0e10: 5f 52 45 54 55 52 4e 29 20 7b 0a 20 20 20 20 20 _RETURN) {.
0e20: 20 2f 2a 20 70 63 63 20 73 74 72 75 63 74 20 72 /* pcc struct r
0e30: 65 74 75 72 6e 20 63 6f 6e 76 65 6e 74 69 6f 6e eturn convention
0e40: 20 2a 2f 0a 20 20 20 20 20 20 70 72 65 74 20 3d */. pret =
0e50: 20 69 72 65 74 20 3d 20 28 6c 6f 6e 67 29 20 6c iret = (long) l
0e60: 69 73 74 2e 72 61 64 64 72 3b 0a 20 20 20 20 7d ist.raddr;. }
0e70: 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20 2f 2a else {. /*
0e80: 20 6e 6f 72 6d 61 6c 20 73 74 72 75 63 74 20 72 normal struct r
0e90: 65 74 75 72 6e 20 63 6f 6e 76 65 6e 74 69 6f 6e eturn convention
0ea0: 20 2a 2f 0a 20 20 20 20 7d 0a 20 20 20 20 64 6f */. }. do
0eb0: 6e 65 3a 20 3b 0a 20 20 7d 0a 7d 0a ne: ;. }.}.