Artifact 3199e3f71b3b7128983d055592d6e0306555ce3f:


0000: 23 69 66 6e 64 65 66 20 5f 61 76 63 61 6c 6c 5f  #ifndef _avcall_
0010: 78 38 36 5f 36 34 5f 63 09 09 09 09 2f 2a 2d 2a  x86_64_c..../*-*
0020: 2d 20 43 20 2d 2a 2d 2a 2f 0a 23 64 65 66 69 6e  - C -*-*/.#defin
0030: 65 20 5f 61 76 63 61 6c 6c 5f 78 38 36 5f 36 34  e _avcall_x86_64
0040: 5f 63 0a 2f 2a 2a 0a 20 20 43 6f 70 79 72 69 67  _c./**.  Copyrig
0050: 68 74 20 31 39 39 33 20 42 69 6c 6c 20 54 72 69  ht 1993 Bill Tri
0060: 67 67 73 2c 20 3c 42 69 6c 6c 2e 54 72 69 67 67  ggs, <Bill.Trigg
0070: 73 40 69 6e 72 69 61 6c 70 65 73 2e 66 72 3e 0a  s@inrialpes.fr>.
0080: 20 20 43 6f 70 79 72 69 67 68 74 20 31 39 39 35    Copyright 1995
0090: 2d 31 39 39 39 2c 20 32 30 30 34 20 42 72 75 6e  -1999, 2004 Brun
00a0: 6f 20 48 61 69 62 6c 65 2c 20 3c 62 72 75 6e 6f  o Haible, <bruno
00b0: 40 63 6c 69 73 70 2e 6f 72 67 3e 0a 0a 20 20 54  @clisp.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 0a 20 20  eneral Public.  
0100: 4c 69 63 65 6e 63 65 20 64 65 73 63 72 69 62 65  Licence describe
0110: 64 20 69 6e 20 74 68 65 20 66 69 6c 65 20 43 4f  d in the file CO
0120: 50 59 49 4e 47 2e 20 43 6f 6e 74 61 63 74 20 74  PYING. Contact t
0130: 68 65 20 61 75 74 68 6f 72 20 69 66 0a 20 20 79  he author if.  y
0140: 6f 75 20 64 6f 6e 27 74 20 68 61 76 65 20 74 68  ou don't have th
0150: 69 73 20 6f 72 20 63 61 6e 27 74 20 6c 69 76 65  is or can't live
0160: 20 77 69 74 68 20 69 74 2e 20 54 68 65 72 65 20   with it. There 
0170: 69 73 20 41 42 53 4f 4c 55 54 45 4c 59 0a 20 20  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 20 6f 6e 20 74 68 69 73 20 73 6f 66 74 77 61  , on this softwa
01b0: 72 65 2e 0a 2a 2a 2f 0a 2f 2a 2d 2d 2d 2d 2d 2d  re..**/./*------
01c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
01d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
01e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
01f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0200: 0a 20 20 21 21 21 20 54 48 49 53 20 52 4f 55 54  .  !!! THIS ROUT
0210: 49 4e 45 20 4d 55 53 54 20 42 45 20 43 4f 4d 50  INE MUST BE COMP
0220: 49 4c 45 44 20 67 63 63 20 2d 4f 20 2d 66 6e 6f  ILED gcc -O -fno
0230: 2d 6f 6d 69 74 2d 66 72 61 6d 65 2d 70 6f 69 6e  -omit-frame-poin
0240: 74 65 72 20 21 21 21 0a 0a 20 20 46 6f 72 65 69  ter !!!..  Forei
0250: 67 6e 20 66 75 6e 63 74 69 6f 6e 20 69 6e 74 65  gn function inte
0260: 72 66 61 63 65 20 66 6f 72 20 61 20 4c 69 6e 75  rface for a Linu
0270: 78 20 78 38 36 5f 36 34 20 28 61 2e 6b 2e 61 2e  x x86_64 (a.k.a.
0280: 20 61 6d 64 36 34 29 20 77 69 74 68 20 67 63 63   amd64) with gcc
0290: 2e 0a 0a 20 20 54 68 69 73 20 63 61 6c 6c 73 20  ...  This calls 
02a0: 61 20 43 20 66 75 6e 63 74 69 6f 6e 20 77 69 74  a C function wit
02b0: 68 20 61 6e 20 61 72 67 75 6d 65 6e 74 20 6c 69  h an argument li
02c0: 73 74 20 62 75 69 6c 74 20 75 70 20 75 73 69 6e  st built up usin
02d0: 67 20 6d 61 63 72 6f 73 0a 20 20 64 65 66 69 6e  g macros.  defin
02e0: 65 64 20 69 6e 20 61 76 5f 63 61 6c 6c 2e 68 2e  ed in av_call.h.
02f0: 0a 0a 20 20 78 38 36 5f 36 34 20 41 72 67 75 6d  ..  x86_64 Argum
0300: 65 6e 74 20 50 61 73 73 69 6e 67 20 43 6f 6e 76  ent Passing Conv
0310: 65 6e 74 69 6f 6e 73 20 61 72 65 20 64 6f 63 75  entions are docu
0320: 6d 65 6e 74 65 64 20 69 6e 0a 20 20 68 74 74 70  mented in.  http
0330: 3a 2f 2f 77 77 77 2e 78 38 36 2d 36 34 2e 6f 72  ://www.x86-64.or
0340: 67 2f 61 62 69 2e 70 64 66 2e 0a 0a 20 20 55 70  g/abi.pdf...  Up
0350: 20 74 6f 20 73 69 78 20 77 6f 72 64 73 20 61 72   to six words ar
0360: 65 20 70 61 73 73 65 64 20 69 6e 20 69 6e 74 65  e passed in inte
0370: 67 65 72 20 72 65 67 69 73 74 65 72 73 20 28 25  ger registers (%
0380: 72 64 69 2c 20 25 72 73 69 2c 20 25 72 64 78 2c  rdi, %rsi, %rdx,
0390: 20 25 72 63 78 2c 0a 20 20 25 72 38 2c 20 25 72   %rcx,.  %r8, %r
03a0: 39 29 2e 20 55 70 20 74 6f 20 38 20 66 6c 6f 61  9). Up to 8 floa
03b0: 74 2f 64 6f 75 62 6c 65 20 61 72 67 75 6d 65 6e  t/double argumen
03c0: 74 73 20 61 72 65 20 70 61 73 73 65 64 20 69 6e  ts are passed in
03d0: 20 53 53 45 20 72 65 67 69 73 74 65 72 73 0a 20   SSE registers. 
03e0: 20 28 25 78 6d 6d 30 2e 2e 25 78 6d 6d 37 29 2e   (%xmm0..%xmm7).
03f0: 20 56 61 72 61 72 67 73 20 66 75 6e 63 74 69 6f   Varargs functio
0400: 6e 73 20 65 78 70 65 63 74 20 61 6e 20 75 70 70  ns expect an upp
0410: 65 72 20 62 6f 75 6e 64 20 66 6f 72 20 74 68 65  er bound for the
0420: 20 6e 75 6d 62 65 72 0a 20 20 6f 66 20 53 53 45   number.  of SSE
0430: 20 72 65 67 69 73 74 65 72 20 61 72 67 75 6d 65   register argume
0440: 6e 74 73 20 69 6e 20 25 61 6c 20 28 69 6e 20 74  nts in %al (in t
0450: 68 65 20 72 61 6e 67 65 20 30 2e 2e 38 29 2e 20  he range 0..8). 
0460: 41 6c 6c 20 61 72 67 75 6d 65 6e 74 73 0a 20 20  All arguments.  
0470: 61 72 65 20 70 61 73 73 65 64 20 6f 6e 20 74 68  are passed on th
0480: 65 20 73 74 61 63 6b 20 77 69 74 68 20 77 6f 72  e stack with wor
0490: 64 20 61 6c 69 67 6e 6d 65 6e 74 2e 20 53 74 72  d alignment. Str
04a0: 75 63 74 75 72 65 20 61 72 67 73 20 61 72 65 20  ucture args are 
04b0: 70 61 73 73 65 64 0a 20 20 61 73 20 74 72 75 65  passed.  as true
04c0: 20 73 74 72 75 63 74 75 72 65 73 20 65 6d 62 65   structures embe
04d0: 64 64 65 64 20 69 6e 20 74 68 65 20 61 72 67 75  dded in the argu
04e0: 6d 65 6e 74 20 73 74 61 63 6b 2e 20 0a 0a 20 20  ment stack. ..  
04f0: 49 6e 74 65 67 65 72 73 20 61 72 65 20 72 65 74  Integers are ret
0500: 75 72 6e 65 64 20 69 6e 20 25 72 61 78 2c 20 25  urned in %rax, %
0510: 72 64 78 2e 20 46 6c 6f 61 74 2f 64 6f 75 62 6c  rdx. Float/doubl
0520: 65 20 76 61 6c 75 65 73 20 61 72 65 20 72 65 74  e values are ret
0530: 75 72 6e 65 64 0a 20 20 69 6e 20 25 78 6d 6d 30  urned.  in %xmm0
0540: 2c 20 25 78 6d 6d 31 2e 20 54 6f 20 72 65 74 75  , %xmm1. To retu
0550: 72 6e 20 61 20 73 74 72 75 63 74 75 72 65 2c 20  rn a structure, 
0560: 74 68 65 20 63 61 6c 6c 65 64 20 66 75 6e 63 74  the called funct
0570: 69 6f 6e 20 63 6f 70 69 65 73 20 74 68 65 0a 20  ion copies the. 
0580: 20 76 61 6c 75 65 20 74 6f 20 73 70 61 63 65 20   value to space 
0590: 70 6f 69 6e 74 65 64 20 74 6f 20 62 79 20 69 74  pointed to by it
05a0: 73 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e 74  s first argument
05b0: 2c 20 61 6e 64 20 61 6c 6c 20 6f 74 68 65 72 20  , and all other 
05c0: 61 72 67 75 6d 65 6e 74 73 0a 20 20 61 72 65 20  arguments.  are 
05d0: 73 68 69 66 74 65 64 20 64 6f 77 6e 20 62 79 20  shifted down by 
05e0: 6f 6e 65 2e 0a 20 20 2d 2d 2d 2d 2d 2d 2d 2d 2d  one..  ---------
05f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2a 2f 0a  -------------*/.
0630: 23 69 6e 63 6c 75 64 65 20 22 61 76 63 61 6c 6c  #include "avcall
0640: 2e 68 2e 69 6e 22 0a 0a 23 64 65 66 69 6e 65 20  .h.in"..#define 
0650: 52 45 54 55 52 4e 28 54 59 50 45 2c 56 41 4c 29  RETURN(TYPE,VAL)
0660: 09 28 2a 28 54 59 50 45 2a 29 6c 2d 3e 72 61 64  .(*(TYPE*)l->rad
0670: 64 72 20 3d 20 28 54 59 50 45 29 28 56 41 4c 29  dr = (TYPE)(VAL)
0680: 29 0a 0a 72 65 67 69 73 74 65 72 20 5f 5f 61 76  )..register __av
0690: 77 6f 72 64 20 69 61 72 67 31 20 5f 5f 61 73 6d  word iarg1 __asm
06a0: 5f 5f 28 22 72 64 69 22 29 3b 0a 72 65 67 69 73  __("rdi");.regis
06b0: 74 65 72 20 5f 5f 61 76 77 6f 72 64 20 69 61 72  ter __avword iar
06c0: 67 32 20 5f 5f 61 73 6d 5f 5f 28 22 72 73 69 22  g2 __asm__("rsi"
06d0: 29 3b 0a 72 65 67 69 73 74 65 72 20 5f 5f 61 76  );.register __av
06e0: 77 6f 72 64 20 69 61 72 67 33 20 5f 5f 61 73 6d  word iarg3 __asm
06f0: 5f 5f 28 22 72 64 78 22 29 3b 0a 72 65 67 69 73  __("rdx");.regis
0700: 74 65 72 20 5f 5f 61 76 77 6f 72 64 20 69 61 72  ter __avword iar
0710: 67 34 20 5f 5f 61 73 6d 5f 5f 28 22 72 63 78 22  g4 __asm__("rcx"
0720: 29 3b 0a 72 65 67 69 73 74 65 72 20 5f 5f 61 76  );.register __av
0730: 77 6f 72 64 20 69 61 72 67 35 20 5f 5f 61 73 6d  word iarg5 __asm
0740: 5f 5f 28 22 72 38 22 29 3b 0a 72 65 67 69 73 74  __("r8");.regist
0750: 65 72 20 5f 5f 61 76 77 6f 72 64 20 69 61 72 67  er __avword iarg
0760: 36 20 5f 5f 61 73 6d 5f 5f 28 22 72 39 22 29 3b  6 __asm__("r9");
0770: 0a 0a 72 65 67 69 73 74 65 72 20 64 6f 75 62 6c  ..register doubl
0780: 65 20 66 61 72 67 31 20 5f 5f 61 73 6d 5f 5f 28  e farg1 __asm__(
0790: 22 78 6d 6d 30 22 29 3b 0a 72 65 67 69 73 74 65  "xmm0");.registe
07a0: 72 20 64 6f 75 62 6c 65 20 66 61 72 67 32 20 5f  r double farg2 _
07b0: 5f 61 73 6d 5f 5f 28 22 78 6d 6d 31 22 29 3b 0a  _asm__("xmm1");.
07c0: 72 65 67 69 73 74 65 72 20 64 6f 75 62 6c 65 20  register double 
07d0: 66 61 72 67 33 20 5f 5f 61 73 6d 5f 5f 28 22 78  farg3 __asm__("x
07e0: 6d 6d 32 22 29 3b 0a 72 65 67 69 73 74 65 72 20  mm2");.register 
07f0: 64 6f 75 62 6c 65 20 66 61 72 67 34 20 5f 5f 61  double farg4 __a
0800: 73 6d 5f 5f 28 22 78 6d 6d 33 22 29 3b 0a 72 65  sm__("xmm3");.re
0810: 67 69 73 74 65 72 20 64 6f 75 62 6c 65 20 66 61  gister double fa
0820: 72 67 35 20 5f 5f 61 73 6d 5f 5f 28 22 78 6d 6d  rg5 __asm__("xmm
0830: 34 22 29 3b 0a 72 65 67 69 73 74 65 72 20 64 6f  4");.register do
0840: 75 62 6c 65 20 66 61 72 67 36 20 5f 5f 61 73 6d  uble farg6 __asm
0850: 5f 5f 28 22 78 6d 6d 35 22 29 3b 0a 72 65 67 69  __("xmm5");.regi
0860: 73 74 65 72 20 64 6f 75 62 6c 65 20 66 61 72 67  ster double farg
0870: 37 20 5f 5f 61 73 6d 5f 5f 28 22 78 6d 6d 36 22  7 __asm__("xmm6"
0880: 29 3b 0a 72 65 67 69 73 74 65 72 20 64 6f 75 62  );.register doub
0890: 6c 65 20 66 61 72 67 38 20 5f 5f 61 73 6d 5f 5f  le farg8 __asm__
08a0: 28 22 78 6d 6d 37 22 29 3b 0a 0a 69 6e 74 0a 5f  ("xmm7");..int._
08b0: 5f 62 75 69 6c 74 69 6e 5f 61 76 63 61 6c 6c 28  _builtin_avcall(
08c0: 61 76 5f 61 6c 69 73 74 2a 20 6c 29 0a 7b 0a 20  av_alist* l).{. 
08d0: 20 72 65 67 69 73 74 65 72 20 5f 5f 61 76 77 6f   register __avwo
08e0: 72 64 2a 09 73 70 09 5f 5f 61 73 6d 5f 5f 28 22  rd*.sp.__asm__("
08f0: 72 73 70 22 29 3b 09 2f 2a 20 43 20 6e 61 6d 65  rsp");./* C name
0900: 73 20 66 6f 72 20 72 65 67 69 73 74 65 72 73 20  s for registers 
0910: 2a 2f 0a 20 20 72 65 67 69 73 74 65 72 20 5f 5f  */.  register __
0920: 61 76 77 6f 72 64 09 69 72 65 74 09 5f 5f 61 73  avword.iret.__as
0930: 6d 5f 5f 28 22 72 61 78 22 29 3b 0a 20 20 72 65  m__("rax");.  re
0940: 67 69 73 74 65 72 20 5f 5f 61 76 77 6f 72 64 09  gister __avword.
0950: 69 72 65 74 32 09 5f 5f 61 73 6d 5f 5f 28 22 72  iret2.__asm__("r
0960: 64 78 22 29 3b 0a 20 20 72 65 67 69 73 74 65 72  dx");.  register
0970: 20 64 6f 75 62 6c 65 09 64 72 65 74 09 5f 5f 61   double.dret.__a
0980: 73 6d 5f 5f 28 22 78 6d 6d 30 22 29 3b 0a 0a 20  sm__("xmm0");.. 
0990: 20 5f 5f 61 76 77 6f 72 64 2a 20 61 72 67 66 72   __avword* argfr
09a0: 61 6d 65 20 3d 20 28 73 70 20 2d 3d 20 5f 5f 41  ame = (sp -= __A
09b0: 56 5f 41 4c 49 53 54 5f 57 4f 52 44 53 29 3b 20  V_ALIST_WORDS); 
09c0: 2f 2a 20 6d 61 6b 65 20 72 6f 6f 6d 20 66 6f 72  /* make room for
09d0: 20 61 72 67 75 6d 65 6e 74 20 6c 69 73 74 20 2a   argument list *
09e0: 2f 0a 20 20 69 6e 74 20 61 72 67 6c 65 6e 20 3d  /.  int arglen =
09f0: 20 6c 2d 3e 61 70 74 72 20 2d 20 6c 2d 3e 61 72   l->aptr - l->ar
0a00: 67 73 3b 0a 20 20 69 6e 74 20 66 61 72 67 6c 65  gs;.  int fargle
0a10: 6e 20 3d 20 6c 2d 3e 66 61 70 74 72 20 2d 20 6c  n = l->faptr - l
0a20: 2d 3e 66 61 72 67 73 3b 0a 20 20 5f 5f 61 76 77  ->fargs;.  __avw
0a30: 6f 72 64 20 69 2c 20 69 32 3b 0a 0a 20 20 66 6f  ord i, i2;..  fo
0a40: 72 20 28 69 20 3d 20 30 3b 20 69 20 3c 20 61 72  r (i = 0; i < ar
0a50: 67 6c 65 6e 3b 20 69 2b 2b 29 09 09 2f 2a 20 70  glen; i++)../* p
0a60: 75 73 68 20 66 75 6e 63 74 69 6f 6e 20 61 72 67  ush function arg
0a70: 73 20 6f 6e 74 6f 20 73 74 61 63 6b 20 2a 2f 0a  s onto stack */.
0a80: 20 20 20 20 61 72 67 66 72 61 6d 65 5b 69 5d 20      argframe[i] 
0a90: 3d 20 6c 2d 3e 61 72 67 73 5b 69 5d 3b 0a 0a 20  = l->args[i];.. 
0aa0: 20 2f 2a 20 70 75 74 20 36 20 69 6e 74 65 67 65   /* put 6 intege
0ab0: 72 20 61 72 67 73 20 69 6e 74 6f 20 72 65 67 69  r args into regi
0ac0: 73 74 65 72 73 20 2a 2f 0a 20 20 69 61 72 67 31  sters */.  iarg1
0ad0: 20 3d 20 6c 2d 3e 69 61 72 67 73 5b 30 5d 3b 0a   = l->iargs[0];.
0ae0: 20 20 69 61 72 67 32 20 3d 20 6c 2d 3e 69 61 72    iarg2 = l->iar
0af0: 67 73 5b 31 5d 3b 0a 20 20 69 61 72 67 33 20 3d  gs[1];.  iarg3 =
0b00: 20 6c 2d 3e 69 61 72 67 73 5b 32 5d 3b 0a 20 20   l->iargs[2];.  
0b10: 69 61 72 67 34 20 3d 20 6c 2d 3e 69 61 72 67 73  iarg4 = l->iargs
0b20: 5b 33 5d 3b 0a 20 20 69 61 72 67 35 20 3d 20 6c  [3];.  iarg5 = l
0b30: 2d 3e 69 61 72 67 73 5b 34 5d 3b 0a 20 20 69 61  ->iargs[4];.  ia
0b40: 72 67 36 20 3d 20 6c 2d 3e 69 61 72 67 73 5b 35  rg6 = l->iargs[5
0b50: 5d 3b 0a 0a 20 20 2f 2a 20 43 61 6c 6c 20 66 75  ];..  /* Call fu
0b60: 6e 63 74 69 6f 6e 2e 20 20 49 74 27 73 20 4f 4b  nction.  It's OK
0b70: 20 74 6f 20 70 61 73 73 20 38 20 76 61 6c 75 65   to pass 8 value
0b80: 73 20 69 6e 20 53 53 45 20 72 65 67 69 73 74 65  s in SSE registe
0b90: 72 73 20 65 76 65 6e 20 69 66 20 74 68 65 0a 20  rs even if the. 
0ba0: 20 20 20 20 63 61 6c 6c 65 64 20 66 75 6e 63 74      called funct
0bb0: 69 6f 6e 20 74 61 6b 65 73 20 6c 65 73 73 20 74  ion takes less t
0bc0: 68 61 6e 20 38 20 66 6c 6f 61 74 2f 64 6f 75 62  han 8 float/doub
0bd0: 6c 65 20 61 72 67 75 6d 65 6e 74 73 2e 20 53 69  le arguments. Si
0be0: 6d 69 6c 61 72 6c 79 0a 20 20 20 20 20 66 6f 72  milarly.     for
0bf0: 20 74 68 65 20 69 6e 74 65 67 65 72 20 61 72 67   the integer arg
0c00: 75 6d 65 6e 74 73 2e 20 2a 2f 0a 20 20 69 66 20  uments. */.  if 
0c10: 28 6c 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f 41  (l->rtype == __A
0c20: 56 66 6c 6f 61 74 29 20 7b 0a 20 20 20 20 2a 28  Vfloat) {.    *(
0c30: 66 6c 6f 61 74 2a 29 6c 2d 3e 72 61 64 64 72 20  float*)l->raddr 
0c40: 3d 0a 20 20 20 20 20 20 28 2a 28 66 6c 6f 61 74  =.      (*(float
0c50: 28 2a 29 28 29 29 6c 2d 3e 66 75 6e 63 29 28 66  (*)())l->func)(f
0c60: 61 72 67 6c 65 6e 20 3e 20 30 20 3f 20 6c 2d 3e  arglen > 0 ? l->
0c70: 66 61 72 67 73 5b 30 5d 20 3a 20 30 2e 30 2c 0a  fargs[0] : 0.0,.
0c80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0c90: 20 20 20 20 20 20 20 20 20 20 20 20 20 66 61 72               far
0ca0: 67 6c 65 6e 20 3e 20 31 20 3f 20 6c 2d 3e 66 61  glen > 1 ? l->fa
0cb0: 72 67 73 5b 31 5d 20 3a 20 30 2e 30 2c 0a 20 20  rgs[1] : 0.0,.  
0cc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0cd0: 20 20 20 20 20 20 20 20 20 20 20 66 61 72 67 6c             fargl
0ce0: 65 6e 20 3e 20 32 20 3f 20 6c 2d 3e 66 61 72 67  en > 2 ? l->farg
0cf0: 73 5b 32 5d 20 3a 20 30 2e 30 2c 0a 20 20 20 20  s[2] : 0.0,.    
0d00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0d10: 20 20 20 20 20 20 20 20 20 66 61 72 67 6c 65 6e           farglen
0d20: 20 3e 20 33 20 3f 20 6c 2d 3e 66 61 72 67 73 5b   > 3 ? l->fargs[
0d30: 33 5d 20 3a 20 30 2e 30 2c 0a 20 20 20 20 20 20  3] : 0.0,.      
0d40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0d50: 20 20 20 20 20 20 20 66 61 72 67 6c 65 6e 20 3e         farglen >
0d60: 20 34 20 3f 20 6c 2d 3e 66 61 72 67 73 5b 34 5d   4 ? l->fargs[4]
0d70: 20 3a 20 30 2e 30 2c 0a 20 20 20 20 20 20 20 20   : 0.0,.        
0d80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0d90: 20 20 20 20 20 66 61 72 67 6c 65 6e 20 3e 20 35       farglen > 5
0da0: 20 3f 20 6c 2d 3e 66 61 72 67 73 5b 35 5d 20 3a   ? l->fargs[5] :
0db0: 20 30 2e 30 2c 0a 20 20 20 20 20 20 20 20 20 20   0.0,.          
0dc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0dd0: 20 20 20 66 61 72 67 6c 65 6e 20 3e 20 36 20 3f     farglen > 6 ?
0de0: 20 6c 2d 3e 66 61 72 67 73 5b 36 5d 20 3a 20 30   l->fargs[6] : 0
0df0: 2e 30 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20  .0,.            
0e00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0e10: 20 66 61 72 67 6c 65 6e 20 3e 20 37 20 3f 20 6c   farglen > 7 ? l
0e20: 2d 3e 66 61 72 67 73 5b 37 5d 20 3a 20 30 2e 30  ->fargs[7] : 0.0
0e30: 29 3b 0a 20 20 7d 20 65 6c 73 65 0a 20 20 69 66  );.  } else.  if
0e40: 20 28 6c 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f   (l->rtype == __
0e50: 41 56 64 6f 75 62 6c 65 29 20 7b 0a 20 20 20 20  AVdouble) {.    
0e60: 2a 28 64 6f 75 62 6c 65 2a 29 6c 2d 3e 72 61 64  *(double*)l->rad
0e70: 64 72 20 3d 0a 20 20 20 20 20 20 28 2a 28 64 6f  dr =.      (*(do
0e80: 75 62 6c 65 28 2a 29 28 29 29 6c 2d 3e 66 75 6e  uble(*)())l->fun
0e90: 63 29 28 66 61 72 67 6c 65 6e 20 3e 20 30 20 3f  c)(farglen > 0 ?
0ea0: 20 6c 2d 3e 66 61 72 67 73 5b 30 5d 20 3a 20 30   l->fargs[0] : 0
0eb0: 2e 30 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20  .0,.            
0ec0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0ed0: 20 20 66 61 72 67 6c 65 6e 20 3e 20 31 20 3f 20    farglen > 1 ? 
0ee0: 6c 2d 3e 66 61 72 67 73 5b 31 5d 20 3a 20 30 2e  l->fargs[1] : 0.
0ef0: 30 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  0,.             
0f00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0f10: 20 66 61 72 67 6c 65 6e 20 3e 20 32 20 3f 20 6c   farglen > 2 ? l
0f20: 2d 3e 66 61 72 67 73 5b 32 5d 20 3a 20 30 2e 30  ->fargs[2] : 0.0
0f30: 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ,.              
0f40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0f50: 66 61 72 67 6c 65 6e 20 3e 20 33 20 3f 20 6c 2d  farglen > 3 ? l-
0f60: 3e 66 61 72 67 73 5b 33 5d 20 3a 20 30 2e 30 2c  >fargs[3] : 0.0,
0f70: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
0f80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66                 f
0f90: 61 72 67 6c 65 6e 20 3e 20 34 20 3f 20 6c 2d 3e  arglen > 4 ? l->
0fa0: 66 61 72 67 73 5b 34 5d 20 3a 20 30 2e 30 2c 0a  fargs[4] : 0.0,.
0fb0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0fc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 61                fa
0fd0: 72 67 6c 65 6e 20 3e 20 35 20 3f 20 6c 2d 3e 66  rglen > 5 ? l->f
0fe0: 61 72 67 73 5b 35 5d 20 3a 20 30 2e 30 2c 0a 20  args[5] : 0.0,. 
0ff0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1000: 20 20 20 20 20 20 20 20 20 20 20 20 20 66 61 72               far
1010: 67 6c 65 6e 20 3e 20 36 20 3f 20 6c 2d 3e 66 61  glen > 6 ? l->fa
1020: 72 67 73 5b 36 5d 20 3a 20 30 2e 30 2c 0a 20 20  rgs[6] : 0.0,.  
1030: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1040: 20 20 20 20 20 20 20 20 20 20 20 20 66 61 72 67              farg
1050: 6c 65 6e 20 3e 20 37 20 3f 20 6c 2d 3e 66 61 72  len > 7 ? l->far
1060: 67 73 5b 37 5d 20 3a 20 30 2e 30 29 3b 0a 20 20  gs[7] : 0.0);.  
1070: 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 69 20 3d  } else {.    i =
1080: 20 28 2a 6c 2d 3e 66 75 6e 63 29 28 66 61 72 67   (*l->func)(farg
1090: 6c 65 6e 20 3e 20 30 20 3f 20 6c 2d 3e 66 61 72  len > 0 ? l->far
10a0: 67 73 5b 30 5d 20 3a 20 30 2e 30 2c 0a 20 20 20  gs[0] : 0.0,.   
10b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
10c0: 66 61 72 67 6c 65 6e 20 3e 20 31 20 3f 20 6c 2d  farglen > 1 ? l-
10d0: 3e 66 61 72 67 73 5b 31 5d 20 3a 20 30 2e 30 2c  >fargs[1] : 0.0,
10e0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
10f0: 20 20 20 20 66 61 72 67 6c 65 6e 20 3e 20 32 20      farglen > 2 
1100: 3f 20 6c 2d 3e 66 61 72 67 73 5b 32 5d 20 3a 20  ? l->fargs[2] : 
1110: 30 2e 30 2c 0a 20 20 20 20 20 20 20 20 20 20 20  0.0,.           
1120: 20 20 20 20 20 20 20 20 66 61 72 67 6c 65 6e 20          farglen 
1130: 3e 20 33 20 3f 20 6c 2d 3e 66 61 72 67 73 5b 33  > 3 ? l->fargs[3
1140: 5d 20 3a 20 30 2e 30 2c 0a 20 20 20 20 20 20 20  ] : 0.0,.       
1150: 20 20 20 20 20 20 20 20 20 20 20 20 66 61 72 67              farg
1160: 6c 65 6e 20 3e 20 34 20 3f 20 6c 2d 3e 66 61 72  len > 4 ? l->far
1170: 67 73 5b 34 5d 20 3a 20 30 2e 30 2c 0a 20 20 20  gs[4] : 0.0,.   
1180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1190: 66 61 72 67 6c 65 6e 20 3e 20 35 20 3f 20 6c 2d  farglen > 5 ? l-
11a0: 3e 66 61 72 67 73 5b 35 5d 20 3a 20 30 2e 30 2c  >fargs[5] : 0.0,
11b0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
11c0: 20 20 20 20 66 61 72 67 6c 65 6e 20 3e 20 36 20      farglen > 6 
11d0: 3f 20 6c 2d 3e 66 61 72 67 73 5b 36 5d 20 3a 20  ? l->fargs[6] : 
11e0: 30 2e 30 2c 0a 20 20 20 20 20 20 20 20 20 20 20  0.0,.           
11f0: 20 20 20 20 20 20 20 20 66 61 72 67 6c 65 6e 20          farglen 
1200: 3e 20 37 20 3f 20 6c 2d 3e 66 61 72 67 73 5b 37  > 7 ? l->fargs[7
1210: 5d 20 3a 20 30 2e 30 29 3b 0a 20 20 20 20 69 32  ] : 0.0);.    i2
1220: 20 3d 20 69 72 65 74 32 3b 0a 0a 20 20 20 20 2f   = iret2;..    /
1230: 2a 20 73 61 76 65 20 72 65 74 75 72 6e 20 76 61  * save return va
1240: 6c 75 65 20 2a 2f 0a 20 20 20 20 69 66 20 28 6c  lue */.    if (l
1250: 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f 41 56 76  ->rtype == __AVv
1260: 6f 69 64 29 20 7b 0a 20 20 20 20 7d 20 65 6c 73  oid) {.    } els
1270: 65 0a 20 20 20 20 69 66 20 28 6c 2d 3e 72 74 79  e.    if (l->rty
1280: 70 65 20 3d 3d 20 5f 5f 41 56 77 6f 72 64 29 20  pe == __AVword) 
1290: 7b 0a 20 20 20 20 20 20 52 45 54 55 52 4e 28 5f  {.      RETURN(_
12a0: 5f 61 76 77 6f 72 64 2c 20 69 29 3b 0a 20 20 20  _avword, i);.   
12b0: 20 7d 20 65 6c 73 65 0a 20 20 20 20 69 66 20 28   } else.    if (
12c0: 6c 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f 41 56  l->rtype == __AV
12d0: 63 68 61 72 29 20 7b 0a 20 20 20 20 20 20 52 45  char) {.      RE
12e0: 54 55 52 4e 28 63 68 61 72 2c 20 69 29 3b 0a 20  TURN(char, i);. 
12f0: 20 20 20 7d 20 65 6c 73 65 0a 20 20 20 20 69 66     } else.    if
1300: 20 28 6c 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f   (l->rtype == __
1310: 41 56 73 63 68 61 72 29 20 7b 0a 20 20 20 20 20  AVschar) {.     
1320: 20 52 45 54 55 52 4e 28 73 69 67 6e 65 64 20 63   RETURN(signed c
1330: 68 61 72 2c 20 69 29 3b 0a 20 20 20 20 7d 20 65  har, i);.    } e
1340: 6c 73 65 0a 20 20 20 20 69 66 20 28 6c 2d 3e 72  lse.    if (l->r
1350: 74 79 70 65 20 3d 3d 20 5f 5f 41 56 75 63 68 61  type == __AVucha
1360: 72 29 20 7b 0a 20 20 20 20 20 20 52 45 54 55 52  r) {.      RETUR
1370: 4e 28 75 6e 73 69 67 6e 65 64 20 63 68 61 72 2c  N(unsigned char,
1380: 20 69 29 3b 0a 20 20 20 20 7d 20 65 6c 73 65 0a   i);.    } else.
1390: 20 20 20 20 69 66 20 28 6c 2d 3e 72 74 79 70 65      if (l->rtype
13a0: 20 3d 3d 20 5f 5f 41 56 73 68 6f 72 74 29 20 7b   == __AVshort) {
13b0: 0a 20 20 20 20 20 20 52 45 54 55 52 4e 28 73 68  .      RETURN(sh
13c0: 6f 72 74 2c 20 69 29 3b 0a 20 20 20 20 7d 20 65  ort, i);.    } e
13d0: 6c 73 65 0a 20 20 20 20 69 66 20 28 6c 2d 3e 72  lse.    if (l->r
13e0: 74 79 70 65 20 3d 3d 20 5f 5f 41 56 75 73 68 6f  type == __AVusho
13f0: 72 74 29 20 7b 0a 20 20 20 20 20 20 52 45 54 55  rt) {.      RETU
1400: 52 4e 28 75 6e 73 69 67 6e 65 64 20 73 68 6f 72  RN(unsigned shor
1410: 74 2c 20 69 29 3b 0a 20 20 20 20 7d 20 65 6c 73  t, i);.    } els
1420: 65 0a 20 20 20 20 69 66 20 28 6c 2d 3e 72 74 79  e.    if (l->rty
1430: 70 65 20 3d 3d 20 5f 5f 41 56 69 6e 74 29 20 7b  pe == __AVint) {
1440: 0a 20 20 20 20 20 20 52 45 54 55 52 4e 28 69 6e  .      RETURN(in
1450: 74 2c 20 69 29 3b 0a 20 20 20 20 7d 20 65 6c 73  t, i);.    } els
1460: 65 0a 20 20 20 20 69 66 20 28 6c 2d 3e 72 74 79  e.    if (l->rty
1470: 70 65 20 3d 3d 20 5f 5f 41 56 75 69 6e 74 29 20  pe == __AVuint) 
1480: 7b 0a 20 20 20 20 20 20 52 45 54 55 52 4e 28 75  {.      RETURN(u
1490: 6e 73 69 67 6e 65 64 20 69 6e 74 2c 20 69 29 3b  nsigned int, i);
14a0: 0a 20 20 20 20 7d 20 65 6c 73 65 0a 20 20 20 20  .    } else.    
14b0: 69 66 20 28 6c 2d 3e 72 74 79 70 65 20 3d 3d 20  if (l->rtype == 
14c0: 5f 5f 41 56 6c 6f 6e 67 29 20 7b 0a 20 20 20 20  __AVlong) {.    
14d0: 20 20 52 45 54 55 52 4e 28 6c 6f 6e 67 2c 20 69    RETURN(long, i
14e0: 29 3b 0a 20 20 20 20 7d 20 65 6c 73 65 0a 20 20  );.    } else.  
14f0: 20 20 69 66 20 28 6c 2d 3e 72 74 79 70 65 20 3d    if (l->rtype =
1500: 3d 20 5f 5f 41 56 75 6c 6f 6e 67 29 20 7b 0a 20  = __AVulong) {. 
1510: 20 20 20 20 20 52 45 54 55 52 4e 28 75 6e 73 69       RETURN(unsi
1520: 67 6e 65 64 20 6c 6f 6e 67 2c 20 69 29 3b 0a 20  gned long, i);. 
1530: 20 20 20 7d 20 65 6c 73 65 0a 20 20 20 20 69 66     } else.    if
1540: 20 28 6c 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f   (l->rtype == __
1550: 41 56 6c 6f 6e 67 6c 6f 6e 67 29 20 7b 0a 20 20  AVlonglong) {.  
1560: 20 20 20 20 52 45 54 55 52 4e 28 6c 6f 6e 67 20      RETURN(long 
1570: 6c 6f 6e 67 2c 20 69 29 3b 0a 20 20 20 20 7d 20  long, i);.    } 
1580: 65 6c 73 65 0a 20 20 20 20 69 66 20 28 6c 2d 3e  else.    if (l->
1590: 72 74 79 70 65 20 3d 3d 20 5f 5f 41 56 75 6c 6f  rtype == __AVulo
15a0: 6e 67 6c 6f 6e 67 29 20 7b 0a 20 20 20 20 20 20  nglong) {.      
15b0: 52 45 54 55 52 4e 28 75 6e 73 69 67 6e 65 64 20  RETURN(unsigned 
15c0: 6c 6f 6e 67 20 6c 6f 6e 67 2c 20 69 29 3b 0a 20  long long, i);. 
15d0: 20 20 20 7d 20 65 6c 73 65 0a 20 20 2f 2a 20 73     } else.  /* s
15e0: 65 65 20 61 62 6f 76 65 0a 20 20 20 20 69 66 20  ee above.    if 
15f0: 28 6c 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f 41  (l->rtype == __A
1600: 56 66 6c 6f 61 74 29 20 7b 0a 20 20 20 20 7d 20  Vfloat) {.    } 
1610: 65 6c 73 65 0a 20 20 20 20 69 66 20 28 6c 2d 3e  else.    if (l->
1620: 72 74 79 70 65 20 3d 3d 20 5f 5f 41 56 64 6f 75  rtype == __AVdou
1630: 62 6c 65 29 20 7b 0a 20 20 20 20 7d 20 65 6c 73  ble) {.    } els
1640: 65 0a 20 20 2a 2f 0a 20 20 20 20 69 66 20 28 6c  e.  */.    if (l
1650: 2d 3e 72 74 79 70 65 20 3d 3d 20 5f 5f 41 56 76  ->rtype == __AVv
1660: 6f 69 64 70 29 20 7b 0a 20 20 20 20 20 20 52 45  oidp) {.      RE
1670: 54 55 52 4e 28 76 6f 69 64 2a 2c 20 69 29 3b 0a  TURN(void*, i);.
1680: 20 20 20 20 7d 20 65 6c 73 65 0a 20 20 20 20 69      } else.    i
1690: 66 20 28 6c 2d 3e 72 74 79 70 65 20 3d 3d 20 5f  f (l->rtype == _
16a0: 5f 41 56 73 74 72 75 63 74 29 20 7b 0a 20 20 20  _AVstruct) {.   
16b0: 20 20 20 69 66 20 28 6c 2d 3e 66 6c 61 67 73 20     if (l->flags 
16c0: 26 20 5f 5f 41 56 5f 50 43 43 5f 53 54 52 55 43  & __AV_PCC_STRUC
16d0: 54 5f 52 45 54 55 52 4e 29 20 7b 0a 20 20 20 20  T_RETURN) {.    
16e0: 20 20 20 20 2f 2a 20 70 63 63 20 73 74 72 75 63      /* pcc struc
16f0: 74 20 72 65 74 75 72 6e 20 63 6f 6e 76 65 6e 74  t return convent
1700: 69 6f 6e 3a 20 6e 65 65 64 20 61 20 20 2a 28 54  ion: need a  *(T
1710: 59 50 45 2a 29 6c 2d 3e 72 61 64 64 72 20 3d 20  YPE*)l->raddr = 
1720: 2a 28 54 59 50 45 2a 29 69 3b 20 20 2a 2f 0a 20  *(TYPE*)i;  */. 
1730: 20 20 20 20 20 20 20 69 66 20 28 6c 2d 3e 72 73         if (l->rs
1740: 69 7a 65 20 3d 3d 20 73 69 7a 65 6f 66 28 63 68  ize == sizeof(ch
1750: 61 72 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20  ar)) {.         
1760: 20 52 45 54 55 52 4e 28 63 68 61 72 2c 20 2a 28   RETURN(char, *(
1770: 63 68 61 72 2a 29 69 29 3b 0a 20 20 20 20 20 20  char*)i);.      
1780: 20 20 7d 20 65 6c 73 65 0a 20 20 20 20 20 20 20    } else.       
1790: 20 69 66 20 28 6c 2d 3e 72 73 69 7a 65 20 3d 3d   if (l->rsize ==
17a0: 20 73 69 7a 65 6f 66 28 73 68 6f 72 74 29 29 20   sizeof(short)) 
17b0: 7b 0a 20 20 20 20 20 20 20 20 20 20 52 45 54 55  {.          RETU
17c0: 52 4e 28 73 68 6f 72 74 2c 20 2a 28 73 68 6f 72  RN(short, *(shor
17d0: 74 2a 29 69 29 3b 0a 20 20 20 20 20 20 20 20 7d  t*)i);.        }
17e0: 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 69 66   else.        if
17f0: 20 28 6c 2d 3e 72 73 69 7a 65 20 3d 3d 20 73 69   (l->rsize == si
1800: 7a 65 6f 66 28 69 6e 74 29 29 20 7b 0a 20 20 20  zeof(int)) {.   
1810: 20 20 20 20 20 20 20 52 45 54 55 52 4e 28 69 6e         RETURN(in
1820: 74 2c 20 2a 28 69 6e 74 2a 29 69 29 3b 0a 20 20  t, *(int*)i);.  
1830: 20 20 20 20 20 20 7d 20 65 6c 73 65 0a 20 20 20        } else.   
1840: 20 20 20 20 20 69 66 20 28 6c 2d 3e 72 73 69 7a       if (l->rsiz
1850: 65 20 3d 3d 20 73 69 7a 65 6f 66 28 6c 6f 6e 67  e == sizeof(long
1860: 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 52  )) {.          R
1870: 45 54 55 52 4e 28 6c 6f 6e 67 2c 20 2a 28 6c 6f  ETURN(long, *(lo
1880: 6e 67 2a 29 69 29 3b 0a 20 20 20 20 20 20 20 20  ng*)i);.        
1890: 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20 20  } else {.       
18a0: 20 20 20 69 6e 74 20 6e 20 3d 20 28 6c 2d 3e 72     int n = (l->r
18b0: 73 69 7a 65 20 2b 20 73 69 7a 65 6f 66 28 5f 5f  size + sizeof(__
18c0: 61 76 77 6f 72 64 29 2d 31 29 2f 73 69 7a 65 6f  avword)-1)/sizeo
18d0: 66 28 5f 5f 61 76 77 6f 72 64 29 3b 0a 20 20 20  f(__avword);.   
18e0: 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 2d 2d         while (--
18f0: 6e 20 3e 3d 20 30 29 0a 20 20 20 20 20 20 20 20  n >= 0).        
1900: 20 20 20 20 28 28 5f 5f 61 76 77 6f 72 64 2a 29      ((__avword*)
1910: 6c 2d 3e 72 61 64 64 72 29 5b 6e 5d 20 3d 20 28  l->raddr)[n] = (
1920: 28 5f 5f 61 76 77 6f 72 64 2a 29 69 29 5b 6e 5d  (__avword*)i)[n]
1930: 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20  ;.        }.    
1940: 20 20 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20    } else {.     
1950: 20 20 20 2f 2a 20 6e 6f 72 6d 61 6c 20 73 74 72     /* normal str
1960: 75 63 74 20 72 65 74 75 72 6e 20 63 6f 6e 76 65  uct return conve
1970: 6e 74 69 6f 6e 20 2a 2f 0a 20 20 20 20 20 20 20  ntion */.       
1980: 20 69 66 20 28 6c 2d 3e 66 6c 61 67 73 20 26 20   if (l->flags & 
1990: 5f 5f 41 56 5f 52 45 47 49 53 54 45 52 5f 53 54  __AV_REGISTER_ST
19a0: 52 55 43 54 5f 52 45 54 55 52 4e 29 20 7b 0a 20  RUCT_RETURN) {. 
19b0: 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 2d 3e           if (l->
19c0: 72 73 69 7a 65 20 3d 3d 20 73 69 7a 65 6f 66 28  rsize == sizeof(
19d0: 63 68 61 72 29 29 20 7b 0a 20 20 20 20 20 20 20  char)) {.       
19e0: 20 20 20 20 20 52 45 54 55 52 4e 28 63 68 61 72       RETURN(char
19f0: 2c 20 69 29 3b 0a 20 20 20 20 20 20 20 20 20 20  , i);.          
1a00: 7d 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20  } else.         
1a10: 20 69 66 20 28 6c 2d 3e 72 73 69 7a 65 20 3d 3d   if (l->rsize ==
1a20: 20 73 69 7a 65 6f 66 28 73 68 6f 72 74 29 29 20   sizeof(short)) 
1a30: 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 45  {.            RE
1a40: 54 55 52 4e 28 73 68 6f 72 74 2c 20 69 29 3b 0a  TURN(short, i);.
1a50: 20 20 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65            } else
1a60: 0a 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c  .          if (l
1a70: 2d 3e 72 73 69 7a 65 20 3d 3d 20 73 69 7a 65 6f  ->rsize == sizeo
1a80: 66 28 69 6e 74 29 29 20 7b 0a 20 20 20 20 20 20  f(int)) {.      
1a90: 20 20 20 20 20 20 52 45 54 55 52 4e 28 69 6e 74        RETURN(int
1aa0: 2c 20 69 29 3b 0a 20 20 20 20 20 20 20 20 20 20  , i);.          
1ab0: 7d 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20  } else.         
1ac0: 20 69 66 20 28 6c 2d 3e 72 73 69 7a 65 20 3d 3d   if (l->rsize ==
1ad0: 20 73 69 7a 65 6f 66 28 6c 6f 6e 67 29 29 20 7b   sizeof(long)) {
1ae0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 45 54  .            RET
1af0: 55 52 4e 28 6c 6f 6e 67 2c 20 69 29 3b 0a 20 20  URN(long, i);.  
1b00: 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 0a 20          } else. 
1b10: 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 2d 3e           if (l->
1b20: 72 73 69 7a 65 20 3d 3d 20 32 2a 73 69 7a 65 6f  rsize == 2*sizeo
1b30: 66 28 5f 5f 61 76 77 6f 72 64 29 29 20 7b 0a 20  f(__avword)) {. 
1b40: 20 20 20 20 20 20 20 20 20 20 20 28 28 5f 5f 61             ((__a
1b50: 76 77 6f 72 64 2a 29 6c 2d 3e 72 61 64 64 72 29  vword*)l->raddr)
1b60: 5b 30 5d 20 3d 20 69 3b 0a 20 20 20 20 20 20 20  [0] = i;.       
1b70: 20 20 20 20 20 28 28 5f 5f 61 76 77 6f 72 64 2a       ((__avword*
1b80: 29 6c 2d 3e 72 61 64 64 72 29 5b 31 5d 20 3d 20  )l->raddr)[1] = 
1b90: 69 32 3b 0a 20 20 20 20 20 20 20 20 20 20 7d 0a  i2;.          }.
1ba0: 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20          }.      
1bb0: 7d 0a 20 20 20 20 7d 0a 20 20 7d 0a 20 20 73 70  }.    }.  }.  sp
1bc0: 20 2b 3d 20 5f 5f 41 56 5f 41 4c 49 53 54 5f 57   += __AV_ALIST_W
1bd0: 4f 52 44 53 3b 0a 20 20 72 65 74 75 72 6e 20 30  ORDS;.  return 0
1be0: 3b 0a 7d 0a 0a 23 65 6e 64 69 66 20 2f 2a 5f 61  ;.}..#endif /*_a
1bf0: 76 63 61 6c 6c 5f 78 38 36 5f 36 34 5f 63 20 2a  vcall_x86_64_c *
1c00: 2f 0a                                            /.