ffi 1.1.2 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +456 -0
- data/COPYING +49 -0
- data/Gemfile +21 -0
- data/LICENSE +21 -11
- data/LICENSE.SPECS +22 -0
- data/README.md +137 -0
- data/Rakefile +166 -156
- data/ext/ffi_c/AbstractMemory.c +240 -140
- data/ext/ffi_c/AbstractMemory.h +25 -15
- data/ext/ffi_c/ArrayType.c +78 -29
- data/ext/ffi_c/ArrayType.h +22 -12
- data/ext/ffi_c/Buffer.c +121 -60
- data/ext/ffi_c/Call.c +184 -137
- data/ext/ffi_c/Call.h +46 -22
- data/ext/ffi_c/ClosurePool.c +101 -43
- data/ext/ffi_c/ClosurePool.h +24 -13
- data/ext/ffi_c/DynamicLibrary.c +139 -57
- data/ext/ffi_c/DynamicLibrary.h +70 -12
- data/ext/ffi_c/Function.c +372 -273
- data/ext/ffi_c/Function.h +25 -20
- data/ext/ffi_c/FunctionInfo.c +135 -49
- data/ext/ffi_c/LastError.c +97 -30
- data/ext/ffi_c/LastError.h +21 -12
- data/ext/ffi_c/LongDouble.c +15 -9
- data/ext/ffi_c/LongDouble.h +21 -16
- data/ext/ffi_c/MappedType.c +88 -38
- data/ext/ffi_c/MappedType.h +21 -14
- data/ext/ffi_c/MemoryPointer.c +91 -38
- data/ext/ffi_c/MemoryPointer.h +22 -19
- data/ext/ffi_c/MethodHandle.c +52 -51
- data/ext/ffi_c/MethodHandle.h +24 -14
- data/ext/ffi_c/Platform.c +28 -62
- data/ext/ffi_c/Platform.h +21 -12
- data/ext/ffi_c/Pointer.c +145 -86
- data/ext/ffi_c/Pointer.h +23 -19
- data/ext/ffi_c/Struct.c +363 -163
- data/ext/ffi_c/Struct.h +39 -21
- data/ext/ffi_c/StructByValue.c +72 -37
- data/ext/ffi_c/StructByValue.h +21 -12
- data/ext/ffi_c/StructLayout.c +308 -94
- data/ext/ffi_c/Thread.c +73 -270
- data/ext/ffi_c/Thread.h +32 -35
- data/ext/ffi_c/Type.c +147 -84
- data/ext/ffi_c/Type.h +27 -11
- data/ext/ffi_c/Types.c +40 -24
- data/ext/ffi_c/Types.h +24 -21
- data/ext/ffi_c/Variadic.c +148 -64
- data/ext/ffi_c/compat.h +45 -37
- data/ext/ffi_c/extconf.rb +86 -32
- data/ext/ffi_c/ffi.c +32 -21
- data/ext/ffi_c/libffi/.allow-ai-service +0 -0
- data/ext/ffi_c/libffi/.appveyor/site.exp +16 -0
- data/ext/ffi_c/libffi/.appveyor/unix-noexec.exp +7 -0
- data/ext/ffi_c/libffi/.appveyor.yml +84 -0
- data/ext/ffi_c/libffi/.ci/ar-lib +270 -0
- data/ext/ffi_c/libffi/.ci/bfin-sim.exp +58 -0
- data/ext/ffi_c/libffi/.ci/build-cross-in-container.sh +18 -0
- data/ext/ffi_c/libffi/.ci/build-in-container.sh +10 -0
- data/ext/ffi_c/libffi/.ci/build.sh +124 -0
- data/ext/ffi_c/libffi/.ci/compile +351 -0
- data/ext/ffi_c/libffi/.ci/install.sh +78 -0
- data/ext/ffi_c/libffi/.ci/m32r-sim.exp +58 -0
- data/ext/ffi_c/libffi/.ci/moxie-sim.exp +60 -0
- data/ext/ffi_c/libffi/.ci/msvs-detect +1103 -0
- data/ext/ffi_c/libffi/.ci/or1k-sim.exp +58 -0
- data/ext/ffi_c/libffi/.ci/powerpc-eabisim.exp +58 -0
- data/ext/ffi_c/libffi/.ci/site.exp +29 -0
- data/ext/ffi_c/libffi/.ci/wine-sim.exp +55 -0
- data/ext/ffi_c/libffi/.circleci/config.yml +156 -0
- data/ext/ffi_c/libffi/.gitattributes +4 -0
- data/ext/ffi_c/libffi/.github/issue_template.md +10 -0
- data/ext/ffi_c/libffi/.github/workflows/build.yml +479 -0
- data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +172 -0
- data/ext/ffi_c/libffi/.gitignore +46 -0
- data/ext/ffi_c/libffi/{ChangeLog → ChangeLog.old} +6366 -3559
- data/ext/ffi_c/libffi/LICENSE +1 -1
- data/ext/ffi_c/libffi/LICENSE-BUILDTOOLS +353 -0
- data/ext/ffi_c/libffi/Makefile.am +131 -170
- data/ext/ffi_c/libffi/Makefile.in +1317 -1010
- data/ext/ffi_c/libffi/README.md +531 -0
- data/ext/ffi_c/libffi/acinclude.m4 +289 -4
- data/ext/ffi_c/libffi/autogen.sh +2 -0
- data/ext/ffi_c/libffi/compile +222 -17
- data/ext/ffi_c/libffi/config.guess +1033 -780
- data/ext/ffi_c/libffi/config.sub +1393 -1206
- data/ext/ffi_c/libffi/configure +16340 -10740
- data/ext/ffi_c/libffi/configure.ac +226 -271
- data/ext/ffi_c/libffi/configure.host +330 -4
- data/ext/ffi_c/libffi/doc/Makefile.am +3 -0
- data/ext/ffi_c/libffi/doc/Makefile.in +818 -0
- data/ext/ffi_c/libffi/doc/libffi.texi +525 -79
- data/ext/ffi_c/libffi/doc/version.texi +4 -4
- data/ext/ffi_c/libffi/fficonfig.h.in +41 -52
- data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +312 -0
- data/ext/ffi_c/libffi/include/Makefile.am +3 -3
- data/ext/ffi_c/libffi/include/Makefile.in +201 -79
- data/ext/ffi_c/libffi/include/ffi.h.in +190 -99
- data/ext/ffi_c/libffi/include/ffi_cfi.h +76 -0
- data/ext/ffi_c/libffi/include/ffi_common.h +72 -14
- data/ext/ffi_c/libffi/include/tramp.h +45 -0
- data/ext/ffi_c/libffi/install-sh +231 -210
- data/ext/ffi_c/libffi/libffi.map.in +81 -0
- data/ext/ffi_c/libffi/libffi.pc.in +3 -2
- data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +997 -0
- data/ext/ffi_c/libffi/libtool-ldflags +106 -0
- data/ext/ffi_c/libffi/libtool-version +2 -2
- data/ext/ffi_c/libffi/ltmain.sh +3868 -2068
- data/ext/ffi_c/libffi/m4/asmcfi.m4 +13 -0
- data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +50 -0
- data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +47 -25
- data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +110 -147
- data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +53 -0
- data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +75 -19
- data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +8 -29
- data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +11 -9
- data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +104 -52
- data/ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4 +18 -8
- data/ext/ffi_c/libffi/m4/ax_prepend_flag.m4 +51 -0
- data/ext/ffi_c/libffi/m4/ax_require_defined.m4 +37 -0
- data/ext/ffi_c/libffi/make_sunver.pl +333 -0
- data/ext/ffi_c/libffi/man/Makefile.am +2 -2
- data/ext/ffi_c/libffi/man/Makefile.in +156 -57
- data/ext/ffi_c/libffi/man/ffi.3 +10 -0
- data/ext/ffi_c/libffi/man/ffi_prep_cif.3 +6 -4
- data/ext/ffi_c/libffi/man/ffi_prep_cif_var.3 +73 -0
- data/ext/ffi_c/libffi/missing +153 -314
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.sln +33 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj +130 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.filters +57 -0
- data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.user +4 -0
- data/ext/ffi_c/libffi/{include/ffi.h.vc64 → msvc_build/aarch64/aarch64_include/ffi.h} +151 -67
- data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/fficonfig.h +219 -0
- data/ext/ffi_c/libffi/msvcc.sh +176 -20
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +1142 -0
- data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +97 -0
- data/ext/ffi_c/libffi/src/aarch64/internal.h +100 -0
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +695 -0
- data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +506 -0
- data/ext/ffi_c/libffi/src/alpha/ffi.c +335 -98
- data/ext/ffi_c/libffi/src/alpha/ffitarget.h +10 -1
- data/ext/ffi_c/libffi/src/alpha/internal.h +23 -0
- data/ext/ffi_c/libffi/src/alpha/osf.S +161 -266
- data/ext/ffi_c/libffi/src/arc/arcompact.S +210 -0
- data/ext/ffi_c/libffi/src/arc/ffi.c +443 -0
- data/ext/ffi_c/libffi/src/arc/ffitarget.h +67 -0
- data/ext/ffi_c/libffi/src/arm/ffi.c +706 -513
- data/ext/ffi_c/libffi/src/arm/ffitarget.h +32 -8
- data/ext/ffi_c/libffi/src/arm/internal.h +17 -0
- data/ext/ffi_c/libffi/src/arm/sysv.S +372 -413
- data/ext/ffi_c/libffi/src/arm/sysv_msvc_arm32.S +311 -0
- data/ext/ffi_c/libffi/src/avr32/ffitarget.h +6 -1
- data/ext/ffi_c/libffi/src/bfin/ffi.c +196 -0
- data/ext/ffi_c/libffi/src/bfin/ffitarget.h +43 -0
- data/ext/ffi_c/libffi/src/bfin/sysv.S +179 -0
- data/ext/ffi_c/libffi/src/closures.c +565 -73
- data/ext/ffi_c/libffi/src/cris/ffi.c +10 -7
- data/ext/ffi_c/libffi/src/cris/ffitarget.h +6 -1
- data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
- data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
- data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
- data/ext/ffi_c/libffi/src/debug.c +8 -3
- data/ext/ffi_c/libffi/src/dlmalloc.c +23 -13
- data/ext/ffi_c/libffi/src/frv/ffi.c +2 -2
- data/ext/ffi_c/libffi/src/frv/ffitarget.h +6 -1
- data/ext/ffi_c/libffi/src/ia64/ffi.c +47 -13
- data/ext/ffi_c/libffi/src/ia64/ffitarget.h +8 -2
- data/ext/ffi_c/libffi/src/ia64/unix.S +28 -3
- data/ext/ffi_c/libffi/src/java_raw_api.c +23 -5
- data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
- data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
- data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
- data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
- data/ext/ffi_c/libffi/src/loongarch64/ffi.c +624 -0
- data/ext/ffi_c/libffi/src/loongarch64/ffitarget.h +82 -0
- data/ext/ffi_c/libffi/src/loongarch64/sysv.S +327 -0
- data/ext/ffi_c/libffi/src/m32r/ffi.c +32 -15
- data/ext/ffi_c/libffi/src/m32r/ffitarget.h +6 -1
- data/ext/ffi_c/libffi/src/m68k/ffi.c +87 -13
- data/ext/ffi_c/libffi/src/m68k/ffitarget.h +6 -1
- data/ext/ffi_c/libffi/src/m68k/sysv.S +119 -32
- data/ext/ffi_c/libffi/src/m88k/ffi.c +400 -0
- data/ext/ffi_c/libffi/src/m88k/ffitarget.h +49 -0
- data/ext/ffi_c/libffi/src/m88k/obsd.S +209 -0
- data/ext/ffi_c/libffi/src/metag/ffi.c +330 -0
- data/ext/ffi_c/libffi/{fficonfig.hw → src/metag/ffitarget.h} +22 -26
- data/ext/ffi_c/libffi/src/metag/sysv.S +311 -0
- data/ext/ffi_c/libffi/src/microblaze/ffi.c +321 -0
- data/ext/ffi_c/libffi/src/microblaze/ffitarget.h +53 -0
- data/ext/ffi_c/libffi/src/microblaze/sysv.S +302 -0
- data/ext/ffi_c/libffi/src/mips/ffi.c +382 -101
- data/ext/ffi_c/libffi/src/mips/ffitarget.h +23 -14
- data/ext/ffi_c/libffi/src/mips/n32.S +321 -89
- data/ext/ffi_c/libffi/src/mips/o32.S +211 -31
- data/ext/ffi_c/libffi/src/moxie/eabi.S +55 -82
- data/ext/ffi_c/libffi/src/moxie/ffi.c +100 -66
- data/ext/ffi_c/libffi/src/moxie/ffitarget.h +52 -0
- data/ext/ffi_c/libffi/src/nios2/ffi.c +304 -0
- data/ext/ffi_c/libffi/src/nios2/ffitarget.h +52 -0
- data/ext/ffi_c/libffi/src/nios2/sysv.S +136 -0
- data/ext/ffi_c/libffi/src/or1k/ffi.c +341 -0
- data/ext/ffi_c/libffi/src/or1k/ffitarget.h +58 -0
- data/ext/ffi_c/libffi/src/or1k/sysv.S +107 -0
- data/ext/ffi_c/libffi/src/pa/ffi.c +62 -108
- data/ext/ffi_c/libffi/src/pa/ffi64.c +614 -0
- data/ext/ffi_c/libffi/src/pa/ffitarget.h +28 -12
- data/ext/ffi_c/libffi/src/pa/hpux32.S +87 -38
- data/ext/ffi_c/libffi/src/pa/hpux64.S +681 -0
- data/ext/ffi_c/libffi/src/pa/linux.S +109 -39
- data/ext/ffi_c/libffi/src/powerpc/aix.S +245 -7
- data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +253 -4
- data/ext/ffi_c/libffi/src/powerpc/asm.h +2 -2
- data/ext/ffi_c/libffi/src/powerpc/darwin.S +2 -7
- data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +22 -26
- data/ext/ffi_c/libffi/src/powerpc/ffi.c +105 -1378
- data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +157 -52
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +1153 -0
- data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +105 -0
- data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +923 -0
- data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +110 -45
- data/ext/ffi_c/libffi/src/powerpc/linux64.S +191 -85
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +438 -108
- data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +138 -68
- data/ext/ffi_c/libffi/src/powerpc/sysv.S +73 -119
- data/ext/ffi_c/libffi/src/powerpc/t-aix +5 -0
- data/ext/ffi_c/libffi/src/prep_cif.c +131 -25
- data/ext/ffi_c/libffi/src/raw_api.c +18 -5
- data/ext/ffi_c/libffi/src/riscv/ffi.c +514 -0
- data/ext/ffi_c/libffi/src/riscv/ffitarget.h +69 -0
- data/ext/ffi_c/libffi/src/riscv/sysv.S +293 -0
- data/ext/ffi_c/libffi/src/s390/ffi.c +294 -318
- data/ext/ffi_c/libffi/src/s390/ffitarget.h +9 -1
- data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
- data/ext/ffi_c/libffi/src/s390/sysv.S +257 -366
- data/ext/ffi_c/libffi/src/sh/ffi.c +4 -3
- data/ext/ffi_c/libffi/src/sh/ffitarget.h +6 -1
- data/ext/ffi_c/libffi/src/sh64/ffi.c +3 -2
- data/ext/ffi_c/libffi/src/sh64/ffitarget.h +6 -1
- data/ext/ffi_c/libffi/src/sparc/ffi.c +326 -527
- data/ext/ffi_c/libffi/src/sparc/ffi64.c +630 -0
- data/ext/ffi_c/libffi/src/sparc/ffitarget.h +20 -7
- data/ext/ffi_c/libffi/src/sparc/internal.h +26 -0
- data/ext/ffi_c/libffi/src/sparc/v8.S +364 -234
- data/ext/ffi_c/libffi/src/sparc/v9.S +340 -207
- data/ext/ffi_c/libffi/src/tile/ffi.c +355 -0
- data/ext/ffi_c/libffi/src/tile/ffitarget.h +65 -0
- data/ext/ffi_c/libffi/src/tile/tile.S +360 -0
- data/ext/ffi_c/libffi/src/tramp.c +716 -0
- data/ext/ffi_c/libffi/src/types.c +48 -19
- data/ext/ffi_c/libffi/src/vax/elfbsd.S +195 -0
- data/ext/ffi_c/libffi/src/vax/ffi.c +276 -0
- data/ext/ffi_c/libffi/src/vax/ffitarget.h +49 -0
- data/ext/ffi_c/libffi/src/wasm32/ffi.c +947 -0
- data/ext/ffi_c/libffi/src/wasm32/ffitarget.h +62 -0
- data/ext/ffi_c/libffi/src/x86/asmnames.h +30 -0
- data/ext/ffi_c/libffi/src/x86/ffi.c +686 -498
- data/ext/ffi_c/libffi/src/x86/ffi64.c +444 -129
- data/ext/ffi_c/libffi/src/x86/ffitarget.h +79 -36
- data/ext/ffi_c/libffi/src/x86/ffiw64.c +361 -0
- data/ext/ffi_c/libffi/src/x86/internal.h +43 -0
- data/ext/ffi_c/libffi/src/x86/internal64.h +36 -0
- data/ext/ffi_c/libffi/src/x86/sysv.S +1198 -394
- data/ext/ffi_c/libffi/src/x86/sysv_intel.S +998 -0
- data/ext/ffi_c/libffi/src/x86/unix64.S +585 -300
- data/ext/ffi_c/libffi/src/x86/win64.S +244 -458
- data/ext/ffi_c/libffi/src/x86/win64_intel.S +238 -0
- data/ext/ffi_c/libffi/src/xtensa/ffi.c +306 -0
- data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +57 -0
- data/ext/ffi_c/libffi/src/xtensa/sysv.S +268 -0
- data/ext/ffi_c/libffi/stamp-h.in +1 -0
- data/ext/ffi_c/libffi/testsuite/Makefile.am +80 -73
- data/ext/ffi_c/libffi/testsuite/Makefile.in +233 -117
- data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +54 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +63 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +86 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +48 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/test.html +7 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/test_libffi.py +51 -0
- data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +360 -28
- data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +22 -2
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/Makefile +28 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/README +78 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/alignof.h +50 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +63 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1746 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2885 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +747 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +46 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/align_stdcall.c +46 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c +41 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +28 -6
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +99 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +108 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +114 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +119 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +52 -42
- data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +3 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +15 -12
- data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +4 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +110 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +6 -16
- data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +57 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +70 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +78 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +46 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +127 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +5 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/s55.c +60 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +9 -10
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +49 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +49 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +55 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +9 -7
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +57 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +7 -7
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +7 -6
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +9 -8
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +9 -8
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +9 -9
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +9 -9
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +9 -8
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +9 -8
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_2.c +63 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3.c +65 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3f.c +65 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4.c +67 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c +67 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c +93 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c +61 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c +63 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c +90 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +61 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +78 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_2.c +220 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_3.c +154 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +134 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +134 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +140 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +3 -2
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +2 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +2 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +21 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +2 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +2 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +2 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +7 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call/closure_stdcall.c → libffi.closures/closure_simple.c} +13 -16
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +22 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +26 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +28 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +33 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +8 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +23 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +25 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +40 -8
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +17 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +23 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +17 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +17 -4
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +113 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +26 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +17 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +33 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +23 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +29 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +32 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +28 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +43 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +29 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +18 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +18 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +18 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +23 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +23 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +24 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +44 -31
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +44 -9
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +23 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +22 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +22 -7
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +22 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +22 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +23 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +23 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +7 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +19 -10
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +4 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +14 -4
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +32 -12
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_args.c +70 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_float_double.c +55 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +5 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +6 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +6 -2
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +6 -1
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +21 -9
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +3 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +2 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +125 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +3 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +49 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +49 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +7 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +1 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +41 -40
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +38 -15
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +9 -9
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +19 -6
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +137 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct12.c +86 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct13.c +115 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +15 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +15 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +14 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +14 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +17 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +14 -5
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +17 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +17 -6
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs1.c +86 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs2.c +102 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs3.c +101 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +7 -7
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +7 -7
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +6 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +6 -6
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +8 -3
- data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.closures}/unwindtest.cc +4 -10
- data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.closures}/unwindtest_ffi_call.cc +4 -2
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +91 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +42 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +71 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +80 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +16 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.special/special.exp → libffi.complex/complex.exp} +9 -8
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +51 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +7 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +7 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +7 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +86 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +78 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +37 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +41 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +44 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +34 -0
- data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +28 -0
- data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +36 -0
- data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +19 -0
- data/ext/ffi_c/libffi.bsd.mk +13 -7
- data/ext/ffi_c/libffi.darwin.mk +25 -13
- data/ext/ffi_c/libffi.gnu.mk +4 -3
- data/ext/ffi_c/libffi.mk +11 -6
- data/ext/ffi_c/libffi.vc.mk +1 -1
- data/ext/ffi_c/libffi.vc64.mk +1 -1
- data/ext/ffi_c/rbffi.h +23 -15
- data/ext/ffi_c/rbffi_endian.h +11 -2
- data/ffi.gemspec +42 -0
- data/lib/ffi/abstract_memory.rb +44 -0
- data/lib/ffi/autopointer.rb +65 -68
- data/lib/ffi/compat.rb +43 -0
- data/lib/ffi/data_converter.rb +67 -0
- data/lib/ffi/dynamic_library.rb +118 -0
- data/lib/ffi/enum.rb +166 -25
- data/lib/ffi/errno.rb +21 -11
- data/lib/ffi/ffi.rb +28 -11
- data/lib/ffi/function.rb +71 -0
- data/lib/ffi/io.rb +25 -15
- data/lib/ffi/library.rb +227 -136
- data/lib/ffi/library_path.rb +109 -0
- data/lib/ffi/managedstruct.rb +64 -35
- data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
- data/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
- data/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
- data/lib/ffi/platform/aarch64-linux/types.conf +175 -0
- data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
- data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
- data/lib/ffi/platform/arm-freebsd/types.conf +152 -0
- data/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
- data/lib/ffi/platform/arm-linux/types.conf +110 -82
- data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
- data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
- data/lib/ffi/platform/i386-cygwin/types.conf +3 -0
- data/lib/ffi/platform/i386-darwin/types.conf +63 -63
- data/lib/ffi/platform/i386-freebsd/types.conf +89 -89
- data/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
- data/lib/ffi/platform/i386-linux/types.conf +77 -77
- data/lib/ffi/platform/i386-netbsd/types.conf +87 -87
- data/lib/ffi/platform/i386-openbsd/types.conf +89 -87
- data/lib/ffi/platform/i386-solaris/types.conf +96 -96
- data/lib/ffi/platform/i386-windows/types.conf +43 -96
- data/lib/ffi/platform/ia64-linux/types.conf +79 -79
- data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
- data/lib/ffi/platform/mips-linux/types.conf +79 -79
- data/lib/ffi/platform/mips64-linux/types.conf +104 -0
- data/lib/ffi/platform/mips64el-linux/types.conf +104 -0
- data/lib/ffi/platform/mipsel-linux/types.conf +79 -79
- data/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
- data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
- data/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
- data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
- data/lib/ffi/platform/powerpc-aix/types.conf +155 -155
- data/lib/ffi/platform/powerpc-darwin/types.conf +63 -63
- data/lib/ffi/platform/powerpc-linux/types.conf +108 -78
- data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
- data/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
- data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
- data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
- data/lib/ffi/platform/s390-linux/types.conf +79 -79
- data/lib/ffi/platform/s390x-linux/types.conf +79 -79
- data/lib/ffi/platform/sparc-linux/types.conf +79 -79
- data/lib/ffi/platform/sparc-solaris/types.conf +103 -103
- data/lib/ffi/platform/sparcv9-linux/types.conf +102 -0
- data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
- data/lib/ffi/platform/sparcv9-solaris/types.conf +103 -103
- data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
- data/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
- data/lib/ffi/platform/x86_64-darwin/types.conf +93 -63
- data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
- data/lib/ffi/platform/x86_64-freebsd/types.conf +90 -88
- data/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
- data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
- data/lib/ffi/platform/x86_64-linux/types.conf +107 -77
- data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
- data/lib/ffi/platform/x86_64-netbsd/types.conf +89 -87
- data/lib/ffi/platform/x86_64-openbsd/types.conf +100 -92
- data/lib/ffi/platform/x86_64-solaris/types.conf +96 -96
- data/lib/ffi/platform/x86_64-windows/types.conf +52 -0
- data/lib/ffi/platform.rb +91 -34
- data/lib/ffi/pointer.rb +78 -33
- data/lib/ffi/struct.rb +100 -66
- data/lib/ffi/struct_by_reference.rb +72 -0
- data/lib/ffi/struct_layout.rb +96 -0
- data/lib/ffi/struct_layout_builder.rb +84 -19
- data/lib/ffi/tools/const_generator.rb +11 -8
- data/lib/ffi/tools/generator.rb +48 -1
- data/lib/ffi/tools/generator_task.rb +13 -16
- data/lib/ffi/tools/struct_generator.rb +6 -5
- data/lib/ffi/tools/types_generator.rb +14 -10
- data/lib/ffi/types.rb +96 -51
- data/lib/ffi/union.rb +23 -12
- data/lib/ffi/variadic.rb +44 -29
- data/lib/ffi/version.rb +3 -0
- data/lib/ffi.rb +20 -8
- data/rakelib/ffi_gem_helper.rb +65 -0
- data/samples/getlogin.rb +8 -0
- data/samples/getpid.rb +8 -0
- data/samples/gettimeofday.rb +18 -0
- data/samples/hello.rb +8 -0
- data/samples/hello_ractor.rb +11 -0
- data/samples/inotify.rb +60 -0
- data/samples/pty.rb +75 -0
- data/samples/qsort.rb +20 -0
- data/samples/qsort_ractor.rb +28 -0
- data/sig/ffi/abstract_memory.rbs +165 -0
- data/sig/ffi/auto_pointer.rbs +27 -0
- data/sig/ffi/buffer.rbs +18 -0
- data/sig/ffi/data_converter.rbs +10 -0
- data/sig/ffi/dynamic_library.rbs +9 -0
- data/sig/ffi/enum.rbs +38 -0
- data/sig/ffi/function.rbs +39 -0
- data/sig/ffi/library.rbs +42 -0
- data/sig/ffi/native_type.rbs +86 -0
- data/sig/ffi/pointer.rbs +42 -0
- data/sig/ffi/struct.rbs +76 -0
- data/sig/ffi/struct_by_reference.rbs +11 -0
- data/sig/ffi/struct_by_value.rbs +7 -0
- data/sig/ffi/struct_layout.rbs +9 -0
- data/sig/ffi/struct_layout_builder.rbs +5 -0
- data/sig/ffi/type.rbs +39 -0
- data/sig/ffi.rbs +26 -0
- data.tar.gz.sig +0 -0
- metadata +508 -268
- metadata.gz.sig +1 -0
- data/History.txt +0 -1
- data/README.rdoc +0 -102
- data/ext/ffi_c/DataConverter.c +0 -91
- data/ext/ffi_c/Ffi_c.iml +0 -12
- data/ext/ffi_c/StructByReference.c +0 -158
- data/ext/ffi_c/StructByReference.h +0 -50
- data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
- data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
- data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
- data/ext/ffi_c/libffi/Makefile.vc +0 -141
- data/ext/ffi_c/libffi/Makefile.vc64 +0 -141
- data/ext/ffi_c/libffi/README +0 -342
- data/ext/ffi_c/libffi/aclocal.m4 +0 -1873
- data/ext/ffi_c/libffi/build-ios.sh +0 -67
- data/ext/ffi_c/libffi/depcomp +0 -630
- data/ext/ffi_c/libffi/doc/libffi.info +0 -593
- data/ext/ffi_c/libffi/doc/stamp-vti +0 -4
- data/ext/ffi_c/libffi/include/ffi.h.vc +0 -427
- data/ext/ffi_c/libffi/m4/ax_check_compiler_flags.m4 +0 -76
- data/ext/ffi_c/libffi/m4/libtool.m4 +0 -7831
- data/ext/ffi_c/libffi/m4/ltoptions.m4 +0 -369
- data/ext/ffi_c/libffi/m4/ltsugar.m4 +0 -123
- data/ext/ffi_c/libffi/m4/ltversion.m4 +0 -23
- data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +0 -98
- data/ext/ffi_c/libffi/mdate-sh +0 -201
- data/ext/ffi_c/libffi/src/arm/gentramp.sh +0 -118
- data/ext/ffi_c/libffi/src/arm/trampoline.S +0 -4450
- data/ext/ffi_c/libffi/src/x86/darwin.S +0 -444
- data/ext/ffi_c/libffi/src/x86/darwin64.S +0 -416
- data/ext/ffi_c/libffi/src/x86/freebsd.S +0 -458
- data/ext/ffi_c/libffi/src/x86/win32.S +0 -1065
- data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +0 -300
- data/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +0 -63
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +0 -96
- data/ext/ffi_c/libffi/texinfo.tex +0 -7210
- data/ext/ffi_c/win32/stdint.h +0 -199
- data/gen/Rakefile +0 -30
- data/lib/Lib.iml +0 -13
- data/spec/ffi/Ffi.iml +0 -12
- data/spec/ffi/async_callback_spec.rb +0 -46
- data/spec/ffi/bool_spec.rb +0 -40
- data/spec/ffi/buffer_spec.rb +0 -215
- data/spec/ffi/callback_spec.rb +0 -668
- data/spec/ffi/custom_param_type.rb +0 -47
- data/spec/ffi/custom_type_spec.rb +0 -85
- data/spec/ffi/dup_spec.rb +0 -65
- data/spec/ffi/enum_spec.rb +0 -227
- data/spec/ffi/errno_spec.rb +0 -29
- data/spec/ffi/ffi_spec.rb +0 -40
- data/spec/ffi/function_spec.rb +0 -87
- data/spec/ffi/library_spec.rb +0 -208
- data/spec/ffi/long_double.rb +0 -41
- data/spec/ffi/managed_struct_spec.rb +0 -72
- data/spec/ffi/number_spec.rb +0 -247
- data/spec/ffi/pointer_spec.rb +0 -214
- data/spec/ffi/rbx/attach_function_spec.rb +0 -28
- data/spec/ffi/rbx/memory_pointer_spec.rb +0 -111
- data/spec/ffi/rbx/spec_helper.rb +0 -1
- data/spec/ffi/rbx/struct_spec.rb +0 -13
- data/spec/ffi/spec_helper.rb +0 -35
- data/spec/ffi/string_spec.rb +0 -119
- data/spec/ffi/strptr_spec.rb +0 -61
- data/spec/ffi/struct_callback_spec.rb +0 -80
- data/spec/ffi/struct_initialize_spec.rb +0 -46
- data/spec/ffi/struct_packed_spec.rb +0 -62
- data/spec/ffi/struct_spec.rb +0 -719
- data/spec/ffi/typedef_spec.rb +0 -89
- data/spec/ffi/union_spec.rb +0 -76
- data/spec/ffi/variadic_spec.rb +0 -103
- data/spec/spec.opts +0 -4
- data/tasks/ann.rake +0 -80
- data/tasks/extension.rake +0 -32
- data/tasks/gem.rake +0 -199
- data/tasks/git.rake +0 -41
- data/tasks/notes.rake +0 -27
- data/tasks/post_load.rake +0 -34
- data/tasks/rdoc.rake +0 -50
- data/tasks/rubyforge.rake +0 -55
- data/tasks/setup.rb +0 -301
- data/tasks/spec.rake +0 -54
- data/tasks/svn.rake +0 -47
- data/tasks/test.rake +0 -40
- data/tasks/yard.rake +0 -11
- data/ext/ffi_c/libffi/testsuite/libffi.call/{pyobjc-tc.c → pyobjc_tc.c} +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
- data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
- data/lib/ffi/platform/{i486-gnu → i386-gnu}/types.conf +84 -84
@@ -0,0 +1,681 @@
|
|
1
|
+
/* -----------------------------------------------------------------------
|
2
|
+
hpux64.S - (c) 2005-2022 John David Anglin <dave.anglin@bell.net>
|
3
|
+
|
4
|
+
HPUX PA 64-Bit Foreign Function Interface
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
a copy of this software and associated documentation files (the
|
8
|
+
``Software''), to deal in the Software without restriction, including
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be included
|
15
|
+
in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
18
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
20
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
21
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
23
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
----------------------------------------------------------------------- */
|
25
|
+
|
26
|
+
#define LIBFFI_ASM
|
27
|
+
#include <fficonfig.h>
|
28
|
+
#include <ffi.h>
|
29
|
+
|
30
|
+
.LEVEL 2.0w
|
31
|
+
.text
|
32
|
+
.align 4
|
33
|
+
|
34
|
+
/* void ffi_call_pa64(void (*)(char *, extended_cif *),
|
35
|
+
extended_cif *ecif,
|
36
|
+
unsigned bytes,
|
37
|
+
unsigned flags,
|
38
|
+
unsigned *rvalue,
|
39
|
+
void (*fn)());
|
40
|
+
*/
|
41
|
+
|
42
|
+
.export ffi_call_pa64,code
|
43
|
+
.import ffi_prep_args_pa64,code
|
44
|
+
|
45
|
+
.align 4
|
46
|
+
|
47
|
+
L$FB1
|
48
|
+
ffi_call_pa64
|
49
|
+
.proc
|
50
|
+
.callinfo FRAME=48,CALLS,SAVE_RP,ENTRY_GR=4
|
51
|
+
.entry
|
52
|
+
std %rp, -16(%sp)
|
53
|
+
copy %r3, %r1
|
54
|
+
L$CFI11
|
55
|
+
copy %sp, %r3
|
56
|
+
L$CFI12
|
57
|
+
std,ma %r1, 48(%sp)
|
58
|
+
|
59
|
+
/* Setup the stack for calling prep_args...
|
60
|
+
We want the stack to look like this:
|
61
|
+
|
62
|
+
[ Previous stack ] <- %r3
|
63
|
+
|
64
|
+
[ 48-byte register save area ]
|
65
|
+
|
66
|
+
[ Stack space for call arguments ] <- %r4
|
67
|
+
|
68
|
+
[ 16-byte rame marker ]
|
69
|
+
|
70
|
+
[ 128-byte stack for calling prep_args ] <- %sp
|
71
|
+
*/
|
72
|
+
|
73
|
+
std %r4, 8(%r3) ; save r4
|
74
|
+
L$CFI13
|
75
|
+
std %r23, 16(%r3) ; save flags we need it later
|
76
|
+
std %r22, 24(%r3) ; save rvalue
|
77
|
+
std %r21, 32(%r3) ; save fn pointer
|
78
|
+
|
79
|
+
copy %sp, %r4
|
80
|
+
copy %r4, %r26 ; argument stack pointer
|
81
|
+
addl %r24, %sp, %sp ; allocate argument space
|
82
|
+
|
83
|
+
ldo 112(%sp), %r29 ; arg pointer for prep args
|
84
|
+
|
85
|
+
/* Call prep_args:
|
86
|
+
%arg0(stack) -- set up above to point to call arguments
|
87
|
+
%arg1(ecif) -- same as incoming param
|
88
|
+
%arg2(bytes) -- same as incoming param */
|
89
|
+
bl ffi_prep_args_pa64,%r2
|
90
|
+
ldo 128(%sp), %sp
|
91
|
+
ldo -128(%sp), %sp
|
92
|
+
|
93
|
+
/* Load the arguments that should be passed in registers
|
94
|
+
The fp args were loaded by the prep_args function. */
|
95
|
+
ldd 0(%r4), %r26
|
96
|
+
ldd 8(%r4), %r25
|
97
|
+
ldd 16(%r4), %r24
|
98
|
+
ldd 24(%r4), %r23
|
99
|
+
ldd 32(%r4), %r22
|
100
|
+
ldd 40(%r4), %r21
|
101
|
+
ldd 48(%r4), %r20
|
102
|
+
ldd 56(%r4), %r19
|
103
|
+
|
104
|
+
ldd 24(%r3), %ret0 ; %ret0 <- rvalue
|
105
|
+
|
106
|
+
ldd 32(%r3), %r1 ; %r1 <- function pointer
|
107
|
+
ldd 16(%r1), %rp ; fn address
|
108
|
+
ldd 24(%r1), %dp ; New gp
|
109
|
+
bve,l (%rp), %r2 ; Call the user function
|
110
|
+
ldo 64(%r4), %r29 ; Argument pointer
|
111
|
+
|
112
|
+
/* Prepare to store the result; recover flags and rvalue. */
|
113
|
+
ldd 16(%r3), %r21 ; r21 <- flags
|
114
|
+
extrd,s %r21, 63, 32, %r21 ; sign extend flags for blr
|
115
|
+
|
116
|
+
/* Adjust flags range from [-16, 15] to [0, 31]. */
|
117
|
+
addi 16, %r21, %r21
|
118
|
+
|
119
|
+
blr %r21, %r0
|
120
|
+
ldd 24(%r3), %r20 ; r20 <- rvalue
|
121
|
+
|
122
|
+
/* Giant jump table */
|
123
|
+
/* 16-byte small struct */
|
124
|
+
b,n L$smst16
|
125
|
+
nop
|
126
|
+
/* 15-byte small struct */
|
127
|
+
b,n L$smst15
|
128
|
+
nop
|
129
|
+
/* 14-byte small struct */
|
130
|
+
b,n L$smst14
|
131
|
+
nop
|
132
|
+
/* 13-byte small struct */
|
133
|
+
b,n L$smst13
|
134
|
+
nop
|
135
|
+
/* 12-byte small struct */
|
136
|
+
b,n L$smst12
|
137
|
+
nop
|
138
|
+
/* 11-byte small struct */
|
139
|
+
b,n L$smst11
|
140
|
+
nop
|
141
|
+
/* 10-byte small struct */
|
142
|
+
b,n L$smst10
|
143
|
+
nop
|
144
|
+
/* 9-byte small struct */
|
145
|
+
b,n L$smst9
|
146
|
+
nop
|
147
|
+
/* 8-byte small struct */
|
148
|
+
b,n L$smst8
|
149
|
+
nop
|
150
|
+
/* 7-byte small struct */
|
151
|
+
b,n L$smst7
|
152
|
+
nop
|
153
|
+
/* 6-byte small struct */
|
154
|
+
b,n L$smst6
|
155
|
+
nop
|
156
|
+
/* 5-byte small struct */
|
157
|
+
b,n L$smst5
|
158
|
+
nop
|
159
|
+
/* 4-byte small struct */
|
160
|
+
b,n L$smst4
|
161
|
+
nop
|
162
|
+
/* 3-byte small struct */
|
163
|
+
b,n L$smst3
|
164
|
+
nop
|
165
|
+
/* 2-byte small struct */
|
166
|
+
b,n L$smst2
|
167
|
+
nop
|
168
|
+
/* 1-byte small struct */
|
169
|
+
b,n L$smst1
|
170
|
+
nop
|
171
|
+
/* void */
|
172
|
+
b,n L$done
|
173
|
+
nop
|
174
|
+
/* int */
|
175
|
+
b L$done
|
176
|
+
std %ret0, 0(%r20)
|
177
|
+
/* float */
|
178
|
+
b L$done
|
179
|
+
fstw %fr4R, 0(%r20)
|
180
|
+
/* double */
|
181
|
+
b L$done
|
182
|
+
fstd %fr4, 0(%r20)
|
183
|
+
/* long double */
|
184
|
+
b,n L$longdouble
|
185
|
+
nop
|
186
|
+
/* unsigned int8 */
|
187
|
+
b L$done
|
188
|
+
std %ret0, 0(%r20)
|
189
|
+
/* signed int8 */
|
190
|
+
b L$done
|
191
|
+
std %ret0, 0(%r20)
|
192
|
+
/* unsigned int16 */
|
193
|
+
b L$done
|
194
|
+
std %ret0, 0(%r20)
|
195
|
+
/* signed int16 */
|
196
|
+
b L$done
|
197
|
+
std %ret0, 0(%r20)
|
198
|
+
/* unsigned int32 */
|
199
|
+
b L$done
|
200
|
+
std %ret0, 0(%r20)
|
201
|
+
/* signed int32 */
|
202
|
+
b L$done
|
203
|
+
std %ret0, 0(%r20)
|
204
|
+
/* unsigned int64 */
|
205
|
+
b L$done
|
206
|
+
std %ret0, 0(%r20)
|
207
|
+
/* signed int64 */
|
208
|
+
b L$done
|
209
|
+
std %ret0, 0(%r20)
|
210
|
+
/* large struct */
|
211
|
+
b,n L$done
|
212
|
+
nop
|
213
|
+
/* pointer */
|
214
|
+
b L$done
|
215
|
+
std %ret0, 0(%r20)
|
216
|
+
/* complex */
|
217
|
+
b,n L$done
|
218
|
+
nop
|
219
|
+
|
220
|
+
L$longdouble
|
221
|
+
std %ret0, 0(%r20)
|
222
|
+
b L$done
|
223
|
+
std %ret1, 8(%r20)
|
224
|
+
|
225
|
+
/* We need to copy byte-by-byte the exact number bytes
|
226
|
+
in the struct to avoid clobbering other data. */
|
227
|
+
L$smst1
|
228
|
+
extrd,u %ret0, 7, 8, %r22
|
229
|
+
b L$done
|
230
|
+
stb %r22, 0(%r20)
|
231
|
+
|
232
|
+
L$smst2
|
233
|
+
extrd,u %ret0, 7, 8, %r22
|
234
|
+
stb,ma %r22, 1(%r20)
|
235
|
+
extrd,u %ret0, 15, 8, %r22
|
236
|
+
b L$done
|
237
|
+
stb %r22, 0(%r20)
|
238
|
+
|
239
|
+
L$smst3
|
240
|
+
extrd,u %ret0, 7, 8, %r22
|
241
|
+
stb,ma %r22, 1(%r20)
|
242
|
+
extrd,u %ret0, 15, 8, %r22
|
243
|
+
stb,ma %r22, 1(%r20)
|
244
|
+
extrd,u %ret0, 23, 8, %r22
|
245
|
+
b L$done
|
246
|
+
stb %r22, 0(%r20)
|
247
|
+
|
248
|
+
L$smst4
|
249
|
+
extrd,u %ret0, 7, 8, %r22
|
250
|
+
stb,ma %r22, 1(%r20)
|
251
|
+
extrd,u %ret0, 15, 8, %r22
|
252
|
+
stb,ma %r22, 1(%r20)
|
253
|
+
extrd,u %ret0, 23, 8, %r22
|
254
|
+
stb,ma %r22, 1(%r20)
|
255
|
+
extrd,u %ret0, 31, 8, %r22
|
256
|
+
b L$done
|
257
|
+
stb %r22, 0(%r20)
|
258
|
+
|
259
|
+
L$smst5
|
260
|
+
extrd,u %ret0, 7, 8, %r22
|
261
|
+
stb,ma %r22, 1(%r20)
|
262
|
+
extrd,u %ret0, 15, 8, %r22
|
263
|
+
stb,ma %r22, 1(%r20)
|
264
|
+
extrd,u %ret0, 23, 8, %r22
|
265
|
+
stb,ma %r22, 1(%r20)
|
266
|
+
extrd,u %ret0, 31, 8, %r22
|
267
|
+
stb,ma %r22, 1(%r20)
|
268
|
+
extrd,u %ret0, 39, 8, %r22
|
269
|
+
b L$done
|
270
|
+
stb %r22, 0(%r20)
|
271
|
+
|
272
|
+
L$smst6
|
273
|
+
extrd,u %ret0, 7, 8, %r22
|
274
|
+
stb,ma %r22, 1(%r20)
|
275
|
+
extrd,u %ret0, 15, 8, %r22
|
276
|
+
stb,ma %r22, 1(%r20)
|
277
|
+
extrd,u %ret0, 23, 8, %r22
|
278
|
+
stb,ma %r22, 1(%r20)
|
279
|
+
extrd,u %ret0, 31, 8, %r22
|
280
|
+
stb,ma %r22, 1(%r20)
|
281
|
+
extrd,u %ret0, 39, 8, %r22
|
282
|
+
stb,ma %r22, 1(%r20)
|
283
|
+
extrd,u %ret0, 47, 8, %r22
|
284
|
+
b L$done
|
285
|
+
stb %r22, 0(%r20)
|
286
|
+
|
287
|
+
L$smst7
|
288
|
+
extrd,u %ret0, 7, 8, %r22
|
289
|
+
stb,ma %r22, 1(%r20)
|
290
|
+
extrd,u %ret0, 15, 8, %r22
|
291
|
+
stb,ma %r22, 1(%r20)
|
292
|
+
extrd,u %ret0, 23, 8, %r22
|
293
|
+
stb,ma %r22, 1(%r20)
|
294
|
+
extrd,u %ret0, 31, 8, %r22
|
295
|
+
stb,ma %r22, 1(%r20)
|
296
|
+
extrd,u %ret0, 39, 8, %r22
|
297
|
+
stb,ma %r22, 1(%r20)
|
298
|
+
extrd,u %ret0, 47, 8, %r22
|
299
|
+
stb,ma %r22, 1(%r20)
|
300
|
+
extrd,u %ret0, 55, 8, %r22
|
301
|
+
b L$done
|
302
|
+
stb %r22, 0(%r20)
|
303
|
+
|
304
|
+
L$smst8
|
305
|
+
extrd,u %ret0, 7, 8, %r22
|
306
|
+
stb,ma %r22, 1(%r20)
|
307
|
+
extrd,u %ret0, 15, 8, %r22
|
308
|
+
stb,ma %r22, 1(%r20)
|
309
|
+
extrd,u %ret0, 23, 8, %r22
|
310
|
+
stb,ma %r22, 1(%r20)
|
311
|
+
extrd,u %ret0, 31, 8, %r22
|
312
|
+
stb,ma %r22, 1(%r20)
|
313
|
+
extrd,u %ret0, 39, 8, %r22
|
314
|
+
stb,ma %r22, 1(%r20)
|
315
|
+
extrd,u %ret0, 47, 8, %r22
|
316
|
+
stb,ma %r22, 1(%r20)
|
317
|
+
extrd,u %ret0, 55, 8, %r22
|
318
|
+
stb,ma %r22, 1(%r20)
|
319
|
+
b L$done
|
320
|
+
stb %ret0, 0(%r20)
|
321
|
+
|
322
|
+
L$smst9
|
323
|
+
extrd,u %ret0, 7, 8, %r22
|
324
|
+
stb,ma %r22, 1(%r20)
|
325
|
+
extrd,u %ret0, 15, 8, %r22
|
326
|
+
stb,ma %r22, 1(%r20)
|
327
|
+
extrd,u %ret0, 23, 8, %r22
|
328
|
+
stb,ma %r22, 1(%r20)
|
329
|
+
extrd,u %ret0, 31, 8, %r22
|
330
|
+
stb,ma %r22, 1(%r20)
|
331
|
+
extrd,u %ret0, 39, 8, %r22
|
332
|
+
stb,ma %r22, 1(%r20)
|
333
|
+
extrd,u %ret0, 47, 8, %r22
|
334
|
+
stb,ma %r22, 1(%r20)
|
335
|
+
extrd,u %ret0, 55, 8, %r22
|
336
|
+
stb,ma %r22, 1(%r20)
|
337
|
+
stb,ma %ret0, 1(%r20)
|
338
|
+
extrd,u %ret1, 7, 8, %r22
|
339
|
+
b L$done
|
340
|
+
stb %r22, 0(%r20)
|
341
|
+
|
342
|
+
L$smst10
|
343
|
+
extrd,u %ret0, 7, 8, %r22
|
344
|
+
stb,ma %r22, 1(%r20)
|
345
|
+
extrd,u %ret0, 15, 8, %r22
|
346
|
+
stb,ma %r22, 1(%r20)
|
347
|
+
extrd,u %ret0, 23, 8, %r22
|
348
|
+
stb,ma %r22, 1(%r20)
|
349
|
+
extrd,u %ret0, 31, 8, %r22
|
350
|
+
stb,ma %r22, 1(%r20)
|
351
|
+
extrd,u %ret0, 39, 8, %r22
|
352
|
+
stb,ma %r22, 1(%r20)
|
353
|
+
extrd,u %ret0, 47, 8, %r22
|
354
|
+
stb,ma %r22, 1(%r20)
|
355
|
+
extrd,u %ret0, 55, 8, %r22
|
356
|
+
stb,ma %r22, 1(%r20)
|
357
|
+
stb,ma %ret0, 1(%r20)
|
358
|
+
extrd,u %ret1, 7, 8, %r22
|
359
|
+
stb,ma %r22, 1(%r20)
|
360
|
+
extrd,u %ret1, 15, 8, %r22
|
361
|
+
b L$done
|
362
|
+
stb %r22, 0(%r20)
|
363
|
+
|
364
|
+
L$smst11
|
365
|
+
extrd,u %ret0, 7, 8, %r22
|
366
|
+
stb,ma %r22, 1(%r20)
|
367
|
+
extrd,u %ret0, 15, 8, %r22
|
368
|
+
stb,ma %r22, 1(%r20)
|
369
|
+
extrd,u %ret0, 23, 8, %r22
|
370
|
+
stb,ma %r22, 1(%r20)
|
371
|
+
extrd,u %ret0, 31, 8, %r22
|
372
|
+
stb,ma %r22, 1(%r20)
|
373
|
+
extrd,u %ret0, 39, 8, %r22
|
374
|
+
stb,ma %r22, 1(%r20)
|
375
|
+
extrd,u %ret0, 47, 8, %r22
|
376
|
+
stb,ma %r22, 1(%r20)
|
377
|
+
extrd,u %ret0, 55, 8, %r22
|
378
|
+
stb,ma %r22, 1(%r20)
|
379
|
+
stb,ma %ret0, 1(%r20)
|
380
|
+
extrd,u %ret1, 7, 8, %r22
|
381
|
+
stb,ma %r22, 1(%r20)
|
382
|
+
extrd,u %ret1, 15, 8, %r22
|
383
|
+
stb,ma %r22, 1(%r20)
|
384
|
+
extrd,u %ret1, 23, 8, %r22
|
385
|
+
b L$done
|
386
|
+
stb %r22, 0(%r20)
|
387
|
+
|
388
|
+
L$smst12
|
389
|
+
extrd,u %ret0, 7, 8, %r22
|
390
|
+
stb,ma %r22, 1(%r20)
|
391
|
+
extrd,u %ret0, 15, 8, %r22
|
392
|
+
stb,ma %r22, 1(%r20)
|
393
|
+
extrd,u %ret0, 23, 8, %r22
|
394
|
+
stb,ma %r22, 1(%r20)
|
395
|
+
extrd,u %ret0, 31, 8, %r22
|
396
|
+
stb,ma %r22, 1(%r20)
|
397
|
+
extrd,u %ret0, 39, 8, %r22
|
398
|
+
stb,ma %r22, 1(%r20)
|
399
|
+
extrd,u %ret0, 47, 8, %r22
|
400
|
+
stb,ma %r22, 1(%r20)
|
401
|
+
extrd,u %ret0, 55, 8, %r22
|
402
|
+
stb,ma %r22, 1(%r20)
|
403
|
+
stb,ma %ret0, 1(%r20)
|
404
|
+
extrd,u %ret1, 7, 8, %r22
|
405
|
+
stb,ma %r22, 1(%r20)
|
406
|
+
extrd,u %ret1, 15, 8, %r22
|
407
|
+
stb,ma %r22, 1(%r20)
|
408
|
+
extrd,u %ret1, 23, 8, %r22
|
409
|
+
stb,ma %r22, 1(%r20)
|
410
|
+
extrd,u %ret1, 31, 8, %r22
|
411
|
+
b L$done
|
412
|
+
stb %r22, 0(%r20)
|
413
|
+
|
414
|
+
L$smst13
|
415
|
+
extrd,u %ret0, 7, 8, %r22
|
416
|
+
stb,ma %r22, 1(%r20)
|
417
|
+
extrd,u %ret0, 15, 8, %r22
|
418
|
+
stb,ma %r22, 1(%r20)
|
419
|
+
extrd,u %ret0, 23, 8, %r22
|
420
|
+
stb,ma %r22, 1(%r20)
|
421
|
+
extrd,u %ret0, 31, 8, %r22
|
422
|
+
stb,ma %r22, 1(%r20)
|
423
|
+
extrd,u %ret0, 39, 8, %r22
|
424
|
+
stb,ma %r22, 1(%r20)
|
425
|
+
extrd,u %ret0, 47, 8, %r22
|
426
|
+
stb,ma %r22, 1(%r20)
|
427
|
+
extrd,u %ret0, 55, 8, %r22
|
428
|
+
stb,ma %r22, 1(%r20)
|
429
|
+
stb,ma %ret0, 1(%r20)
|
430
|
+
extrd,u %ret1, 7, 8, %r22
|
431
|
+
stb,ma %r22, 1(%r20)
|
432
|
+
extrd,u %ret1, 15, 8, %r22
|
433
|
+
stb,ma %r22, 1(%r20)
|
434
|
+
extrd,u %ret1, 23, 8, %r22
|
435
|
+
stb,ma %r22, 1(%r20)
|
436
|
+
extrd,u %ret1, 31, 8, %r22
|
437
|
+
stb,ma %r22, 1(%r20)
|
438
|
+
extrd,u %ret1, 39, 8, %r22
|
439
|
+
b L$done
|
440
|
+
stb %r22, 0(%r20)
|
441
|
+
|
442
|
+
L$smst14
|
443
|
+
extrd,u %ret0, 7, 8, %r22
|
444
|
+
stb,ma %r22, 1(%r20)
|
445
|
+
extrd,u %ret0, 15, 8, %r22
|
446
|
+
stb,ma %r22, 1(%r20)
|
447
|
+
extrd,u %ret0, 23, 8, %r22
|
448
|
+
stb,ma %r22, 1(%r20)
|
449
|
+
extrd,u %ret0, 31, 8, %r22
|
450
|
+
stb,ma %r22, 1(%r20)
|
451
|
+
extrd,u %ret0, 39, 8, %r22
|
452
|
+
stb,ma %r22, 1(%r20)
|
453
|
+
extrd,u %ret0, 47, 8, %r22
|
454
|
+
stb,ma %r22, 1(%r20)
|
455
|
+
extrd,u %ret0, 55, 8, %r22
|
456
|
+
stb,ma %r22, 1(%r20)
|
457
|
+
stb,ma %ret0, 1(%r20)
|
458
|
+
extrd,u %ret1, 7, 8, %r22
|
459
|
+
stb,ma %r22, 1(%r20)
|
460
|
+
extrd,u %ret1, 15, 8, %r22
|
461
|
+
stb,ma %r22, 1(%r20)
|
462
|
+
extrd,u %ret1, 23, 8, %r22
|
463
|
+
stb,ma %r22, 1(%r20)
|
464
|
+
extrd,u %ret1, 31, 8, %r22
|
465
|
+
stb,ma %r22, 1(%r20)
|
466
|
+
extrd,u %ret1, 39, 8, %r22
|
467
|
+
stb,ma %r22, 1(%r20)
|
468
|
+
extrd,u %ret1, 47, 8, %r22
|
469
|
+
b L$done
|
470
|
+
stb %r22, 0(%r20)
|
471
|
+
|
472
|
+
L$smst15
|
473
|
+
extrd,u %ret0, 7, 8, %r22
|
474
|
+
stb,ma %r22, 1(%r20)
|
475
|
+
extrd,u %ret0, 15, 8, %r22
|
476
|
+
stb,ma %r22, 1(%r20)
|
477
|
+
extrd,u %ret0, 23, 8, %r22
|
478
|
+
stb,ma %r22, 1(%r20)
|
479
|
+
extrd,u %ret0, 31, 8, %r22
|
480
|
+
stb,ma %r22, 1(%r20)
|
481
|
+
extrd,u %ret0, 39, 8, %r22
|
482
|
+
stb,ma %r22, 1(%r20)
|
483
|
+
extrd,u %ret0, 47, 8, %r22
|
484
|
+
stb,ma %r22, 1(%r20)
|
485
|
+
extrd,u %ret0, 55, 8, %r22
|
486
|
+
stb,ma %r22, 1(%r20)
|
487
|
+
stb,ma %ret0, 1(%r20)
|
488
|
+
extrd,u %ret1, 7, 8, %r22
|
489
|
+
stb,ma %r22, 1(%r20)
|
490
|
+
extrd,u %ret1, 15, 8, %r22
|
491
|
+
stb,ma %r22, 1(%r20)
|
492
|
+
extrd,u %ret1, 23, 8, %r22
|
493
|
+
stb,ma %r22, 1(%r20)
|
494
|
+
extrd,u %ret1, 31, 8, %r22
|
495
|
+
stb,ma %r22, 1(%r20)
|
496
|
+
extrd,u %ret1, 39, 8, %r22
|
497
|
+
stb,ma %r22, 1(%r20)
|
498
|
+
extrd,u %ret1, 47, 8, %r22
|
499
|
+
stb,ma %r22, 1(%r20)
|
500
|
+
extrd,u %ret1, 55, 8, %r22
|
501
|
+
b L$done
|
502
|
+
stb %r22, 0(%r20)
|
503
|
+
|
504
|
+
L$smst16
|
505
|
+
extrd,u %ret0, 7, 8, %r22
|
506
|
+
stb,ma %r22, 1(%r20)
|
507
|
+
extrd,u %ret0, 15, 8, %r22
|
508
|
+
stb,ma %r22, 1(%r20)
|
509
|
+
extrd,u %ret0, 23, 8, %r22
|
510
|
+
stb,ma %r22, 1(%r20)
|
511
|
+
extrd,u %ret0, 31, 8, %r22
|
512
|
+
stb,ma %r22, 1(%r20)
|
513
|
+
extrd,u %ret0, 39, 8, %r22
|
514
|
+
stb,ma %r22, 1(%r20)
|
515
|
+
extrd,u %ret0, 47, 8, %r22
|
516
|
+
stb,ma %r22, 1(%r20)
|
517
|
+
extrd,u %ret0, 55, 8, %r22
|
518
|
+
stb,ma %r22, 1(%r20)
|
519
|
+
stb,ma %ret0, 1(%r20)
|
520
|
+
extrd,u %ret1, 7, 8, %r22
|
521
|
+
stb,ma %r22, 1(%r20)
|
522
|
+
extrd,u %ret1, 15, 8, %r22
|
523
|
+
stb,ma %r22, 1(%r20)
|
524
|
+
extrd,u %ret1, 23, 8, %r22
|
525
|
+
stb,ma %r22, 1(%r20)
|
526
|
+
extrd,u %ret1, 31, 8, %r22
|
527
|
+
stb,ma %r22, 1(%r20)
|
528
|
+
extrd,u %ret1, 39, 8, %r22
|
529
|
+
stb,ma %r22, 1(%r20)
|
530
|
+
extrd,u %ret1, 47, 8, %r22
|
531
|
+
stb,ma %r22, 1(%r20)
|
532
|
+
extrd,u %ret1, 55, 8, %r22
|
533
|
+
stb,ma %r22, 1(%r20)
|
534
|
+
stb %ret1, 0(%r20)
|
535
|
+
|
536
|
+
L$done
|
537
|
+
/* all done, restore registers and return */
|
538
|
+
copy %r4, %sp
|
539
|
+
ldd 8(%r3), %r4
|
540
|
+
ldd -16(%r3), %rp
|
541
|
+
bve (%rp)
|
542
|
+
ldd,mb -48(%sp), %r3
|
543
|
+
.exit
|
544
|
+
.procend
|
545
|
+
L$FE1
|
546
|
+
.size ffi_call_pa64, .-ffi_call_pa64
|
547
|
+
|
548
|
+
/* void ffi_closure_pa64(void);
|
549
|
+
Called with closure argument in %r21 */
|
550
|
+
|
551
|
+
.export ffi_closure_pa64,code
|
552
|
+
.import ffi_closure_inner_pa64,code
|
553
|
+
.align 4
|
554
|
+
L$FB2
|
555
|
+
ffi_closure_pa64
|
556
|
+
.proc
|
557
|
+
.callinfo FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3
|
558
|
+
.entry
|
559
|
+
|
560
|
+
std %rp, -16(%sp)
|
561
|
+
copy %r3, %r1
|
562
|
+
L$CFI21
|
563
|
+
copy %sp, %r3
|
564
|
+
L$CFI22
|
565
|
+
std,ma %r1, 128(%sp)
|
566
|
+
L$CFI23
|
567
|
+
|
568
|
+
/* Put arguments onto the stack and call ffi_closure_inner. */
|
569
|
+
std %r26, -64(%r29)
|
570
|
+
std %r25, -56(%r29)
|
571
|
+
std %r24, -48(%r29)
|
572
|
+
std %r23, -40(%r29)
|
573
|
+
std %r22, -32(%r29)
|
574
|
+
std %r21, -24(%r29)
|
575
|
+
std %r20, -16(%r29)
|
576
|
+
std %r19, -8(%r29)
|
577
|
+
|
578
|
+
/* Load and save start of argument stack. */
|
579
|
+
ldo -64(%r29), %r25
|
580
|
+
std %r25, 8(%r3)
|
581
|
+
|
582
|
+
/* Setup arg pointer. */
|
583
|
+
ldo -16(%sp), %ret1
|
584
|
+
|
585
|
+
/* Retrieve closure pointer and real gp. */
|
586
|
+
copy %dp, %r26
|
587
|
+
bl ffi_closure_inner_pa64, %r2
|
588
|
+
ldd 0(%dp), %dp
|
589
|
+
|
590
|
+
/* Retrieve start of argument stack. */
|
591
|
+
ldd 8(%r3), %r1
|
592
|
+
|
593
|
+
/* Restore r3 and op stack. */
|
594
|
+
ldd,mb -128(%sp), %r3
|
595
|
+
|
596
|
+
/* Load return address. */
|
597
|
+
ldd -16(%sp), %rp
|
598
|
+
|
599
|
+
/* Load return values from first and second stack slots. */
|
600
|
+
ldd 0(%r1), %ret0
|
601
|
+
bve (%rp)
|
602
|
+
ldd 8(%r1), %ret1
|
603
|
+
|
604
|
+
.exit
|
605
|
+
.procend
|
606
|
+
.end
|
607
|
+
L$FE2:
|
608
|
+
.size ffi_closure_pa64, .-ffi_closure_pa64
|
609
|
+
|
610
|
+
.section .eh_frame,"aw",@progbits
|
611
|
+
L$frame1:
|
612
|
+
.word L$ECIE1-L$SCIE1 ;# Length of Common Information Entry
|
613
|
+
L$SCIE1:
|
614
|
+
.word 0x0 ;# CIE Identifier Tag
|
615
|
+
.byte 0x3 ;# CIE Version
|
616
|
+
.stringz "" ;# CIE Augmentation
|
617
|
+
.uleb128 0x1 ;# CIE Code Alignment Factor
|
618
|
+
.sleb128 8 ;# CIE Data Alignment Factor
|
619
|
+
.byte 0x2 ;# CIE RA Column
|
620
|
+
.byte 0xc ;# DW_CFA_def_cfa
|
621
|
+
.uleb128 0x1e
|
622
|
+
.uleb128 0x0
|
623
|
+
.align 8
|
624
|
+
L$ECIE1:
|
625
|
+
L$SFDE1:
|
626
|
+
.word L$EFDE1-L$ASFDE1 ;# FDE Length
|
627
|
+
L$ASFDE1:
|
628
|
+
.word L$ASFDE1-L$frame1 ;# FDE CIE offset
|
629
|
+
.dword L$FB1 ;# FDE initial location
|
630
|
+
.dword L$FE1-L$FB1 ;# FDE address range
|
631
|
+
|
632
|
+
.byte 0x4 ;# DW_CFA_advance_loc4
|
633
|
+
.word L$CFI11-L$FB1
|
634
|
+
.byte 0x9 ;# DW_CFA_register: r3 in r1
|
635
|
+
.uleb128 0x3
|
636
|
+
.uleb128 0x1
|
637
|
+
.byte 0x11 ;# DW_CFA_offset_extended_sf: r2 at cfa-16
|
638
|
+
.uleb128 0x2
|
639
|
+
.sleb128 -2
|
640
|
+
.byte 0x4 ;# DW_CFA_advance_loc4
|
641
|
+
.word L$CFI12-L$CFI11
|
642
|
+
.byte 0xd ;# DW_CFA_def_cfa_register: r3
|
643
|
+
.uleb128 0x3
|
644
|
+
|
645
|
+
.byte 0x4 ;# DW_CFA_advance_loc4
|
646
|
+
.word L$CFI13-L$CFI12
|
647
|
+
.byte 0x83 ;# DW_CFA_offset: r3 at cfa+0
|
648
|
+
.uleb128 0
|
649
|
+
.byte 0x84 ;# DW_CFA_offset: r4 at cfa+8
|
650
|
+
.uleb128 1
|
651
|
+
|
652
|
+
.align 8
|
653
|
+
L$EFDE1:
|
654
|
+
|
655
|
+
L$SFDE2:
|
656
|
+
.word L$EFDE2-L$ASFDE2 ;# FDE Length
|
657
|
+
L$ASFDE2:
|
658
|
+
.word L$ASFDE2-L$frame1 ;# FDE CIE offset
|
659
|
+
.dword L$FB2 ;# FDE initial location
|
660
|
+
.dword L$FE2-L$FB2 ;# FDE address range
|
661
|
+
.byte 0x4 ;# DW_CFA_advance_loc4
|
662
|
+
.word L$CFI21-L$FB2
|
663
|
+
.byte 0x9 ;# DW_CFA_register: r3 in r1
|
664
|
+
.uleb128 0x3
|
665
|
+
.uleb128 0x1
|
666
|
+
.byte 0x11 ;# DW_CFA_offset_extended_sf: r2 at cfa-16
|
667
|
+
.uleb128 0x2
|
668
|
+
.sleb128 -2
|
669
|
+
|
670
|
+
.byte 0x4 ;# DW_CFA_advance_loc4
|
671
|
+
.word L$CFI22-L$CFI21
|
672
|
+
.byte 0xd ;# DW_CFA_def_cfa_register: r3
|
673
|
+
.uleb128 0x3
|
674
|
+
|
675
|
+
.byte 0x4 ;# DW_CFA_advance_loc4
|
676
|
+
.word L$CFI23-L$CFI22
|
677
|
+
.byte 0x83 ;# DW_CFA_offset: r3 at cfa+0
|
678
|
+
.uleb128 0
|
679
|
+
|
680
|
+
.align 8
|
681
|
+
L$EFDE2:
|