ffi 1.9.18-x64-mingw32 → 1.9.21-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ffi might be problematic. Click here for more details.

Files changed (384) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +3 -2
  3. data/Rakefile +14 -4
  4. data/ext/ffi_c/AbstractMemory.c +6 -1
  5. data/ext/ffi_c/Platform.c +10 -2
  6. data/ext/ffi_c/extconf.rb +7 -2
  7. data/ext/ffi_c/libffi.bsd.mk +9 -3
  8. data/ext/ffi_c/libffi.darwin.mk +14 -4
  9. data/ext/ffi_c/libffi.gnu.mk +2 -1
  10. data/ext/ffi_c/libffi.mk +9 -4
  11. data/ext/ffi_c/libffi/ChangeLog.libffi +2 -2
  12. data/ext/ffi_c/libffi/{ChangeLog → ChangeLog.libffi-3.1} +1402 -2
  13. data/ext/ffi_c/libffi/ChangeLog.v1 +1 -1
  14. data/ext/ffi_c/libffi/LICENSE +1 -1
  15. data/ext/ffi_c/libffi/Makefile.am +166 -157
  16. data/ext/ffi_c/libffi/Makefile.in +923 -938
  17. data/ext/ffi_c/libffi/README +164 -52
  18. data/ext/ffi_c/libffi/acinclude.m4 +381 -0
  19. data/ext/ffi_c/libffi/aclocal.m4 +645 -384
  20. data/ext/ffi_c/libffi/autogen.sh +2 -0
  21. data/ext/ffi_c/libffi/autom4te.cache/output.0 +21972 -0
  22. data/ext/ffi_c/libffi/autom4te.cache/output.1 +21972 -0
  23. data/ext/ffi_c/libffi/autom4te.cache/output.2 +21972 -0
  24. data/ext/ffi_c/libffi/autom4te.cache/output.3 +21972 -0
  25. data/ext/ffi_c/libffi/autom4te.cache/requests +331 -0
  26. data/ext/ffi_c/libffi/autom4te.cache/traces.0 +4010 -0
  27. data/ext/ffi_c/libffi/autom4te.cache/traces.1 +1005 -0
  28. data/ext/ffi_c/libffi/autom4te.cache/traces.2 +4010 -0
  29. data/ext/ffi_c/libffi/autom4te.cache/traces.3 +4010 -0
  30. data/ext/ffi_c/libffi/compile +218 -14
  31. data/ext/ffi_c/libffi/config.guess +329 -368
  32. data/ext/ffi_c/libffi/config.sub +232 -112
  33. data/ext/ffi_c/libffi/configure +6970 -2189
  34. data/ext/ffi_c/libffi/configure.ac +148 -256
  35. data/ext/ffi_c/libffi/configure.host +265 -4
  36. data/ext/ffi_c/libffi/depcomp +346 -185
  37. data/ext/ffi_c/libffi/doc/Makefile.am +3 -0
  38. data/ext/ffi_c/libffi/doc/Makefile.in +811 -0
  39. data/ext/ffi_c/libffi/doc/libffi.texi +430 -45
  40. data/ext/ffi_c/libffi/{mdate-sh → doc/mdate-sh} +40 -13
  41. data/ext/ffi_c/libffi/{texinfo.tex → doc/texinfo.tex} +3990 -1121
  42. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  43. data/ext/ffi_c/libffi/fficonfig.h.in +24 -13
  44. data/ext/ffi_c/libffi/fficonfig.h.in~ +210 -0
  45. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +207 -0
  46. data/ext/ffi_c/libffi/include/Makefile.am +3 -3
  47. data/ext/ffi_c/libffi/include/Makefile.in +188 -71
  48. data/ext/ffi_c/libffi/include/ffi.h.in +107 -50
  49. data/ext/ffi_c/libffi/include/ffi_cfi.h +55 -0
  50. data/ext/ffi_c/libffi/include/ffi_common.h +32 -11
  51. data/ext/ffi_c/libffi/install-sh +190 -202
  52. data/ext/ffi_c/libffi/libffi.map.in +80 -0
  53. data/ext/ffi_c/libffi/libffi.pc.in +3 -2
  54. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +637 -0
  55. data/ext/ffi_c/libffi/libtool-ldflags +106 -0
  56. data/ext/ffi_c/libffi/libtool-version +1 -1
  57. data/ext/ffi_c/libffi/ltmain.sh +3553 -2033
  58. data/ext/ffi_c/libffi/m4/asmcfi.m4 +13 -0
  59. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +69 -0
  60. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +13 -8
  61. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +31 -104
  62. data/ext/ffi_c/libffi/m4/{ax_check_compiler_flags.m4 → ax_check_compile_flag.m4} +30 -34
  63. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +32 -11
  64. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +6 -5
  65. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +31 -21
  66. data/ext/ffi_c/libffi/m4/libtool.m4 +1691 -1135
  67. data/ext/ffi_c/libffi/m4/ltoptions.m4 +104 -36
  68. data/ext/ffi_c/libffi/m4/ltsugar.m4 +4 -3
  69. data/ext/ffi_c/libffi/m4/ltversion.m4 +6 -6
  70. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +4 -3
  71. data/ext/ffi_c/libffi/man/Makefile.am +2 -2
  72. data/ext/ffi_c/libffi/man/Makefile.in +141 -49
  73. data/ext/ffi_c/libffi/man/ffi.3 +10 -0
  74. data/ext/ffi_c/libffi/man/ffi_prep_cif.3 +6 -4
  75. data/ext/ffi_c/libffi/man/ffi_prep_cif_var.3 +73 -0
  76. data/ext/ffi_c/libffi/missing +150 -311
  77. data/ext/ffi_c/libffi/msvcc.sh +72 -9
  78. data/ext/ffi_c/libffi/src/aarch64/ffi.c +941 -0
  79. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +81 -0
  80. data/ext/ffi_c/libffi/src/aarch64/internal.h +67 -0
  81. data/ext/ffi_c/libffi/src/aarch64/sysv.S +438 -0
  82. data/ext/ffi_c/libffi/src/alpha/ffi.c +335 -98
  83. data/ext/ffi_c/libffi/src/alpha/ffitarget.h +10 -1
  84. data/ext/ffi_c/libffi/src/alpha/internal.h +23 -0
  85. data/ext/ffi_c/libffi/src/alpha/osf.S +161 -266
  86. data/ext/ffi_c/libffi/src/arc/arcompact.S +135 -0
  87. data/ext/ffi_c/libffi/src/arc/ffi.c +266 -0
  88. data/ext/ffi_c/libffi/src/arc/ffitarget.h +53 -0
  89. data/ext/ffi_c/libffi/src/arm/ffi.c +597 -517
  90. data/ext/ffi_c/libffi/src/arm/ffitarget.h +24 -7
  91. data/ext/ffi_c/libffi/src/arm/internal.h +7 -0
  92. data/ext/ffi_c/libffi/src/arm/sysv.S +303 -417
  93. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +6 -1
  94. data/ext/ffi_c/libffi/src/bfin/ffi.c +196 -0
  95. data/ext/ffi_c/libffi/src/bfin/ffitarget.h +43 -0
  96. data/ext/ffi_c/libffi/src/bfin/sysv.S +179 -0
  97. data/ext/ffi_c/libffi/src/closures.c +319 -44
  98. data/ext/ffi_c/libffi/src/cris/ffi.c +10 -7
  99. data/ext/ffi_c/libffi/src/cris/ffitarget.h +6 -1
  100. data/ext/ffi_c/libffi/src/debug.c +6 -1
  101. data/ext/ffi_c/libffi/src/dlmalloc.c +16 -11
  102. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  103. data/ext/ffi_c/libffi/src/frv/ffitarget.h +6 -1
  104. data/ext/ffi_c/libffi/src/ia64/ffi.c +11 -7
  105. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +6 -1
  106. data/ext/ffi_c/libffi/src/java_raw_api.c +23 -5
  107. data/ext/ffi_c/libffi/src/m32r/ffi.c +1 -1
  108. data/ext/ffi_c/libffi/src/m32r/ffitarget.h +6 -1
  109. data/ext/ffi_c/libffi/src/m68k/ffi.c +87 -13
  110. data/ext/ffi_c/libffi/src/m68k/ffitarget.h +6 -1
  111. data/ext/ffi_c/libffi/src/m68k/sysv.S +119 -32
  112. data/ext/ffi_c/libffi/src/m88k/ffi.c +400 -0
  113. data/ext/ffi_c/libffi/src/m88k/ffitarget.h +49 -0
  114. data/ext/ffi_c/libffi/src/m88k/obsd.S +209 -0
  115. data/ext/ffi_c/libffi/src/metag/ffi.c +330 -0
  116. data/ext/ffi_c/libffi/{fficonfig.hw → src/metag/ffitarget.h} +22 -26
  117. data/ext/ffi_c/libffi/src/metag/sysv.S +311 -0
  118. data/ext/ffi_c/libffi/src/microblaze/ffi.c +321 -0
  119. data/ext/ffi_c/libffi/src/microblaze/ffitarget.h +53 -0
  120. data/ext/ffi_c/libffi/src/microblaze/sysv.S +302 -0
  121. data/ext/ffi_c/libffi/src/mips/ffi.c +95 -28
  122. data/ext/ffi_c/libffi/src/mips/ffitarget.h +9 -2
  123. data/ext/ffi_c/libffi/src/mips/n32.S +126 -56
  124. data/ext/ffi_c/libffi/src/mips/o32.S +148 -27
  125. data/ext/ffi_c/libffi/src/moxie/eabi.S +55 -82
  126. data/ext/ffi_c/libffi/src/moxie/ffi.c +40 -44
  127. data/ext/ffi_c/libffi/src/moxie/ffitarget.h +52 -0
  128. data/ext/ffi_c/libffi/src/nios2/ffi.c +304 -0
  129. data/ext/ffi_c/libffi/src/nios2/ffitarget.h +52 -0
  130. data/ext/ffi_c/libffi/src/nios2/sysv.S +136 -0
  131. data/ext/ffi_c/libffi/src/or1k/ffi.c +328 -0
  132. data/ext/ffi_c/libffi/src/or1k/ffitarget.h +58 -0
  133. data/ext/ffi_c/libffi/src/or1k/sysv.S +107 -0
  134. data/ext/ffi_c/libffi/src/pa/ffitarget.h +8 -1
  135. data/ext/ffi_c/libffi/src/powerpc/aix.S +6 -6
  136. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +3 -1
  137. data/ext/ffi_c/libffi/src/powerpc/asm.h +2 -2
  138. data/ext/ffi_c/libffi/src/powerpc/darwin.S +2 -7
  139. data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +22 -26
  140. data/ext/ffi_c/libffi/src/powerpc/ffi.c +103 -1378
  141. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +25 -25
  142. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +945 -0
  143. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +94 -0
  144. data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +923 -0
  145. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +100 -44
  146. data/ext/ffi_c/libffi/src/powerpc/linux64.S +100 -59
  147. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +360 -108
  148. data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +138 -68
  149. data/ext/ffi_c/libffi/src/powerpc/sysv.S +68 -112
  150. data/ext/ffi_c/libffi/src/prep_cif.c +108 -24
  151. data/ext/ffi_c/libffi/src/raw_api.c +18 -5
  152. data/ext/ffi_c/libffi/src/s390/ffi.c +294 -318
  153. data/ext/ffi_c/libffi/src/s390/ffitarget.h +9 -1
  154. data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
  155. data/ext/ffi_c/libffi/src/s390/sysv.S +257 -366
  156. data/ext/ffi_c/libffi/src/sh/ffi.c +4 -3
  157. data/ext/ffi_c/libffi/src/sh/ffitarget.h +6 -1
  158. data/ext/ffi_c/libffi/src/sh64/ffi.c +3 -2
  159. data/ext/ffi_c/libffi/src/sh64/ffitarget.h +6 -1
  160. data/ext/ffi_c/libffi/src/sparc/ffi.c +326 -527
  161. data/ext/ffi_c/libffi/src/sparc/ffi64.c +608 -0
  162. data/ext/ffi_c/libffi/src/sparc/ffitarget.h +20 -7
  163. data/ext/ffi_c/libffi/src/sparc/internal.h +26 -0
  164. data/ext/ffi_c/libffi/src/sparc/v8.S +364 -234
  165. data/ext/ffi_c/libffi/src/sparc/v9.S +340 -207
  166. data/ext/ffi_c/libffi/src/tile/ffi.c +355 -0
  167. data/ext/ffi_c/libffi/src/tile/ffitarget.h +65 -0
  168. data/ext/ffi_c/libffi/src/tile/tile.S +360 -0
  169. data/ext/ffi_c/libffi/src/types.c +43 -14
  170. data/ext/ffi_c/libffi/src/vax/elfbsd.S +195 -0
  171. data/ext/ffi_c/libffi/src/vax/ffi.c +276 -0
  172. data/ext/ffi_c/libffi/src/vax/ffitarget.h +49 -0
  173. data/ext/ffi_c/libffi/src/x86/asmnames.h +30 -0
  174. data/ext/ffi_c/libffi/src/x86/ffi.c +589 -500
  175. data/ext/ffi_c/libffi/src/x86/ffi64.c +338 -116
  176. data/ext/ffi_c/libffi/src/x86/ffitarget.h +55 -35
  177. data/ext/ffi_c/libffi/src/x86/ffiw64.c +287 -0
  178. data/ext/ffi_c/libffi/src/x86/internal.h +29 -0
  179. data/ext/ffi_c/libffi/src/x86/internal64.h +22 -0
  180. data/ext/ffi_c/libffi/src/x86/sysv.S +975 -400
  181. data/ext/ffi_c/libffi/src/x86/unix64.S +398 -299
  182. data/ext/ffi_c/libffi/src/x86/win64.S +222 -458
  183. data/ext/ffi_c/libffi/src/x86/win64_intel.S +237 -0
  184. data/ext/ffi_c/libffi/src/xtensa/ffi.c +298 -0
  185. data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +53 -0
  186. data/ext/ffi_c/libffi/src/xtensa/sysv.S +253 -0
  187. data/ext/ffi_c/libffi/stamp-h.in +1 -0
  188. data/ext/ffi_c/libffi/testsuite/Makefile.am +78 -73
  189. data/ext/ffi_c/libffi/testsuite/Makefile.in +218 -111
  190. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +120 -25
  191. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +21 -1
  192. data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +46 -0
  193. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +4 -6
  194. data/ext/ffi_c/libffi/testsuite/libffi.call/{closure_stdcall.c → closure_simple.c} +7 -16
  195. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +4 -4
  196. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +4 -4
  197. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +4 -4
  198. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +4 -4
  199. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +4 -4
  200. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +4 -4
  201. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +4 -4
  202. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +5 -5
  203. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +4 -4
  204. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +4 -4
  205. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +4 -4
  206. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +4 -4
  207. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +4 -4
  208. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +4 -4
  209. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +4 -4
  210. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +4 -4
  211. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +5 -5
  212. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +4 -4
  213. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +4 -4
  214. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +4 -4
  215. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +4 -4
  216. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +4 -4
  217. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +4 -4
  218. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +4 -4
  219. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +4 -4
  220. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +4 -4
  221. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +4 -4
  222. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +4 -6
  223. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +4 -6
  224. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +4 -4
  225. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +4 -4
  226. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +4 -4
  227. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +4 -4
  228. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +4 -4
  229. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +4 -4
  230. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +4 -4
  231. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c +4 -4
  232. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +10 -9
  233. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +3 -3
  234. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +10 -9
  235. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_args.c +70 -0
  236. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_float_double.c +55 -0
  237. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +1 -1
  238. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +11 -9
  239. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_struct_va1.c +114 -0
  240. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar_va.c +44 -0
  241. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint_va.c +45 -0
  242. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulong_va.c +45 -0
  243. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +5 -5
  244. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort_va.c +44 -0
  245. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +2 -2
  246. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +23 -40
  247. data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +3 -1
  248. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +6 -4
  249. data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +4 -2
  250. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +107 -0
  251. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +18 -19
  252. data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +6 -16
  253. data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +57 -0
  254. data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +70 -0
  255. data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +78 -0
  256. data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -1
  257. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +6 -6
  258. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +8 -8
  259. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +6 -6
  260. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct11.c +121 -0
  261. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +5 -5
  262. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +5 -5
  263. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +5 -5
  264. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +5 -5
  265. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +6 -6
  266. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +5 -5
  267. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +6 -6
  268. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +6 -6
  269. data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +46 -0
  270. data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +127 -0
  271. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +1 -0
  272. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
  273. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +1 -1
  274. data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +1 -1
  275. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c +7 -7
  276. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c +7 -7
  277. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c +5 -5
  278. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +5 -5
  279. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +2 -2
  280. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +49 -0
  281. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +49 -0
  282. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +55 -0
  283. data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +9 -7
  284. data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +7 -7
  285. data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +7 -6
  286. data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +9 -8
  287. data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +9 -8
  288. data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +9 -9
  289. data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +9 -9
  290. data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +9 -8
  291. data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +9 -8
  292. data/ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c +2 -2
  293. data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +61 -0
  294. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest.cc +3 -10
  295. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest_ffi_call.cc +2 -1
  296. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +196 -0
  297. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +121 -0
  298. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +123 -0
  299. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +125 -0
  300. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +91 -0
  301. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +10 -0
  302. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +10 -0
  303. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +10 -0
  304. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +42 -0
  305. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +10 -0
  306. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +10 -0
  307. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +10 -0
  308. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +71 -0
  309. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +10 -0
  310. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +10 -0
  311. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +10 -0
  312. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +80 -0
  313. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +10 -0
  314. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +16 -0
  315. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +10 -0
  316. data/ext/ffi_c/libffi/testsuite/{libffi.special/special.exp → libffi.complex/complex.exp} +9 -8
  317. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +51 -0
  318. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +7 -0
  319. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +7 -0
  320. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +7 -0
  321. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +10 -0
  322. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +10 -0
  323. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +86 -0
  324. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +10 -0
  325. data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +1 -0
  326. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +78 -0
  327. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +10 -0
  328. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +10 -0
  329. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +10 -0
  330. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +37 -0
  331. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +41 -0
  332. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +10 -0
  333. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +10 -0
  334. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +10 -0
  335. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +44 -0
  336. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +10 -0
  337. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +10 -0
  338. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +10 -0
  339. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +10 -0
  340. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +10 -0
  341. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +10 -0
  342. data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +34 -0
  343. data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +28 -0
  344. data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +1 -0
  345. data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +36 -0
  346. data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +19 -0
  347. data/ffi.gemspec +2 -2
  348. data/lib/2.0/ffi_c.so +0 -0
  349. data/lib/2.1/ffi_c.so +0 -0
  350. data/lib/2.2/ffi_c.so +0 -0
  351. data/lib/2.3/ffi_c.so +0 -0
  352. data/lib/2.4/ffi_c.so +0 -0
  353. data/lib/2.5/ffi_c.so +0 -0
  354. data/lib/ffi/enum.rb +124 -0
  355. data/lib/ffi/library.rb +65 -13
  356. data/lib/ffi/platform.rb +7 -2
  357. data/lib/ffi/platform/sparc64-linux/types.conf +102 -0
  358. data/lib/ffi/platform/x86_64-windows/types.conf +113 -20
  359. data/lib/ffi/pointer.rb +1 -0
  360. data/lib/ffi/struct.rb +0 -2
  361. data/lib/ffi/version.rb +1 -1
  362. data/spec/ffi/bitmask_spec.rb +575 -0
  363. data/spec/ffi/embed-test/ext/Makefile +242 -0
  364. data/spec/ffi/fixtures/BitmaskTest.c +51 -0
  365. data/spec/ffi/rbx/memory_pointer_spec.rb +4 -0
  366. data/spec/ffi/struct_spec.rb +0 -4
  367. metadata +158 -32
  368. data/ext/ffi_c/libffi/Makefile.vc +0 -141
  369. data/ext/ffi_c/libffi/Makefile.vc64 +0 -141
  370. data/ext/ffi_c/libffi/build-ios.sh +0 -67
  371. data/ext/ffi_c/libffi/doc/libffi.info +0 -593
  372. data/ext/ffi_c/libffi/doc/stamp-vti +0 -4
  373. data/ext/ffi_c/libffi/include/ffi.h.vc +0 -427
  374. data/ext/ffi_c/libffi/include/ffi.h.vc64 +0 -427
  375. data/ext/ffi_c/libffi/src/arm/gentramp.sh +0 -118
  376. data/ext/ffi_c/libffi/src/arm/trampoline.S +0 -4450
  377. data/ext/ffi_c/libffi/src/x86/darwin.S +0 -444
  378. data/ext/ffi_c/libffi/src/x86/darwin64.S +0 -416
  379. data/ext/ffi_c/libffi/src/x86/freebsd.S +0 -458
  380. data/ext/ffi_c/libffi/src/x86/win32.S +0 -1065
  381. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +0 -300
  382. data/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +0 -63
  383. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +0 -44
  384. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +0 -96
@@ -0,0 +1,22 @@
1
+ #define UNIX64_RET_VOID 0
2
+ #define UNIX64_RET_UINT8 1
3
+ #define UNIX64_RET_UINT16 2
4
+ #define UNIX64_RET_UINT32 3
5
+ #define UNIX64_RET_SINT8 4
6
+ #define UNIX64_RET_SINT16 5
7
+ #define UNIX64_RET_SINT32 6
8
+ #define UNIX64_RET_INT64 7
9
+ #define UNIX64_RET_XMM32 8
10
+ #define UNIX64_RET_XMM64 9
11
+ #define UNIX64_RET_X87 10
12
+ #define UNIX64_RET_X87_2 11
13
+ #define UNIX64_RET_ST_XMM0_RAX 12
14
+ #define UNIX64_RET_ST_RAX_XMM0 13
15
+ #define UNIX64_RET_ST_XMM0_XMM1 14
16
+ #define UNIX64_RET_ST_RAX_RDX 15
17
+
18
+ #define UNIX64_RET_LAST 15
19
+
20
+ #define UNIX64_FLAG_RET_IN_MEM (1 << 10)
21
+ #define UNIX64_FLAG_XMM_ARGS (1 << 11)
22
+ #define UNIX64_SIZE_SHIFT 12
@@ -1,5 +1,7 @@
1
1
  /* -----------------------------------------------------------------------
2
- sysv.S - Copyright (c) 1996, 1998, 2001-2003, 2005, 2008, 2010 Red Hat, Inc.
2
+ sysv.S - Copyright (c) 2017 Anthony Green
3
+ - Copyright (c) 2013 The Written Word, Inc.
4
+ - Copyright (c) 1996,1998,2001-2003,2005,2008,2010 Red Hat, Inc.
3
5
 
4
6
  X86 Foreign Function Interface
5
7
 
@@ -25,442 +27,1015 @@
25
27
  ----------------------------------------------------------------------- */
26
28
 
27
29
  #ifndef __x86_64__
30
+ #ifndef _MSC_VER
28
31
 
29
32
  #define LIBFFI_ASM
30
33
  #include <fficonfig.h>
31
34
  #include <ffi.h>
35
+ #include "internal.h"
32
36
 
33
- .text
34
-
35
- .globl ffi_prep_args
36
-
37
- .align 4
38
- .globl ffi_call_SYSV
39
- .type ffi_call_SYSV,@function
40
-
41
- ffi_call_SYSV:
42
- .LFB1:
43
- pushl %ebp
44
- .LCFI0:
45
- movl %esp,%ebp
46
- .LCFI1:
47
- /* Make room for all of the new args. */
48
- movl 16(%ebp),%ecx
49
- subl %ecx,%esp
50
-
51
- /* Align the stack pointer to 16-bytes */
52
- andl $0xfffffff0, %esp
53
-
54
- movl %esp,%eax
55
-
56
- /* Place all of the ffi_prep_args in position */
57
- pushl 12(%ebp)
58
- pushl %eax
59
- call *8(%ebp)
60
-
61
- /* Return stack to previous state and call the function */
62
- addl $8,%esp
63
-
64
- call *28(%ebp)
65
-
66
- /* Load %ecx with the return type code */
67
- movl 20(%ebp),%ecx
68
-
69
- /* Protect %esi. We're going to pop it in the epilogue. */
70
- pushl %esi
71
-
72
- /* If the return value pointer is NULL, assume no return value. */
73
- cmpl $0,24(%ebp)
74
- jne 0f
75
-
76
- /* Even if there is no space for the return value, we are
77
- obliged to handle floating-point values. */
78
- cmpl $FFI_TYPE_FLOAT,%ecx
79
- jne noretval
80
- fstp %st(0)
81
-
82
- jmp epilogue
83
-
84
- 0:
85
- call 1f
86
-
87
- .Lstore_table:
88
- .long noretval-.Lstore_table /* FFI_TYPE_VOID */
89
- .long retint-.Lstore_table /* FFI_TYPE_INT */
90
- .long retfloat-.Lstore_table /* FFI_TYPE_FLOAT */
91
- .long retdouble-.Lstore_table /* FFI_TYPE_DOUBLE */
92
- .long retlongdouble-.Lstore_table /* FFI_TYPE_LONGDOUBLE */
93
- .long retuint8-.Lstore_table /* FFI_TYPE_UINT8 */
94
- .long retsint8-.Lstore_table /* FFI_TYPE_SINT8 */
95
- .long retuint16-.Lstore_table /* FFI_TYPE_UINT16 */
96
- .long retsint16-.Lstore_table /* FFI_TYPE_SINT16 */
97
- .long retint-.Lstore_table /* FFI_TYPE_UINT32 */
98
- .long retint-.Lstore_table /* FFI_TYPE_SINT32 */
99
- .long retint64-.Lstore_table /* FFI_TYPE_UINT64 */
100
- .long retint64-.Lstore_table /* FFI_TYPE_SINT64 */
101
- .long retstruct-.Lstore_table /* FFI_TYPE_STRUCT */
102
- .long retint-.Lstore_table /* FFI_TYPE_POINTER */
103
-
104
- 1:
105
- pop %esi
106
- add (%esi, %ecx, 4), %esi
107
- jmp *%esi
108
-
109
- /* Sign/zero extend as appropriate. */
110
- retsint8:
111
- movsbl %al, %eax
112
- jmp retint
37
+ #define C2(X, Y) X ## Y
38
+ #define C1(X, Y) C2(X, Y)
39
+ #ifdef __USER_LABEL_PREFIX__
40
+ # define C(X) C1(__USER_LABEL_PREFIX__, X)
41
+ #else
42
+ # define C(X) X
43
+ #endif
113
44
 
114
- retsint16:
115
- movswl %ax, %eax
116
- jmp retint
45
+ #ifdef X86_DARWIN
46
+ # define L(X) C1(L, X)
47
+ #else
48
+ # define L(X) C1(.L, X)
49
+ #endif
117
50
 
118
- retuint8:
119
- movzbl %al, %eax
120
- jmp retint
51
+ #ifdef __ELF__
52
+ # define ENDF(X) .type X,@function; .size X, . - X
53
+ #else
54
+ # define ENDF(X)
55
+ #endif
121
56
 
122
- retuint16:
123
- movzwl %ax, %eax
124
- jmp retint
125
-
126
- retfloat:
127
- /* Load %ecx with the pointer to storage for the return value */
128
- movl 24(%ebp),%ecx
129
- fstps (%ecx)
130
- jmp epilogue
131
-
132
- retdouble:
133
- /* Load %ecx with the pointer to storage for the return value */
134
- movl 24(%ebp),%ecx
135
- fstpl (%ecx)
136
- jmp epilogue
137
-
138
- retlongdouble:
139
- /* Load %ecx with the pointer to storage for the return value */
140
- movl 24(%ebp),%ecx
141
- fstpt (%ecx)
142
- jmp epilogue
143
-
144
- retint64:
145
- /* Load %ecx with the pointer to storage for the return value */
146
- movl 24(%ebp),%ecx
147
- movl %eax,0(%ecx)
148
- movl %edx,4(%ecx)
149
- jmp epilogue
150
-
151
- retint:
152
- /* Load %ecx with the pointer to storage for the return value */
153
- movl 24(%ebp),%ecx
154
- movl %eax,0(%ecx)
155
-
156
- retstruct:
157
- /* Nothing to do! */
158
-
159
- noretval:
160
- epilogue:
161
- popl %esi
162
- movl %ebp,%esp
163
- popl %ebp
164
- ret
165
- .LFE1:
166
- .ffi_call_SYSV_end:
167
- .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
168
-
169
- .align 4
170
- FFI_HIDDEN (ffi_closure_SYSV)
171
- .globl ffi_closure_SYSV
172
- .type ffi_closure_SYSV, @function
173
-
174
- ffi_closure_SYSV:
175
- .LFB2:
176
- pushl %ebp
177
- .LCFI2:
178
- movl %esp, %ebp
179
- .LCFI3:
180
- subl $40, %esp
181
- leal -24(%ebp), %edx
182
- movl %edx, -12(%ebp) /* resp */
183
- leal 8(%ebp), %edx
184
- movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */
185
- leal -12(%ebp), %edx
186
- movl %edx, (%esp) /* &resp */
187
- #if defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE || !defined __PIC__
188
- call ffi_closure_SYSV_inner
57
+ /* Handle win32 fastcall name mangling. */
58
+ #ifdef X86_WIN32
59
+ # define ffi_call_i386 @ffi_call_i386@8
60
+ # define ffi_closure_inner @ffi_closure_inner@8
189
61
  #else
190
- movl %ebx, 8(%esp)
191
- .LCFI7:
192
- call 1f
193
- 1: popl %ebx
194
- addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
195
- call ffi_closure_SYSV_inner@PLT
196
- movl 8(%esp), %ebx
62
+ # define ffi_call_i386 C(ffi_call_i386)
63
+ # define ffi_closure_inner C(ffi_closure_inner)
197
64
  #endif
198
- movl -12(%ebp), %ecx
199
- cmpl $FFI_TYPE_INT, %eax
200
- je .Lcls_retint
201
-
202
- /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16,
203
- FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */
204
- cmpl $FFI_TYPE_UINT64, %eax
205
- jge 0f
206
- cmpl $FFI_TYPE_UINT8, %eax
207
- jge .Lcls_retint
208
-
209
- 0: cmpl $FFI_TYPE_FLOAT, %eax
210
- je .Lcls_retfloat
211
- cmpl $FFI_TYPE_DOUBLE, %eax
212
- je .Lcls_retdouble
213
- cmpl $FFI_TYPE_LONGDOUBLE, %eax
214
- je .Lcls_retldouble
215
- cmpl $FFI_TYPE_SINT64, %eax
216
- je .Lcls_retllong
217
- cmpl $FFI_TYPE_STRUCT, %eax
218
- je .Lcls_retstruct
219
- .Lcls_epilogue:
220
- movl %ebp, %esp
221
- popl %ebp
222
- ret
223
- .Lcls_retint:
224
- movl (%ecx), %eax
225
- jmp .Lcls_epilogue
226
- .Lcls_retfloat:
227
- flds (%ecx)
228
- jmp .Lcls_epilogue
229
- .Lcls_retdouble:
230
- fldl (%ecx)
231
- jmp .Lcls_epilogue
232
- .Lcls_retldouble:
233
- fldt (%ecx)
234
- jmp .Lcls_epilogue
235
- .Lcls_retllong:
236
- movl (%ecx), %eax
237
- movl 4(%ecx), %edx
238
- jmp .Lcls_epilogue
239
- .Lcls_retstruct:
240
- movl %ebp, %esp
241
- popl %ebp
242
- ret $4
243
- .LFE2:
244
- .size ffi_closure_SYSV, .-ffi_closure_SYSV
245
65
 
246
- #if !FFI_NO_RAW_API
66
+ /* This macro allows the safe creation of jump tables without an
67
+ actual table. The entry points into the table are all 8 bytes.
68
+ The use of ORG asserts that we're at the correct location. */
69
+ /* ??? The clang assembler doesn't handle .org with symbolic expressions. */
70
+ #if defined(__clang__) || defined(__APPLE__) || (defined (__sun__) && defined(__svr4__))
71
+ # define E(BASE, X) .balign 8
72
+ #else
73
+ # define E(BASE, X) .balign 8; .org BASE + X * 8
74
+ #endif
75
+
76
+ .text
77
+ .balign 16
78
+ .globl ffi_call_i386
79
+ FFI_HIDDEN(ffi_call_i386)
80
+
81
+ /* This is declared as
82
+
83
+ void ffi_call_i386(struct call_frame *frame, char *argp)
84
+ __attribute__((fastcall));
85
+
86
+ Thus the arguments are present in
87
+
88
+ ecx: frame
89
+ edx: argp
90
+ */
91
+
92
+ ffi_call_i386:
93
+ L(UW0):
94
+ # cfi_startproc
95
+ #if !HAVE_FASTCALL
96
+ movl 4(%esp), %ecx
97
+ movl 8(%esp), %edx
98
+ #endif
99
+ movl (%esp), %eax /* move the return address */
100
+ movl %ebp, (%ecx) /* store %ebp into local frame */
101
+ movl %eax, 4(%ecx) /* store retaddr into local frame */
102
+
103
+ /* New stack frame based off ebp. This is a itty bit of unwind
104
+ trickery in that the CFA *has* changed. There is no easy way
105
+ to describe it correctly on entry to the function. Fortunately,
106
+ it doesn't matter too much since at all points we can correctly
107
+ unwind back to ffi_call. Note that the location to which we
108
+ moved the return address is (the new) CFA-4, so from the
109
+ perspective of the unwind info, it hasn't moved. */
110
+ movl %ecx, %ebp
111
+ L(UW1):
112
+ # cfi_def_cfa(%ebp, 8)
113
+ # cfi_rel_offset(%ebp, 0)
247
114
 
248
- /* Precalculate for e.g. the Solaris 10/x86 assembler. */
249
- #if FFI_TRAMPOLINE_SIZE == 10
250
- #define RAW_CLOSURE_CIF_OFFSET 12
251
- #define RAW_CLOSURE_FUN_OFFSET 16
252
- #define RAW_CLOSURE_USER_DATA_OFFSET 20
253
- #elif FFI_TRAMPOLINE_SIZE == 24
254
- #define RAW_CLOSURE_CIF_OFFSET 24
255
- #define RAW_CLOSURE_FUN_OFFSET 28
256
- #define RAW_CLOSURE_USER_DATA_OFFSET 32
115
+ movl %edx, %esp /* set outgoing argument stack */
116
+ movl 20+R_EAX*4(%ebp), %eax /* set register arguments */
117
+ movl 20+R_EDX*4(%ebp), %edx
118
+ movl 20+R_ECX*4(%ebp), %ecx
119
+
120
+ call *8(%ebp)
121
+
122
+ movl 12(%ebp), %ecx /* load return type code */
123
+ movl %ebx, 8(%ebp) /* preserve %ebx */
124
+ L(UW2):
125
+ # cfi_rel_offset(%ebx, 8)
126
+
127
+ andl $X86_RET_TYPE_MASK, %ecx
128
+ #ifdef __PIC__
129
+ call C(__x86.get_pc_thunk.bx)
130
+ L(pc1):
131
+ leal L(store_table)-L(pc1)(%ebx, %ecx, 8), %ebx
257
132
  #else
258
- #define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3)
259
- #define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4)
260
- #define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4)
133
+ leal L(store_table)(,%ecx, 8), %ebx
261
134
  #endif
262
- #define CIF_FLAGS_OFFSET 20
263
-
264
- .align 4
265
- FFI_HIDDEN (ffi_closure_raw_SYSV)
266
- .globl ffi_closure_raw_SYSV
267
- .type ffi_closure_raw_SYSV, @function
268
-
269
- ffi_closure_raw_SYSV:
270
- .LFB3:
271
- pushl %ebp
272
- .LCFI4:
273
- movl %esp, %ebp
274
- .LCFI5:
275
- pushl %esi
276
- .LCFI6:
277
- subl $36, %esp
278
- movl RAW_CLOSURE_CIF_OFFSET(%eax), %esi /* closure->cif */
279
- movl RAW_CLOSURE_USER_DATA_OFFSET(%eax), %edx /* closure->user_data */
280
- movl %edx, 12(%esp) /* user_data */
281
- leal 8(%ebp), %edx /* __builtin_dwarf_cfa () */
282
- movl %edx, 8(%esp) /* raw_args */
283
- leal -24(%ebp), %edx
284
- movl %edx, 4(%esp) /* &res */
285
- movl %esi, (%esp) /* cif */
286
- call *RAW_CLOSURE_FUN_OFFSET(%eax) /* closure->fun */
287
- movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */
288
- cmpl $FFI_TYPE_INT, %eax
289
- je .Lrcls_retint
290
-
291
- /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16,
292
- FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */
293
- cmpl $FFI_TYPE_UINT64, %eax
294
- jge 0f
295
- cmpl $FFI_TYPE_UINT8, %eax
296
- jge .Lrcls_retint
297
- 0:
298
- cmpl $FFI_TYPE_FLOAT, %eax
299
- je .Lrcls_retfloat
300
- cmpl $FFI_TYPE_DOUBLE, %eax
301
- je .Lrcls_retdouble
302
- cmpl $FFI_TYPE_LONGDOUBLE, %eax
303
- je .Lrcls_retldouble
304
- cmpl $FFI_TYPE_SINT64, %eax
305
- je .Lrcls_retllong
306
- .Lrcls_epilogue:
307
- addl $36, %esp
308
- popl %esi
135
+ movl 16(%ebp), %ecx /* load result address */
136
+ jmp *%ebx
137
+
138
+ .balign 8
139
+ L(store_table):
140
+ E(L(store_table), X86_RET_FLOAT)
141
+ fstps (%ecx)
142
+ jmp L(e1)
143
+ E(L(store_table), X86_RET_DOUBLE)
144
+ fstpl (%ecx)
145
+ jmp L(e1)
146
+ E(L(store_table), X86_RET_LDOUBLE)
147
+ fstpt (%ecx)
148
+ jmp L(e1)
149
+ E(L(store_table), X86_RET_SINT8)
150
+ movsbl %al, %eax
151
+ mov %eax, (%ecx)
152
+ jmp L(e1)
153
+ E(L(store_table), X86_RET_SINT16)
154
+ movswl %ax, %eax
155
+ mov %eax, (%ecx)
156
+ jmp L(e1)
157
+ E(L(store_table), X86_RET_UINT8)
158
+ movzbl %al, %eax
159
+ mov %eax, (%ecx)
160
+ jmp L(e1)
161
+ E(L(store_table), X86_RET_UINT16)
162
+ movzwl %ax, %eax
163
+ mov %eax, (%ecx)
164
+ jmp L(e1)
165
+ E(L(store_table), X86_RET_INT64)
166
+ movl %edx, 4(%ecx)
167
+ /* fallthru */
168
+ E(L(store_table), X86_RET_INT32)
169
+ movl %eax, (%ecx)
170
+ /* fallthru */
171
+ E(L(store_table), X86_RET_VOID)
172
+ L(e1):
173
+ movl 8(%ebp), %ebx
174
+ movl %ebp, %esp
309
175
  popl %ebp
176
+ L(UW3):
177
+ # cfi_remember_state
178
+ # cfi_def_cfa(%esp, 4)
179
+ # cfi_restore(%ebx)
180
+ # cfi_restore(%ebp)
310
181
  ret
311
- .Lrcls_retint:
312
- movl -24(%ebp), %eax
313
- jmp .Lrcls_epilogue
314
- .Lrcls_retfloat:
315
- flds -24(%ebp)
316
- jmp .Lrcls_epilogue
317
- .Lrcls_retdouble:
318
- fldl -24(%ebp)
319
- jmp .Lrcls_epilogue
320
- .Lrcls_retldouble:
321
- fldt -24(%ebp)
322
- jmp .Lrcls_epilogue
323
- .Lrcls_retllong:
324
- movl -24(%ebp), %eax
325
- movl -20(%ebp), %edx
326
- jmp .Lrcls_epilogue
327
- .LFE3:
328
- .size ffi_closure_raw_SYSV, .-ffi_closure_raw_SYSV
182
+ L(UW4):
183
+ # cfi_restore_state
184
+
185
+ E(L(store_table), X86_RET_STRUCTPOP)
186
+ jmp L(e1)
187
+ E(L(store_table), X86_RET_STRUCTARG)
188
+ jmp L(e1)
189
+ E(L(store_table), X86_RET_STRUCT_1B)
190
+ movb %al, (%ecx)
191
+ jmp L(e1)
192
+ E(L(store_table), X86_RET_STRUCT_2B)
193
+ movw %ax, (%ecx)
194
+ jmp L(e1)
195
+
196
+ /* Fill out the table so that bad values are predictable. */
197
+ E(L(store_table), X86_RET_UNUSED14)
198
+ ud2
199
+ E(L(store_table), X86_RET_UNUSED15)
200
+ ud2
201
+
202
+ L(UW5):
203
+ # cfi_endproc
204
+ ENDF(ffi_call_i386)
205
+
206
+ /* The inner helper is declared as
207
+
208
+ void ffi_closure_inner(struct closure_frame *frame, char *argp)
209
+ __attribute_((fastcall))
210
+
211
+ Thus the arguments are placed in
212
+
213
+ ecx: frame
214
+ edx: argp
215
+ */
216
+
217
+ /* Macros to help setting up the closure_data structure. */
218
+
219
+ #if HAVE_FASTCALL
220
+ # define closure_FS (40 + 4)
221
+ # define closure_CF 0
222
+ #else
223
+ # define closure_FS (8 + 40 + 12)
224
+ # define closure_CF 8
329
225
  #endif
330
226
 
331
- #if defined __PIC__
332
- # if defined __sun__ && defined __svr4__
333
- /* 32-bit Solaris 2/x86 uses datarel encoding for PIC. GNU ld before 2.22
334
- doesn't correctly sort .eh_frame_hdr with mixed encodings, so match this. */
335
- # define FDE_ENCODING 0x30 /* datarel */
336
- # define FDE_ENCODE(X) X@GOTOFF
337
- # else
338
- # define FDE_ENCODING 0x1b /* pcrel sdata4 */
339
- # if defined HAVE_AS_X86_PCREL
340
- # define FDE_ENCODE(X) X-.
341
- # else
342
- # define FDE_ENCODE(X) X@rel
343
- # endif
344
- # endif
227
+ #define FFI_CLOSURE_SAVE_REGS \
228
+ movl %eax, closure_CF+16+R_EAX*4(%esp); \
229
+ movl %edx, closure_CF+16+R_EDX*4(%esp); \
230
+ movl %ecx, closure_CF+16+R_ECX*4(%esp)
231
+
232
+ #define FFI_CLOSURE_COPY_TRAMP_DATA \
233
+ movl FFI_TRAMPOLINE_SIZE(%eax), %edx; /* copy cif */ \
234
+ movl FFI_TRAMPOLINE_SIZE+4(%eax), %ecx; /* copy fun */ \
235
+ movl FFI_TRAMPOLINE_SIZE+8(%eax), %eax; /* copy user_data */ \
236
+ movl %edx, closure_CF+28(%esp); \
237
+ movl %ecx, closure_CF+32(%esp); \
238
+ movl %eax, closure_CF+36(%esp)
239
+
240
+ #if HAVE_FASTCALL
241
+ # define FFI_CLOSURE_PREP_CALL \
242
+ movl %esp, %ecx; /* load closure_data */ \
243
+ leal closure_FS+4(%esp), %edx; /* load incoming stack */
345
244
  #else
346
- # define FDE_ENCODING 0 /* absolute */
347
- # define FDE_ENCODE(X) X
245
+ # define FFI_CLOSURE_PREP_CALL \
246
+ leal closure_CF(%esp), %ecx; /* load closure_data */ \
247
+ leal closure_FS+4(%esp), %edx; /* load incoming stack */ \
248
+ movl %ecx, (%esp); \
249
+ movl %edx, 4(%esp)
348
250
  #endif
349
251
 
350
- .section .eh_frame,EH_FRAME_FLAGS,@progbits
351
- .Lframe1:
352
- .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */
353
- .LSCIE1:
354
- .long 0x0 /* CIE Identifier Tag */
355
- .byte 0x1 /* CIE Version */
356
- #ifdef HAVE_AS_ASCII_PSEUDO_OP
252
+ #define FFI_CLOSURE_CALL_INNER(UWN) \
253
+ call ffi_closure_inner
254
+
255
+ #define FFI_CLOSURE_MASK_AND_JUMP(N, UW) \
256
+ andl $X86_RET_TYPE_MASK, %eax; \
257
+ leal L(C1(load_table,N))(, %eax, 8), %edx; \
258
+ movl closure_CF(%esp), %eax; /* optimiztic load */ \
259
+ jmp *%edx
260
+
357
261
  #ifdef __PIC__
358
- .ascii "zR\0" /* CIE Augmentation */
262
+ # if defined X86_DARWIN || defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
263
+ # undef FFI_CLOSURE_MASK_AND_JUMP
264
+ # define FFI_CLOSURE_MASK_AND_JUMP(N, UW) \
265
+ andl $X86_RET_TYPE_MASK, %eax; \
266
+ call C(__x86.get_pc_thunk.dx); \
267
+ L(C1(pc,N)): \
268
+ leal L(C1(load_table,N))-L(C1(pc,N))(%edx, %eax, 8), %edx; \
269
+ movl closure_CF(%esp), %eax; /* optimiztic load */ \
270
+ jmp *%edx
271
+ # else
272
+ # define FFI_CLOSURE_CALL_INNER_SAVE_EBX
273
+ # undef FFI_CLOSURE_CALL_INNER
274
+ # define FFI_CLOSURE_CALL_INNER(UWN) \
275
+ movl %ebx, 40(%esp); /* save ebx */ \
276
+ L(C1(UW,UWN)): \
277
+ # cfi_rel_offset(%ebx, 40); \
278
+ call C(__x86.get_pc_thunk.bx); /* load got register */ \
279
+ addl $C(_GLOBAL_OFFSET_TABLE_), %ebx; \
280
+ call ffi_closure_inner@PLT
281
+ # undef FFI_CLOSURE_MASK_AND_JUMP
282
+ # define FFI_CLOSURE_MASK_AND_JUMP(N, UWN) \
283
+ andl $X86_RET_TYPE_MASK, %eax; \
284
+ leal L(C1(load_table,N))@GOTOFF(%ebx, %eax, 8), %edx; \
285
+ movl 40(%esp), %ebx; /* restore ebx */ \
286
+ L(C1(UW,UWN)): \
287
+ # cfi_restore(%ebx); \
288
+ movl closure_CF(%esp), %eax; /* optimiztic load */ \
289
+ jmp *%edx
290
+ # endif /* DARWIN || HIDDEN */
291
+ #endif /* __PIC__ */
292
+
293
+ .balign 16
294
+ .globl C(ffi_go_closure_EAX)
295
+ FFI_HIDDEN(C(ffi_go_closure_EAX))
296
+ C(ffi_go_closure_EAX):
297
+ L(UW6):
298
+ # cfi_startproc
299
+ subl $closure_FS, %esp
300
+ L(UW7):
301
+ # cfi_def_cfa_offset(closure_FS + 4)
302
+ FFI_CLOSURE_SAVE_REGS
303
+ movl 4(%eax), %edx /* copy cif */
304
+ movl 8(%eax), %ecx /* copy fun */
305
+ movl %edx, closure_CF+28(%esp)
306
+ movl %ecx, closure_CF+32(%esp)
307
+ movl %eax, closure_CF+36(%esp) /* closure is user_data */
308
+ jmp L(do_closure_i386)
309
+ L(UW8):
310
+ # cfi_endproc
311
+ ENDF(C(ffi_go_closure_EAX))
312
+
313
+ .balign 16
314
+ .globl C(ffi_go_closure_ECX)
315
+ FFI_HIDDEN(C(ffi_go_closure_ECX))
316
+ C(ffi_go_closure_ECX):
317
+ L(UW9):
318
+ # cfi_startproc
319
+ subl $closure_FS, %esp
320
+ L(UW10):
321
+ # cfi_def_cfa_offset(closure_FS + 4)
322
+ FFI_CLOSURE_SAVE_REGS
323
+ movl 4(%ecx), %edx /* copy cif */
324
+ movl 8(%ecx), %eax /* copy fun */
325
+ movl %edx, closure_CF+28(%esp)
326
+ movl %eax, closure_CF+32(%esp)
327
+ movl %ecx, closure_CF+36(%esp) /* closure is user_data */
328
+ jmp L(do_closure_i386)
329
+ L(UW11):
330
+ # cfi_endproc
331
+ ENDF(C(ffi_go_closure_ECX))
332
+
333
+ /* The closure entry points are reached from the ffi_closure trampoline.
334
+ On entry, %eax contains the address of the ffi_closure. */
335
+
336
+ .balign 16
337
+ .globl C(ffi_closure_i386)
338
+ FFI_HIDDEN(C(ffi_closure_i386))
339
+
340
+ C(ffi_closure_i386):
341
+ L(UW12):
342
+ # cfi_startproc
343
+ subl $closure_FS, %esp
344
+ L(UW13):
345
+ # cfi_def_cfa_offset(closure_FS + 4)
346
+
347
+ FFI_CLOSURE_SAVE_REGS
348
+ FFI_CLOSURE_COPY_TRAMP_DATA
349
+
350
+ /* Entry point from preceeding Go closures. */
351
+ L(do_closure_i386):
352
+
353
+ FFI_CLOSURE_PREP_CALL
354
+ FFI_CLOSURE_CALL_INNER(14)
355
+ FFI_CLOSURE_MASK_AND_JUMP(2, 15)
356
+
357
+ .balign 8
358
+ L(load_table2):
359
+ E(L(load_table2), X86_RET_FLOAT)
360
+ flds closure_CF(%esp)
361
+ jmp L(e2)
362
+ E(L(load_table2), X86_RET_DOUBLE)
363
+ fldl closure_CF(%esp)
364
+ jmp L(e2)
365
+ E(L(load_table2), X86_RET_LDOUBLE)
366
+ fldt closure_CF(%esp)
367
+ jmp L(e2)
368
+ E(L(load_table2), X86_RET_SINT8)
369
+ movsbl %al, %eax
370
+ jmp L(e2)
371
+ E(L(load_table2), X86_RET_SINT16)
372
+ movswl %ax, %eax
373
+ jmp L(e2)
374
+ E(L(load_table2), X86_RET_UINT8)
375
+ movzbl %al, %eax
376
+ jmp L(e2)
377
+ E(L(load_table2), X86_RET_UINT16)
378
+ movzwl %ax, %eax
379
+ jmp L(e2)
380
+ E(L(load_table2), X86_RET_INT64)
381
+ movl closure_CF+4(%esp), %edx
382
+ jmp L(e2)
383
+ E(L(load_table2), X86_RET_INT32)
384
+ nop
385
+ /* fallthru */
386
+ E(L(load_table2), X86_RET_VOID)
387
+ L(e2):
388
+ addl $closure_FS, %esp
389
+ L(UW16):
390
+ # cfi_adjust_cfa_offset(-closure_FS)
391
+ ret
392
+ L(UW17):
393
+ # cfi_adjust_cfa_offset(closure_FS)
394
+ E(L(load_table2), X86_RET_STRUCTPOP)
395
+ addl $closure_FS, %esp
396
+ L(UW18):
397
+ # cfi_adjust_cfa_offset(-closure_FS)
398
+ ret $4
399
+ L(UW19):
400
+ # cfi_adjust_cfa_offset(closure_FS)
401
+ E(L(load_table2), X86_RET_STRUCTARG)
402
+ jmp L(e2)
403
+ E(L(load_table2), X86_RET_STRUCT_1B)
404
+ movzbl %al, %eax
405
+ jmp L(e2)
406
+ E(L(load_table2), X86_RET_STRUCT_2B)
407
+ movzwl %ax, %eax
408
+ jmp L(e2)
409
+
410
+ /* Fill out the table so that bad values are predictable. */
411
+ E(L(load_table2), X86_RET_UNUSED14)
412
+ ud2
413
+ E(L(load_table2), X86_RET_UNUSED15)
414
+ ud2
415
+
416
+ L(UW20):
417
+ # cfi_endproc
418
+ ENDF(C(ffi_closure_i386))
419
+
420
+ .balign 16
421
+ .globl C(ffi_go_closure_STDCALL)
422
+ FFI_HIDDEN(C(ffi_go_closure_STDCALL))
423
+ C(ffi_go_closure_STDCALL):
424
+ L(UW21):
425
+ # cfi_startproc
426
+ subl $closure_FS, %esp
427
+ L(UW22):
428
+ # cfi_def_cfa_offset(closure_FS + 4)
429
+ FFI_CLOSURE_SAVE_REGS
430
+ movl 4(%ecx), %edx /* copy cif */
431
+ movl 8(%ecx), %eax /* copy fun */
432
+ movl %edx, closure_CF+28(%esp)
433
+ movl %eax, closure_CF+32(%esp)
434
+ movl %ecx, closure_CF+36(%esp) /* closure is user_data */
435
+ jmp L(do_closure_STDCALL)
436
+ L(UW23):
437
+ # cfi_endproc
438
+ ENDF(C(ffi_go_closure_STDCALL))
439
+
440
+ /* For REGISTER, we have no available parameter registers, and so we
441
+ enter here having pushed the closure onto the stack. */
442
+
443
+ .balign 16
444
+ .globl C(ffi_closure_REGISTER)
445
+ FFI_HIDDEN(C(ffi_closure_REGISTER))
446
+ C(ffi_closure_REGISTER):
447
+ L(UW24):
448
+ # cfi_startproc
449
+ # cfi_def_cfa(%esp, 8)
450
+ # cfi_offset(%eip, -8)
451
+ subl $closure_FS-4, %esp
452
+ L(UW25):
453
+ # cfi_def_cfa_offset(closure_FS + 4)
454
+ FFI_CLOSURE_SAVE_REGS
455
+ movl closure_FS-4(%esp), %ecx /* load retaddr */
456
+ movl closure_FS(%esp), %eax /* load closure */
457
+ movl %ecx, closure_FS(%esp) /* move retaddr */
458
+ jmp L(do_closure_REGISTER)
459
+ L(UW26):
460
+ # cfi_endproc
461
+ ENDF(C(ffi_closure_REGISTER))
462
+
463
+ /* For STDCALL (and others), we need to pop N bytes of arguments off
464
+ the stack following the closure. The amount needing to be popped
465
+ is returned to us from ffi_closure_inner. */
466
+
467
+ .balign 16
468
+ .globl C(ffi_closure_STDCALL)
469
+ FFI_HIDDEN(C(ffi_closure_STDCALL))
470
+ C(ffi_closure_STDCALL):
471
+ L(UW27):
472
+ # cfi_startproc
473
+ subl $closure_FS, %esp
474
+ L(UW28):
475
+ # cfi_def_cfa_offset(closure_FS + 4)
476
+
477
+ FFI_CLOSURE_SAVE_REGS
478
+
479
+ /* Entry point from ffi_closure_REGISTER. */
480
+ L(do_closure_REGISTER):
481
+
482
+ FFI_CLOSURE_COPY_TRAMP_DATA
483
+
484
+ /* Entry point from preceeding Go closure. */
485
+ L(do_closure_STDCALL):
486
+
487
+ FFI_CLOSURE_PREP_CALL
488
+ FFI_CLOSURE_CALL_INNER(29)
489
+
490
+ movl %eax, %ecx
491
+ shrl $X86_RET_POP_SHIFT, %ecx /* isolate pop count */
492
+ leal closure_FS(%esp, %ecx), %ecx /* compute popped esp */
493
+ movl closure_FS(%esp), %edx /* move return address */
494
+ movl %edx, (%ecx)
495
+
496
+ /* From this point on, the value of %esp upon return is %ecx+4,
497
+ and we've copied the return address to %ecx to make return easy.
498
+ There's no point in representing this in the unwind info, as
499
+ there is always a window between the mov and the ret which
500
+ will be wrong from one point of view or another. */
501
+
502
+ FFI_CLOSURE_MASK_AND_JUMP(3, 30)
503
+
504
+ .balign 8
505
+ L(load_table3):
506
+ E(L(load_table3), X86_RET_FLOAT)
507
+ flds closure_CF(%esp)
508
+ movl %ecx, %esp
509
+ ret
510
+ E(L(load_table3), X86_RET_DOUBLE)
511
+ fldl closure_CF(%esp)
512
+ movl %ecx, %esp
513
+ ret
514
+ E(L(load_table3), X86_RET_LDOUBLE)
515
+ fldt closure_CF(%esp)
516
+ movl %ecx, %esp
517
+ ret
518
+ E(L(load_table3), X86_RET_SINT8)
519
+ movsbl %al, %eax
520
+ movl %ecx, %esp
521
+ ret
522
+ E(L(load_table3), X86_RET_SINT16)
523
+ movswl %ax, %eax
524
+ movl %ecx, %esp
525
+ ret
526
+ E(L(load_table3), X86_RET_UINT8)
527
+ movzbl %al, %eax
528
+ movl %ecx, %esp
529
+ ret
530
+ E(L(load_table3), X86_RET_UINT16)
531
+ movzwl %ax, %eax
532
+ movl %ecx, %esp
533
+ ret
534
+ E(L(load_table3), X86_RET_INT64)
535
+ movl closure_CF+4(%esp), %edx
536
+ movl %ecx, %esp
537
+ ret
538
+ E(L(load_table3), X86_RET_INT32)
539
+ movl %ecx, %esp
540
+ ret
541
+ E(L(load_table3), X86_RET_VOID)
542
+ movl %ecx, %esp
543
+ ret
544
+ E(L(load_table3), X86_RET_STRUCTPOP)
545
+ movl %ecx, %esp
546
+ ret
547
+ E(L(load_table3), X86_RET_STRUCTARG)
548
+ movl %ecx, %esp
549
+ ret
550
+ E(L(load_table3), X86_RET_STRUCT_1B)
551
+ movzbl %al, %eax
552
+ movl %ecx, %esp
553
+ ret
554
+ E(L(load_table3), X86_RET_STRUCT_2B)
555
+ movzwl %ax, %eax
556
+ movl %ecx, %esp
557
+ ret
558
+
559
+ /* Fill out the table so that bad values are predictable. */
560
+ E(L(load_table3), X86_RET_UNUSED14)
561
+ ud2
562
+ E(L(load_table3), X86_RET_UNUSED15)
563
+ ud2
564
+
565
+ L(UW31):
566
+ # cfi_endproc
567
+ ENDF(C(ffi_closure_STDCALL))
568
+
569
+ #if !FFI_NO_RAW_API
570
+
571
+ #define raw_closure_S_FS (16+16+12)
572
+
573
+ .balign 16
574
+ .globl C(ffi_closure_raw_SYSV)
575
+ FFI_HIDDEN(C(ffi_closure_raw_SYSV))
576
+ C(ffi_closure_raw_SYSV):
577
+ L(UW32):
578
+ # cfi_startproc
579
+ subl $raw_closure_S_FS, %esp
580
+ L(UW33):
581
+ # cfi_def_cfa_offset(raw_closure_S_FS + 4)
582
+ movl %ebx, raw_closure_S_FS-4(%esp)
583
+ L(UW34):
584
+ # cfi_rel_offset(%ebx, raw_closure_S_FS-4)
585
+
586
+ movl FFI_TRAMPOLINE_SIZE+8(%eax), %edx /* load cl->user_data */
587
+ movl %edx, 12(%esp)
588
+ leal raw_closure_S_FS+4(%esp), %edx /* load raw_args */
589
+ movl %edx, 8(%esp)
590
+ leal 16(%esp), %edx /* load &res */
591
+ movl %edx, 4(%esp)
592
+ movl FFI_TRAMPOLINE_SIZE(%eax), %ebx /* load cl->cif */
593
+ movl %ebx, (%esp)
594
+ call *FFI_TRAMPOLINE_SIZE+4(%eax) /* call cl->fun */
595
+
596
+ movl 20(%ebx), %eax /* load cif->flags */
597
+ andl $X86_RET_TYPE_MASK, %eax
598
+ #ifdef __PIC__
599
+ call C(__x86.get_pc_thunk.bx)
600
+ L(pc4):
601
+ leal L(load_table4)-L(pc4)(%ebx, %eax, 8), %ecx
359
602
  #else
360
- .ascii "\0" /* CIE Augmentation */
603
+ leal L(load_table4)(,%eax, 8), %ecx
361
604
  #endif
362
- #elif defined HAVE_AS_STRING_PSEUDO_OP
605
+ movl raw_closure_S_FS-4(%esp), %ebx
606
+ L(UW35):
607
+ # cfi_restore(%ebx)
608
+ movl 16(%esp), %eax /* Optimistic load */
609
+ jmp *%ecx
610
+
611
+ .balign 8
612
+ L(load_table4):
613
+ E(L(load_table4), X86_RET_FLOAT)
614
+ flds 16(%esp)
615
+ jmp L(e4)
616
+ E(L(load_table4), X86_RET_DOUBLE)
617
+ fldl 16(%esp)
618
+ jmp L(e4)
619
+ E(L(load_table4), X86_RET_LDOUBLE)
620
+ fldt 16(%esp)
621
+ jmp L(e4)
622
+ E(L(load_table4), X86_RET_SINT8)
623
+ movsbl %al, %eax
624
+ jmp L(e4)
625
+ E(L(load_table4), X86_RET_SINT16)
626
+ movswl %ax, %eax
627
+ jmp L(e4)
628
+ E(L(load_table4), X86_RET_UINT8)
629
+ movzbl %al, %eax
630
+ jmp L(e4)
631
+ E(L(load_table4), X86_RET_UINT16)
632
+ movzwl %ax, %eax
633
+ jmp L(e4)
634
+ E(L(load_table4), X86_RET_INT64)
635
+ movl 16+4(%esp), %edx
636
+ jmp L(e4)
637
+ E(L(load_table4), X86_RET_INT32)
638
+ nop
639
+ /* fallthru */
640
+ E(L(load_table4), X86_RET_VOID)
641
+ L(e4):
642
+ addl $raw_closure_S_FS, %esp
643
+ L(UW36):
644
+ # cfi_adjust_cfa_offset(-raw_closure_S_FS)
645
+ ret
646
+ L(UW37):
647
+ # cfi_adjust_cfa_offset(raw_closure_S_FS)
648
+ E(L(load_table4), X86_RET_STRUCTPOP)
649
+ addl $raw_closure_S_FS, %esp
650
+ L(UW38):
651
+ # cfi_adjust_cfa_offset(-raw_closure_S_FS)
652
+ ret $4
653
+ L(UW39):
654
+ # cfi_adjust_cfa_offset(raw_closure_S_FS)
655
+ E(L(load_table4), X86_RET_STRUCTARG)
656
+ jmp L(e4)
657
+ E(L(load_table4), X86_RET_STRUCT_1B)
658
+ movzbl %al, %eax
659
+ jmp L(e4)
660
+ E(L(load_table4), X86_RET_STRUCT_2B)
661
+ movzwl %ax, %eax
662
+ jmp L(e4)
663
+
664
+ /* Fill out the table so that bad values are predictable. */
665
+ E(L(load_table4), X86_RET_UNUSED14)
666
+ ud2
667
+ E(L(load_table4), X86_RET_UNUSED15)
668
+ ud2
669
+
670
+ L(UW40):
671
+ # cfi_endproc
672
+ ENDF(C(ffi_closure_raw_SYSV))
673
+
674
+ #define raw_closure_T_FS (16+16+8)
675
+
676
+ .balign 16
677
+ .globl C(ffi_closure_raw_THISCALL)
678
+ FFI_HIDDEN(C(ffi_closure_raw_THISCALL))
679
+ C(ffi_closure_raw_THISCALL):
680
+ L(UW41):
681
+ # cfi_startproc
682
+ /* Rearrange the stack such that %ecx is the first argument.
683
+ This means moving the return address. */
684
+ popl %edx
685
+ L(UW42):
686
+ # cfi_def_cfa_offset(0)
687
+ # cfi_register(%eip, %edx)
688
+ pushl %ecx
689
+ L(UW43):
690
+ # cfi_adjust_cfa_offset(4)
691
+ pushl %edx
692
+ L(UW44):
693
+ # cfi_adjust_cfa_offset(4)
694
+ # cfi_rel_offset(%eip, 0)
695
+ subl $raw_closure_T_FS, %esp
696
+ L(UW45):
697
+ # cfi_adjust_cfa_offset(raw_closure_T_FS)
698
+ movl %ebx, raw_closure_T_FS-4(%esp)
699
+ L(UW46):
700
+ # cfi_rel_offset(%ebx, raw_closure_T_FS-4)
701
+
702
+ movl FFI_TRAMPOLINE_SIZE+8(%eax), %edx /* load cl->user_data */
703
+ movl %edx, 12(%esp)
704
+ leal raw_closure_T_FS+4(%esp), %edx /* load raw_args */
705
+ movl %edx, 8(%esp)
706
+ leal 16(%esp), %edx /* load &res */
707
+ movl %edx, 4(%esp)
708
+ movl FFI_TRAMPOLINE_SIZE(%eax), %ebx /* load cl->cif */
709
+ movl %ebx, (%esp)
710
+ call *FFI_TRAMPOLINE_SIZE+4(%eax) /* call cl->fun */
711
+
712
+ movl 20(%ebx), %eax /* load cif->flags */
713
+ andl $X86_RET_TYPE_MASK, %eax
363
714
  #ifdef __PIC__
364
- .string "zR" /* CIE Augmentation */
715
+ call C(__x86.get_pc_thunk.bx)
716
+ L(pc5):
717
+ leal L(load_table5)-L(pc5)(%ebx, %eax, 8), %ecx
365
718
  #else
366
- .string "" /* CIE Augmentation */
719
+ leal L(load_table5)(,%eax, 8), %ecx
367
720
  #endif
721
+ movl raw_closure_T_FS-4(%esp), %ebx
722
+ L(UW47):
723
+ # cfi_restore(%ebx)
724
+ movl 16(%esp), %eax /* Optimistic load */
725
+ jmp *%ecx
726
+
727
+ .balign 8
728
+ L(load_table5):
729
+ E(L(load_table5), X86_RET_FLOAT)
730
+ flds 16(%esp)
731
+ jmp L(e5)
732
+ E(L(load_table5), X86_RET_DOUBLE)
733
+ fldl 16(%esp)
734
+ jmp L(e5)
735
+ E(L(load_table5), X86_RET_LDOUBLE)
736
+ fldt 16(%esp)
737
+ jmp L(e5)
738
+ E(L(load_table5), X86_RET_SINT8)
739
+ movsbl %al, %eax
740
+ jmp L(e5)
741
+ E(L(load_table5), X86_RET_SINT16)
742
+ movswl %ax, %eax
743
+ jmp L(e5)
744
+ E(L(load_table5), X86_RET_UINT8)
745
+ movzbl %al, %eax
746
+ jmp L(e5)
747
+ E(L(load_table5), X86_RET_UINT16)
748
+ movzwl %ax, %eax
749
+ jmp L(e5)
750
+ E(L(load_table5), X86_RET_INT64)
751
+ movl 16+4(%esp), %edx
752
+ jmp L(e5)
753
+ E(L(load_table5), X86_RET_INT32)
754
+ nop
755
+ /* fallthru */
756
+ E(L(load_table5), X86_RET_VOID)
757
+ L(e5):
758
+ addl $raw_closure_T_FS, %esp
759
+ L(UW48):
760
+ # cfi_adjust_cfa_offset(-raw_closure_T_FS)
761
+ /* Remove the extra %ecx argument we pushed. */
762
+ ret $4
763
+ L(UW49):
764
+ # cfi_adjust_cfa_offset(raw_closure_T_FS)
765
+ E(L(load_table5), X86_RET_STRUCTPOP)
766
+ addl $raw_closure_T_FS, %esp
767
+ L(UW50):
768
+ # cfi_adjust_cfa_offset(-raw_closure_T_FS)
769
+ ret $8
770
+ L(UW51):
771
+ # cfi_adjust_cfa_offset(raw_closure_T_FS)
772
+ E(L(load_table5), X86_RET_STRUCTARG)
773
+ jmp L(e5)
774
+ E(L(load_table5), X86_RET_STRUCT_1B)
775
+ movzbl %al, %eax
776
+ jmp L(e5)
777
+ E(L(load_table5), X86_RET_STRUCT_2B)
778
+ movzwl %ax, %eax
779
+ jmp L(e5)
780
+
781
+ /* Fill out the table so that bad values are predictable. */
782
+ E(L(load_table5), X86_RET_UNUSED14)
783
+ ud2
784
+ E(L(load_table5), X86_RET_UNUSED15)
785
+ ud2
786
+
787
+ L(UW52):
788
+ # cfi_endproc
789
+ ENDF(C(ffi_closure_raw_THISCALL))
790
+
791
+ #endif /* !FFI_NO_RAW_API */
792
+
793
+ #ifdef X86_DARWIN
794
+ # define COMDAT(X) \
795
+ .section __TEXT,__textcoal_nt,coalesced,pure_instructions; \
796
+ .weak_definition X; \
797
+ .private_extern X
798
+ #elif defined __ELF__ && !(defined(__sun__) && defined(__svr4__))
799
+ # define COMDAT(X) \
800
+ .section .text.X,"axG",@progbits,X,comdat; \
801
+ .globl X; \
802
+ FFI_HIDDEN(X)
368
803
  #else
369
- #error missing .ascii/.string
370
- #endif
371
- .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */
372
- .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */
373
- .byte 0x8 /* CIE RA Column */
374
- #ifdef __PIC__
375
- .byte 0x1 /* .uleb128 0x1; Augmentation size */
376
- .byte FDE_ENCODING
377
- #endif
378
- .byte 0xc /* DW_CFA_def_cfa */
379
- .byte 0x4 /* .uleb128 0x4 */
380
- .byte 0x4 /* .uleb128 0x4 */
381
- .byte 0x88 /* DW_CFA_offset, column 0x8 */
382
- .byte 0x1 /* .uleb128 0x1 */
383
- .align 4
384
- .LECIE1:
385
- .LSFDE1:
386
- .long .LEFDE1-.LASFDE1 /* FDE Length */
387
- .LASFDE1:
388
- .long .LASFDE1-.Lframe1 /* FDE CIE offset */
389
- .long FDE_ENCODE(.LFB1) /* FDE initial location */
390
- .long .LFE1-.LFB1 /* FDE address range */
391
- #ifdef __PIC__
392
- .byte 0x0 /* .uleb128 0x0; Augmentation size */
804
+ # define COMDAT(X)
393
805
  #endif
394
- .byte 0x4 /* DW_CFA_advance_loc4 */
395
- .long .LCFI0-.LFB1
396
- .byte 0xe /* DW_CFA_def_cfa_offset */
397
- .byte 0x8 /* .uleb128 0x8 */
398
- .byte 0x85 /* DW_CFA_offset, column 0x5 */
399
- .byte 0x2 /* .uleb128 0x2 */
400
- .byte 0x4 /* DW_CFA_advance_loc4 */
401
- .long .LCFI1-.LCFI0
402
- .byte 0xd /* DW_CFA_def_cfa_register */
403
- .byte 0x5 /* .uleb128 0x5 */
404
- .align 4
405
- .LEFDE1:
406
- .LSFDE2:
407
- .long .LEFDE2-.LASFDE2 /* FDE Length */
408
- .LASFDE2:
409
- .long .LASFDE2-.Lframe1 /* FDE CIE offset */
410
- .long FDE_ENCODE(.LFB2) /* FDE initial location */
411
- .long .LFE2-.LFB2 /* FDE address range */
412
- #ifdef __PIC__
413
- .byte 0x0 /* .uleb128 0x0; Augmentation size */
806
+
807
+ #if defined(__PIC__)
808
+ COMDAT(C(__x86.get_pc_thunk.bx))
809
+ C(__x86.get_pc_thunk.bx):
810
+ movl (%esp), %ebx
811
+ ret
812
+ ENDF(C(__x86.get_pc_thunk.bx))
813
+ # if defined X86_DARWIN || defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
814
+ COMDAT(C(__x86.get_pc_thunk.dx))
815
+ C(__x86.get_pc_thunk.dx):
816
+ movl (%esp), %edx
817
+ ret
818
+ ENDF(C(__x86.get_pc_thunk.dx))
819
+ #endif /* DARWIN || HIDDEN */
820
+ #endif /* __PIC__ */
821
+
822
+ /* Sadly, OSX cctools-as doesn't understand .cfi directives at all. */
823
+
824
+ #ifdef __APPLE__
825
+ .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
826
+ EHFrame0:
827
+ #elif defined(X86_WIN32)
828
+ .section .eh_frame,"r"
829
+ #elif defined(HAVE_AS_X86_64_UNWIND_SECTION_TYPE)
830
+ .section .eh_frame,EH_FRAME_FLAGS,@unwind
831
+ #else
832
+ .section .eh_frame,EH_FRAME_FLAGS,@progbits
414
833
  #endif
415
- .byte 0x4 /* DW_CFA_advance_loc4 */
416
- .long .LCFI2-.LFB2
417
- .byte 0xe /* DW_CFA_def_cfa_offset */
418
- .byte 0x8 /* .uleb128 0x8 */
419
- .byte 0x85 /* DW_CFA_offset, column 0x5 */
420
- .byte 0x2 /* .uleb128 0x2 */
421
- .byte 0x4 /* DW_CFA_advance_loc4 */
422
- .long .LCFI3-.LCFI2
423
- .byte 0xd /* DW_CFA_def_cfa_register */
424
- .byte 0x5 /* .uleb128 0x5 */
425
- #if !defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE && defined __PIC__
426
- .byte 0x4 /* DW_CFA_advance_loc4 */
427
- .long .LCFI7-.LCFI3
428
- .byte 0x83 /* DW_CFA_offset, column 0x3 */
429
- .byte 0xa /* .uleb128 0xa */
834
+
835
+ #ifdef HAVE_AS_X86_PCREL
836
+ # define PCREL(X) X - .
837
+ #else
838
+ # define PCREL(X) X@rel
430
839
  #endif
431
- .align 4
432
- .LEFDE2:
433
840
 
434
- #if !FFI_NO_RAW_API
841
+ /* Simplify advancing between labels. Assume DW_CFA_advance_loc1 fits. */
842
+ #define ADV(N, P) .byte 2, L(N)-L(P)
435
843
 
436
- .LSFDE3:
437
- .long .LEFDE3-.LASFDE3 /* FDE Length */
438
- .LASFDE3:
439
- .long .LASFDE3-.Lframe1 /* FDE CIE offset */
440
- .long FDE_ENCODE(.LFB3) /* FDE initial location */
441
- .long .LFE3-.LFB3 /* FDE address range */
442
- #ifdef __PIC__
443
- .byte 0x0 /* .uleb128 0x0; Augmentation size */
844
+ .balign 4
845
+ L(CIE):
846
+ .set L(set0),L(ECIE)-L(SCIE)
847
+ .long L(set0) /* CIE Length */
848
+ L(SCIE):
849
+ .long 0 /* CIE Identifier Tag */
850
+ .byte 1 /* CIE Version */
851
+ .ascii "zR\0" /* CIE Augmentation */
852
+ .byte 1 /* CIE Code Alignment Factor */
853
+ .byte 0x7c /* CIE Data Alignment Factor */
854
+ .byte 0x8 /* CIE RA Column */
855
+ .byte 1 /* Augmentation size */
856
+ .byte 0x1b /* FDE Encoding (pcrel sdata4) */
857
+ .byte 0xc, 4, 4 /* DW_CFA_def_cfa, %esp offset 4 */
858
+ .byte 0x80+8, 1 /* DW_CFA_offset, %eip offset 1*-4 */
859
+ .balign 4
860
+ L(ECIE):
861
+
862
+ .set L(set1),L(EFDE1)-L(SFDE1)
863
+ .long L(set1) /* FDE Length */
864
+ L(SFDE1):
865
+ .long L(SFDE1)-L(CIE) /* FDE CIE offset */
866
+ .long PCREL(L(UW0)) /* Initial location */
867
+ .long L(UW5)-L(UW0) /* Address range */
868
+ .byte 0 /* Augmentation size */
869
+ ADV(UW1, UW0)
870
+ .byte 0xc, 5, 8 /* DW_CFA_def_cfa, %ebp 8 */
871
+ .byte 0x80+5, 2 /* DW_CFA_offset, %ebp 2*-4 */
872
+ ADV(UW2, UW1)
873
+ .byte 0x80+3, 0 /* DW_CFA_offset, %ebx 0*-4 */
874
+ ADV(UW3, UW2)
875
+ .byte 0xa /* DW_CFA_remember_state */
876
+ .byte 0xc, 4, 4 /* DW_CFA_def_cfa, %esp 4 */
877
+ .byte 0xc0+3 /* DW_CFA_restore, %ebx */
878
+ .byte 0xc0+5 /* DW_CFA_restore, %ebp */
879
+ ADV(UW4, UW3)
880
+ .byte 0xb /* DW_CFA_restore_state */
881
+ .balign 4
882
+ L(EFDE1):
883
+
884
+ .set L(set2),L(EFDE2)-L(SFDE2)
885
+ .long L(set2) /* FDE Length */
886
+ L(SFDE2):
887
+ .long L(SFDE2)-L(CIE) /* FDE CIE offset */
888
+ .long PCREL(L(UW6)) /* Initial location */
889
+ .long L(UW8)-L(UW6) /* Address range */
890
+ .byte 0 /* Augmentation size */
891
+ ADV(UW7, UW6)
892
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
893
+ .balign 4
894
+ L(EFDE2):
895
+
896
+ .set L(set3),L(EFDE3)-L(SFDE3)
897
+ .long L(set3) /* FDE Length */
898
+ L(SFDE3):
899
+ .long L(SFDE3)-L(CIE) /* FDE CIE offset */
900
+ .long PCREL(L(UW9)) /* Initial location */
901
+ .long L(UW11)-L(UW9) /* Address range */
902
+ .byte 0 /* Augmentation size */
903
+ ADV(UW10, UW9)
904
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
905
+ .balign 4
906
+ L(EFDE3):
907
+
908
+ .set L(set4),L(EFDE4)-L(SFDE4)
909
+ .long L(set4) /* FDE Length */
910
+ L(SFDE4):
911
+ .long L(SFDE4)-L(CIE) /* FDE CIE offset */
912
+ .long PCREL(L(UW12)) /* Initial location */
913
+ .long L(UW20)-L(UW12) /* Address range */
914
+ .byte 0 /* Augmentation size */
915
+ ADV(UW13, UW12)
916
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
917
+ #ifdef FFI_CLOSURE_CALL_INNER_SAVE_EBX
918
+ ADV(UW14, UW13)
919
+ .byte 0x80+3, (40-(closure_FS+4))/-4 /* DW_CFA_offset %ebx */
920
+ ADV(UW15, UW14)
921
+ .byte 0xc0+3 /* DW_CFA_restore %ebx */
922
+ ADV(UW16, UW15)
923
+ #else
924
+ ADV(UW16, UW13)
444
925
  #endif
445
- .byte 0x4 /* DW_CFA_advance_loc4 */
446
- .long .LCFI4-.LFB3
447
- .byte 0xe /* DW_CFA_def_cfa_offset */
448
- .byte 0x8 /* .uleb128 0x8 */
449
- .byte 0x85 /* DW_CFA_offset, column 0x5 */
450
- .byte 0x2 /* .uleb128 0x2 */
451
- .byte 0x4 /* DW_CFA_advance_loc4 */
452
- .long .LCFI5-.LCFI4
453
- .byte 0xd /* DW_CFA_def_cfa_register */
454
- .byte 0x5 /* .uleb128 0x5 */
455
- .byte 0x4 /* DW_CFA_advance_loc4 */
456
- .long .LCFI6-.LCFI5
457
- .byte 0x86 /* DW_CFA_offset, column 0x6 */
458
- .byte 0x3 /* .uleb128 0x3 */
459
- .align 4
460
- .LEFDE3:
926
+ .byte 0xe, 4 /* DW_CFA_def_cfa_offset */
927
+ ADV(UW17, UW16)
928
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
929
+ ADV(UW18, UW17)
930
+ .byte 0xe, 4 /* DW_CFA_def_cfa_offset */
931
+ ADV(UW19, UW18)
932
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
933
+ .balign 4
934
+ L(EFDE4):
935
+
936
+ .set L(set5),L(EFDE5)-L(SFDE5)
937
+ .long L(set5) /* FDE Length */
938
+ L(SFDE5):
939
+ .long L(SFDE5)-L(CIE) /* FDE CIE offset */
940
+ .long PCREL(L(UW21)) /* Initial location */
941
+ .long L(UW23)-L(UW21) /* Address range */
942
+ .byte 0 /* Augmentation size */
943
+ ADV(UW22, UW21)
944
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
945
+ .balign 4
946
+ L(EFDE5):
461
947
 
948
+ .set L(set6),L(EFDE6)-L(SFDE6)
949
+ .long L(set6) /* FDE Length */
950
+ L(SFDE6):
951
+ .long L(SFDE6)-L(CIE) /* FDE CIE offset */
952
+ .long PCREL(L(UW24)) /* Initial location */
953
+ .long L(UW26)-L(UW24) /* Address range */
954
+ .byte 0 /* Augmentation size */
955
+ .byte 0xe, 8 /* DW_CFA_def_cfa_offset */
956
+ .byte 0x80+8, 2 /* DW_CFA_offset %eip, 2*-4 */
957
+ ADV(UW25, UW24)
958
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
959
+ .balign 4
960
+ L(EFDE6):
961
+
962
+ .set L(set7),L(EFDE7)-L(SFDE7)
963
+ .long L(set7) /* FDE Length */
964
+ L(SFDE7):
965
+ .long L(SFDE7)-L(CIE) /* FDE CIE offset */
966
+ .long PCREL(L(UW27)) /* Initial location */
967
+ .long L(UW31)-L(UW27) /* Address range */
968
+ .byte 0 /* Augmentation size */
969
+ ADV(UW28, UW27)
970
+ .byte 0xe, closure_FS+4 /* DW_CFA_def_cfa_offset */
971
+ #ifdef FFI_CLOSURE_CALL_INNER_SAVE_EBX
972
+ ADV(UW29, UW28)
973
+ .byte 0x80+3, (40-(closure_FS+4))/-4 /* DW_CFA_offset %ebx */
974
+ ADV(UW30, UW29)
975
+ .byte 0xc0+3 /* DW_CFA_restore %ebx */
462
976
  #endif
977
+ .balign 4
978
+ L(EFDE7):
979
+
980
+ #if !FFI_NO_RAW_API
981
+ .set L(set8),L(EFDE8)-L(SFDE8)
982
+ .long L(set8) /* FDE Length */
983
+ L(SFDE8):
984
+ .long L(SFDE8)-L(CIE) /* FDE CIE offset */
985
+ .long PCREL(L(UW32)) /* Initial location */
986
+ .long L(UW40)-L(UW32) /* Address range */
987
+ .byte 0 /* Augmentation size */
988
+ ADV(UW33, UW32)
989
+ .byte 0xe, raw_closure_S_FS+4 /* DW_CFA_def_cfa_offset */
990
+ ADV(UW34, UW33)
991
+ .byte 0x80+3, 2 /* DW_CFA_offset %ebx 2*-4 */
992
+ ADV(UW35, UW34)
993
+ .byte 0xc0+3 /* DW_CFA_restore %ebx */
994
+ ADV(UW36, UW35)
995
+ .byte 0xe, 4 /* DW_CFA_def_cfa_offset */
996
+ ADV(UW37, UW36)
997
+ .byte 0xe, raw_closure_S_FS+4 /* DW_CFA_def_cfa_offset */
998
+ ADV(UW38, UW37)
999
+ .byte 0xe, 4 /* DW_CFA_def_cfa_offset */
1000
+ ADV(UW39, UW38)
1001
+ .byte 0xe, raw_closure_S_FS+4 /* DW_CFA_def_cfa_offset */
1002
+ .balign 4
1003
+ L(EFDE8):
1004
+
1005
+ .set L(set9),L(EFDE9)-L(SFDE9)
1006
+ .long L(set9) /* FDE Length */
1007
+ L(SFDE9):
1008
+ .long L(SFDE9)-L(CIE) /* FDE CIE offset */
1009
+ .long PCREL(L(UW41)) /* Initial location */
1010
+ .long L(UW52)-L(UW41) /* Address range */
1011
+ .byte 0 /* Augmentation size */
1012
+ ADV(UW42, UW41)
1013
+ .byte 0xe, 0 /* DW_CFA_def_cfa_offset */
1014
+ .byte 0x9, 8, 2 /* DW_CFA_register %eip, %edx */
1015
+ ADV(UW43, UW42)
1016
+ .byte 0xe, 4 /* DW_CFA_def_cfa_offset */
1017
+ ADV(UW44, UW43)
1018
+ .byte 0xe, 8 /* DW_CFA_def_cfa_offset */
1019
+ .byte 0x80+8, 2 /* DW_CFA_offset %eip 2*-4 */
1020
+ ADV(UW45, UW44)
1021
+ .byte 0xe, raw_closure_T_FS+8 /* DW_CFA_def_cfa_offset */
1022
+ ADV(UW46, UW45)
1023
+ .byte 0x80+3, 3 /* DW_CFA_offset %ebx 3*-4 */
1024
+ ADV(UW47, UW46)
1025
+ .byte 0xc0+3 /* DW_CFA_restore %ebx */
1026
+ ADV(UW48, UW47)
1027
+ .byte 0xe, 8 /* DW_CFA_def_cfa_offset */
1028
+ ADV(UW49, UW48)
1029
+ .byte 0xe, raw_closure_T_FS+8 /* DW_CFA_def_cfa_offset */
1030
+ ADV(UW50, UW49)
1031
+ .byte 0xe, 8 /* DW_CFA_def_cfa_offset */
1032
+ ADV(UW51, UW50)
1033
+ .byte 0xe, raw_closure_T_FS+8 /* DW_CFA_def_cfa_offset */
1034
+ .balign 4
1035
+ L(EFDE9):
1036
+ #endif /* !FFI_NO_RAW_API */
463
1037
 
1038
+ #endif /* ifndef _MSC_VER */
464
1039
  #endif /* ifndef __x86_64__ */
465
1040
 
466
1041
  #if defined __ELF__ && defined __linux__