minilab 1.1.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +8 -0
- data/LICENSE +19 -0
- data/README +105 -0
- data/Rakefile +83 -0
- data/config/environment.rb +23 -0
- data/config/objects.yml +23 -0
- data/lib/analog_io.rb +23 -0
- data/lib/connection_state.rb +13 -0
- data/lib/digital_auxport_io.rb +34 -0
- data/lib/digital_configuration.rb +53 -0
- data/lib/digital_port_io.rb +39 -0
- data/lib/library_translator.rb +46 -0
- data/lib/minilab.rb +130 -0
- data/lib/minilab_constants.rb +20 -0
- data/lib/minilab_context.rb +14 -0
- data/lib/minilab_hardware.rb +112 -0
- data/lib/minilab_wrapper.rb +12 -0
- data/test/system/analog_input.test +3 -0
- data/test/system/analog_output.test +37 -0
- data/test/system/digital_port_input.test +5 -0
- data/test/system/digital_port_output.test +39 -0
- data/test/system/digital_port_read_byte.test +26 -0
- data/test/system/digital_screw_terminals_input.test +2 -0
- data/test/system/digital_screw_terminals_output.test +11 -0
- data/test/system/minilab_driver.rb +83 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/analog_io_test.rb +54 -0
- data/test/unit/connection_state_test.rb +18 -0
- data/test/unit/digital_auxport_io_test.rb +102 -0
- data/test/unit/digital_configuration_test.rb +100 -0
- data/test/unit/digital_port_io_test.rb +67 -0
- data/test/unit/library_translator_test.rb +98 -0
- data/test/unit/minilab_context_test.rb +23 -0
- data/test/unit/minilab_hardware_test.rb +33 -0
- data/test/unit/minilab_test.rb +115 -0
- data/test/unit/minilab_wrapper_test.rb +24 -0
- data/vendor/behaviors/lib/behaviors.rb +50 -0
- data/vendor/behaviors/tasks/behaviors_tasks.rake +140 -0
- data/vendor/behaviors/test/behaviors_tasks_test.rb +71 -0
- data/vendor/behaviors/test/behaviors_test.rb +50 -0
- data/vendor/behaviors/test/tasks_test/Rakefile +16 -0
- data/vendor/behaviors/test/tasks_test/doc/behaviors.html +55 -0
- data/vendor/behaviors/test/tasks_test/lib/user.rb +2 -0
- data/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -0
- data/vendor/constructor-1.0.2/History.txt +11 -0
- data/vendor/constructor-1.0.2/Manifest.txt +6 -0
- data/vendor/constructor-1.0.2/README.txt +77 -0
- data/vendor/constructor-1.0.2/Rakefile +33 -0
- data/vendor/constructor-1.0.2/lib/constructor.rb +119 -0
- data/vendor/constructor-1.0.2/specs/constructor_spec.rb +345 -0
- data/vendor/diy-1.1.1/History.txt +23 -0
- data/vendor/diy-1.1.1/Manifest.txt +88 -0
- data/vendor/diy-1.1.1/README.txt +220 -0
- data/vendor/diy-1.1.1/Rakefile +29 -0
- data/vendor/diy-1.1.1/TODO.txt +9 -0
- data/vendor/diy-1.1.1/homepage/Notes.txt +27 -0
- data/vendor/diy-1.1.1/homepage/Rakefile +14 -0
- data/vendor/diy-1.1.1/homepage/diy_example.png +0 -0
- data/vendor/diy-1.1.1/homepage/index.erb +36 -0
- data/vendor/diy-1.1.1/homepage/index.html +45 -0
- data/vendor/diy-1.1.1/homepage/objects_yml.png +0 -0
- data/vendor/diy-1.1.1/homepage/page_header.graffle +0 -0
- data/vendor/diy-1.1.1/homepage/page_header.html +9 -0
- data/vendor/diy-1.1.1/homepage/page_header.png +0 -0
- data/vendor/diy-1.1.1/lib/diy.rb +365 -0
- data/vendor/diy-1.1.1/sample_code/car.rb +7 -0
- data/vendor/diy-1.1.1/sample_code/chassis.rb +5 -0
- data/vendor/diy-1.1.1/sample_code/diy_example.rb +26 -0
- data/vendor/diy-1.1.1/sample_code/engine.rb +5 -0
- data/vendor/diy-1.1.1/sample_code/objects.yml +10 -0
- data/vendor/diy-1.1.1/test/constructor.rb +119 -0
- data/vendor/diy-1.1.1/test/diy_test.rb +604 -0
- data/vendor/diy-1.1.1/test/files/broken_construction.yml +7 -0
- data/vendor/diy-1.1.1/test/files/cat/cat.rb +3 -0
- data/vendor/diy-1.1.1/test/files/cat/extra_conflict.yml +5 -0
- data/vendor/diy-1.1.1/test/files/cat/heritage.rb +2 -0
- data/vendor/diy-1.1.1/test/files/cat/needs_input.yml +3 -0
- data/vendor/diy-1.1.1/test/files/cat/the_cat_lineage.rb +1 -0
- data/vendor/diy-1.1.1/test/files/dog/dog_model.rb +3 -0
- data/vendor/diy-1.1.1/test/files/dog/dog_presenter.rb +3 -0
- data/vendor/diy-1.1.1/test/files/dog/dog_view.rb +2 -0
- data/vendor/diy-1.1.1/test/files/dog/file_resolver.rb +2 -0
- data/vendor/diy-1.1.1/test/files/dog/other_thing.rb +2 -0
- data/vendor/diy-1.1.1/test/files/dog/simple.yml +11 -0
- data/vendor/diy-1.1.1/test/files/donkey/foo.rb +8 -0
- data/vendor/diy-1.1.1/test/files/donkey/foo/bar/qux.rb +7 -0
- data/vendor/diy-1.1.1/test/files/fud/objects.yml +13 -0
- data/vendor/diy-1.1.1/test/files/fud/toy.rb +14 -0
- data/vendor/diy-1.1.1/test/files/functions/invalid_method.yml +5 -0
- data/vendor/diy-1.1.1/test/files/functions/method_extractor.rb +3 -0
- data/vendor/diy-1.1.1/test/files/functions/nonsingleton_objects.yml +6 -0
- data/vendor/diy-1.1.1/test/files/functions/objects.yml +11 -0
- data/vendor/diy-1.1.1/test/files/functions/thing.rb +3 -0
- data/vendor/diy-1.1.1/test/files/functions/thing_builder.rb +21 -0
- data/vendor/diy-1.1.1/test/files/functions/things_builder.rb +3 -0
- data/vendor/diy-1.1.1/test/files/gnu/objects.yml +14 -0
- data/vendor/diy-1.1.1/test/files/gnu/thinger.rb +7 -0
- data/vendor/diy-1.1.1/test/files/goat/base.rb +8 -0
- data/vendor/diy-1.1.1/test/files/goat/can.rb +6 -0
- data/vendor/diy-1.1.1/test/files/goat/goat.rb +6 -0
- data/vendor/diy-1.1.1/test/files/goat/objects.yml +12 -0
- data/vendor/diy-1.1.1/test/files/goat/paper.rb +6 -0
- data/vendor/diy-1.1.1/test/files/goat/plane.rb +7 -0
- data/vendor/diy-1.1.1/test/files/goat/shirt.rb +6 -0
- data/vendor/diy-1.1.1/test/files/goat/wings.rb +8 -0
- data/vendor/diy-1.1.1/test/files/horse/holder_thing.rb +3 -0
- data/vendor/diy-1.1.1/test/files/horse/objects.yml +7 -0
- data/vendor/diy-1.1.1/test/files/namespace/animal/bird.rb +5 -0
- data/vendor/diy-1.1.1/test/files/namespace/animal/cat.rb +5 -0
- data/vendor/diy-1.1.1/test/files/namespace/animal/reptile/hardshell/turtle.rb +8 -0
- data/vendor/diy-1.1.1/test/files/namespace/animal/reptile/lizard.rb +7 -0
- data/vendor/diy-1.1.1/test/files/namespace/bad_module_specified.yml +8 -0
- data/vendor/diy-1.1.1/test/files/namespace/class_name_combine.yml +8 -0
- data/vendor/diy-1.1.1/test/files/namespace/hello.txt +1 -0
- data/vendor/diy-1.1.1/test/files/namespace/no_module_specified.yml +8 -0
- data/vendor/diy-1.1.1/test/files/namespace/objects.yml +21 -0
- data/vendor/diy-1.1.1/test/files/namespace/road.rb +2 -0
- data/vendor/diy-1.1.1/test/files/namespace/sky.rb +2 -0
- data/vendor/diy-1.1.1/test/files/namespace/subcontext.yml +22 -0
- data/vendor/diy-1.1.1/test/files/non_singleton/air.rb +2 -0
- data/vendor/diy-1.1.1/test/files/non_singleton/fat_cat.rb +3 -0
- data/vendor/diy-1.1.1/test/files/non_singleton/objects.yml +19 -0
- data/vendor/diy-1.1.1/test/files/non_singleton/pig.rb +3 -0
- data/vendor/diy-1.1.1/test/files/non_singleton/thread_spinner.rb +3 -0
- data/vendor/diy-1.1.1/test/files/non_singleton/tick.rb +3 -0
- data/vendor/diy-1.1.1/test/files/non_singleton/yard.rb +2 -0
- data/vendor/diy-1.1.1/test/files/yak/core_model.rb +3 -0
- data/vendor/diy-1.1.1/test/files/yak/core_presenter.rb +3 -0
- data/vendor/diy-1.1.1/test/files/yak/core_view.rb +1 -0
- data/vendor/diy-1.1.1/test/files/yak/data_source.rb +1 -0
- data/vendor/diy-1.1.1/test/files/yak/fringe_model.rb +3 -0
- data/vendor/diy-1.1.1/test/files/yak/fringe_presenter.rb +3 -0
- data/vendor/diy-1.1.1/test/files/yak/fringe_view.rb +1 -0
- data/vendor/diy-1.1.1/test/files/yak/giant_squid.rb +3 -0
- data/vendor/diy-1.1.1/test/files/yak/krill.rb +2 -0
- data/vendor/diy-1.1.1/test/files/yak/my_objects.yml +21 -0
- data/vendor/diy-1.1.1/test/files/yak/sub_sub_context_test.yml +27 -0
- data/vendor/diy-1.1.1/test/test_helper.rb +39 -0
- data/vendor/ffi-0.4.0-x86-mswin32/LICENSE +51 -0
- data/vendor/ffi-0.4.0-x86-mswin32/Rakefile +142 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/AbstractMemory.c +412 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/AbstractMemory.h +68 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/AutoPointer.c +60 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/AutoPointer.h +18 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Buffer.c +171 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Callback.c +374 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Callback.h +47 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/DynamicLibrary.c +213 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/DynamicLibrary.h +22 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Invoker.c +962 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/LastError.c +135 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/LastError.h +18 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/MemoryPointer.c +156 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/MemoryPointer.h +20 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/NullPointer.c +143 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Platform.c +59 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Platform.h +16 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Pointer.c +164 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Pointer.h +25 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Struct.c +477 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Struct.h +26 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Type.c +230 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Type.h +28 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Types.c +118 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/Types.h +54 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/compat.h +22 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/endian.h +40 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/extconf.rb +31 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/ffi.c +76 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi.bsd.mk +34 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi.darwin.mk +75 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi.gnu.mk +29 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi.mk +13 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ChangeLog +3243 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ChangeLog.libffi +347 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ChangeLog.libgcj +40 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ChangeLog.v1 +764 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/LICENSE +21 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/Makefile.am +177 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/Makefile.in +1640 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/README +328 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/TODO +1 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/acinclude.m4 +92 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/aclocal.m4 +7516 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/compile +142 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/config.guess +1516 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/config.sub +1626 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/configure +24414 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/configure.ac +365 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/configure.host +11 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/depcomp +584 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/doc/libffi.info +533 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/doc/libffi.texi +541 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/doc/stamp-vti +4 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/doc/version.texi +4 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/fficonfig.h.in +160 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/include/Makefile.am +9 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/include/Makefile.in +422 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/include/ffi.h.in +393 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/include/ffi_common.h +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/install-sh +323 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/libffi.pc.in +10 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/libtool-version +29 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ltcf-c.sh +861 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ltcf-cxx.sh +1069 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ltcf-gcj.sh +700 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ltconfig +2862 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/ltmain.sh +6930 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/man/Makefile.am +8 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/man/Makefile.in +395 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/man/ffi.3 +31 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/man/ffi_call.3 +103 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/man/ffi_prep_cif.3 +66 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/mdate-sh +201 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/missing +353 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/mkinstalldirs +158 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/alpha/ffi.c +284 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/alpha/ffitarget.h +48 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/alpha/osf.S +366 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/arm/ffi.c +309 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/arm/ffitarget.h +49 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/arm/sysv.S +299 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/closures.c +596 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/cris/ffi.c +383 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/cris/ffitarget.h +51 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/cris/sysv.S +215 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/debug.c +59 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/dlmalloc.c +5099 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/frv/eabi.S +128 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/frv/ffi.c +292 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/frv/ffitarget.h +61 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/ia64/ffi.c +580 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/ia64/ffitarget.h +50 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/ia64/ia64_flags.h +40 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/ia64/unix.S +560 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/java_raw_api.c +359 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/m32r/ffi.c +232 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/m32r/ffitarget.h +48 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/m32r/sysv.S +121 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/m68k/ffi.c +278 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/m68k/ffitarget.h +49 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/m68k/sysv.S +234 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/mips/ffi.c +926 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/mips/ffitarget.h +202 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/mips/n32.S +534 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/mips/o32.S +381 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/pa/ffi.c +709 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/pa/ffitarget.h +77 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/pa/hpux32.S +368 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/pa/linux.S +357 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/aix.S +225 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/aix_closure.S +247 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/asm.h +125 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/darwin.S +245 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +317 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/ffi.c +1429 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +800 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/ffitarget.h +118 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/linux64.S +187 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +236 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +327 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/powerpc/sysv.S +230 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/prep_cif.c +174 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/raw_api.c +254 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/s390/ffi.c +780 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/s390/ffitarget.h +60 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/s390/sysv.S +434 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sh/ffi.c +716 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sh/ffitarget.h +49 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sh/sysv.S +850 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sh64/ffi.c +453 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sh64/ffitarget.h +53 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sh64/sysv.S +530 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sparc/ffi.c +610 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sparc/ffitarget.h +66 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sparc/v8.S +272 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/sparc/v9.S +307 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/types.c +77 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/darwin.S +443 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/darwin64.S +416 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/ffi.c +475 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/ffi64.c +572 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/ffitarget.h +90 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/freebsd.S +458 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/sysv.S +437 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/unix64.S +418 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/src/x86/win32.S +391 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/Makefile.am +71 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/Makefile.in +447 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/config/default.exp +1 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +289 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +263 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/lib/wrapper.exp +45 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +36 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn0.c +97 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn1.c +89 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn2.c +89 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn3.c +90 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn4.c +97 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn5.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn6.c +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/closure_stdcall.c +72 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +102 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +103 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +104 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +110 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +97 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +101 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +121 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +103 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +106 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +117 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +106 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +132 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +121 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +107 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +125 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +105 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +96 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +101 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +100 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +101 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +100 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_double.c +51 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_float.c +51 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_schar.c +82 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshort.c +82 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshortchar.c +94 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_uchar.c +99 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushort.c +82 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushortchar.c +94 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_schar.c +52 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_sint.c +50 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_sshort.c +50 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar.c +50 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint.c +51 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +54 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort.c +51 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +86 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/float.c +59 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +58 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +57 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +72 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/float4.c +62 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/many.c +69 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +63 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +53 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +160 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +169 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +141 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +118 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +119 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +119 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +120 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +139 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +119 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +139 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +139 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/problem1.c +98 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/promotion.c +59 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/pyobjc-tc.c +114 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +35 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl1.c +43 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl2.c +42 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_fl.c +35 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_fl1.c +36 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_fl2.c +49 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_fl3.c +42 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +34 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c +41 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +42 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +36 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +38 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +38 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +38 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +44 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +44 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +65 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +67 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +59 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +63 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +65 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +64 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +74 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +80 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +67 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +86 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.special/special.exp +38 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest.cc +123 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc +53 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/libffi/texinfo.tex +7482 -0
- data/vendor/ffi-0.4.0-x86-mswin32/ext/ffi_c/rbffi.h +23 -0
- data/vendor/ffi-0.4.0-x86-mswin32/gen/Rakefile +12 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/1.8/ffi_c.so +0 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/1.9/ffi_c.so +0 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi.rb +11 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/autopointer.rb +61 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/buffer.rb +0 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/callback.rb +10 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/enum.rb +78 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/errno.rb +8 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/ffi.rb +96 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/io.rb +21 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/library.rb +243 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/managedstruct.rb +55 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/memorypointer.rb +73 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/platform.rb +78 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/pointer.rb +119 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/struct.rb +354 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/tools/const_generator.rb +177 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/tools/generator.rb +58 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/tools/generator_task.rb +35 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/tools/struct_generator.rb +194 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/tools/types_generator.rb +123 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/types.rb +153 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/union.rb +17 -0
- data/vendor/ffi-0.4.0-x86-mswin32/lib/ffi/variadic.rb +30 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/bool_spec.rb +24 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/buffer_spec.rb +196 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/callback_spec.rb +560 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/enum_spec.rb +164 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/errno_spec.rb +13 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/library_spec.rb +144 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/managed_struct_spec.rb +56 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/number_spec.rb +231 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/pointer_spec.rb +195 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/rbx/attach_function_spec.rb +27 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/rbx/memory_pointer_spec.rb +102 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/rbx/spec_helper.rb +1 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/rbx/struct_spec.rb +13 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/spec_helper.rb +17 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/string_spec.rb +103 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/struct_callback_spec.rb +41 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/struct_initialize_spec.rb +30 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/struct_spec.rb +476 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/typedef_spec.rb +48 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/union_spec.rb +60 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/ffi/variadic_spec.rb +84 -0
- data/vendor/ffi-0.4.0-x86-mswin32/spec/spec.opts +4 -0
- data/vendor/hardmock-1.3.7/CHANGES +78 -0
- data/vendor/hardmock-1.3.7/LICENSE +7 -0
- data/vendor/hardmock-1.3.7/README +70 -0
- data/vendor/hardmock-1.3.7/Rakefile +8 -0
- data/vendor/hardmock-1.3.7/config/environment.rb +12 -0
- data/vendor/hardmock-1.3.7/lib/assert_error.rb +23 -0
- data/vendor/hardmock-1.3.7/lib/extend_test_unit.rb +14 -0
- data/vendor/hardmock-1.3.7/lib/hardmock.rb +86 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/errors.rb +22 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/expectation.rb +229 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/expectation_builder.rb +9 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/expector.rb +26 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/method_cleanout.rb +33 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/mock.rb +180 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/mock_control.rb +53 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/stubbing.rb +210 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/trapper.rb +31 -0
- data/vendor/hardmock-1.3.7/lib/hardmock/utils.rb +9 -0
- data/vendor/hardmock-1.3.7/lib/test_unit_before_after.rb +169 -0
- data/vendor/hardmock-1.3.7/rake_tasks/test.rake +22 -0
- data/vendor/hardmock-1.3.7/test/functional/assert_error_test.rb +52 -0
- data/vendor/hardmock-1.3.7/test/functional/auto_verify_test.rb +178 -0
- data/vendor/hardmock-1.3.7/test/functional/direct_mock_usage_test.rb +396 -0
- data/vendor/hardmock-1.3.7/test/functional/hardmock_test.rb +434 -0
- data/vendor/hardmock-1.3.7/test/functional/stubbing_test.rb +479 -0
- data/vendor/hardmock-1.3.7/test/test_helper.rb +43 -0
- data/vendor/hardmock-1.3.7/test/unit/expectation_builder_test.rb +19 -0
- data/vendor/hardmock-1.3.7/test/unit/expectation_test.rb +372 -0
- data/vendor/hardmock-1.3.7/test/unit/expector_test.rb +57 -0
- data/vendor/hardmock-1.3.7/test/unit/method_cleanout_test.rb +36 -0
- data/vendor/hardmock-1.3.7/test/unit/mock_control_test.rb +175 -0
- data/vendor/hardmock-1.3.7/test/unit/mock_test.rb +279 -0
- data/vendor/hardmock-1.3.7/test/unit/test_unit_before_after_test.rb +452 -0
- data/vendor/hardmock-1.3.7/test/unit/trapper_test.rb +62 -0
- data/vendor/hardmock-1.3.7/test/unit/verify_error_test.rb +40 -0
- data/vendor/mcc/cbw32.dll +0 -0
- data/vendor/systir/systir.rb +403 -0
- data/vendor/systir/test/unit/ui/xml/testrunner.rb +192 -0
- data/vendor/systir/test/unit/ui/xml/xmltestrunner.xslt +109 -0
- metadata +561 -0
@@ -0,0 +1,572 @@
|
|
1
|
+
/* -----------------------------------------------------------------------
|
2
|
+
ffi.c - Copyright (c) 2002, 2007 Bo Thorsen <bo@suse.de>
|
3
|
+
Copyright (c) 2008 Red Hat, Inc.
|
4
|
+
|
5
|
+
x86-64 Foreign Function Interface
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
8
|
+
a copy of this software and associated documentation files (the
|
9
|
+
``Software''), to deal in the Software without restriction, including
|
10
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
11
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
12
|
+
permit persons to whom the Software is furnished to do so, subject to
|
13
|
+
the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be included
|
16
|
+
in all copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
21
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
22
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
23
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
25
|
+
DEALINGS IN THE SOFTWARE.
|
26
|
+
----------------------------------------------------------------------- */
|
27
|
+
|
28
|
+
#include <ffi.h>
|
29
|
+
#include <ffi_common.h>
|
30
|
+
|
31
|
+
#include <stdlib.h>
|
32
|
+
#include <stdarg.h>
|
33
|
+
|
34
|
+
#ifdef __x86_64__
|
35
|
+
|
36
|
+
#define MAX_GPR_REGS 6
|
37
|
+
#define MAX_SSE_REGS 8
|
38
|
+
|
39
|
+
struct register_args
|
40
|
+
{
|
41
|
+
/* Registers for argument passing. */
|
42
|
+
UINT64 gpr[MAX_GPR_REGS];
|
43
|
+
__int128_t sse[MAX_SSE_REGS];
|
44
|
+
};
|
45
|
+
|
46
|
+
extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
|
47
|
+
void *raddr, void (*fnaddr)(void), unsigned ssecount);
|
48
|
+
|
49
|
+
/* All reference to register classes here is identical to the code in
|
50
|
+
gcc/config/i386/i386.c. Do *not* change one without the other. */
|
51
|
+
|
52
|
+
/* Register class used for passing given 64bit part of the argument.
|
53
|
+
These represent classes as documented by the PS ABI, with the exception
|
54
|
+
of SSESF, SSEDF classes, that are basically SSE class, just gcc will
|
55
|
+
use SF or DFmode move instead of DImode to avoid reformating penalties.
|
56
|
+
|
57
|
+
Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
|
58
|
+
whenever possible (upper half does contain padding). */
|
59
|
+
enum x86_64_reg_class
|
60
|
+
{
|
61
|
+
X86_64_NO_CLASS,
|
62
|
+
X86_64_INTEGER_CLASS,
|
63
|
+
X86_64_INTEGERSI_CLASS,
|
64
|
+
X86_64_SSE_CLASS,
|
65
|
+
X86_64_SSESF_CLASS,
|
66
|
+
X86_64_SSEDF_CLASS,
|
67
|
+
X86_64_SSEUP_CLASS,
|
68
|
+
X86_64_X87_CLASS,
|
69
|
+
X86_64_X87UP_CLASS,
|
70
|
+
X86_64_COMPLEX_X87_CLASS,
|
71
|
+
X86_64_MEMORY_CLASS
|
72
|
+
};
|
73
|
+
|
74
|
+
#define MAX_CLASSES 4
|
75
|
+
|
76
|
+
#define SSE_CLASS_P(X) ((X) >= X86_64_SSE_CLASS && X <= X86_64_SSEUP_CLASS)
|
77
|
+
|
78
|
+
/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
|
79
|
+
of this code is to classify each 8bytes of incoming argument by the register
|
80
|
+
class and assign registers accordingly. */
|
81
|
+
|
82
|
+
/* Return the union class of CLASS1 and CLASS2.
|
83
|
+
See the x86-64 PS ABI for details. */
|
84
|
+
|
85
|
+
static enum x86_64_reg_class
|
86
|
+
merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
|
87
|
+
{
|
88
|
+
/* Rule #1: If both classes are equal, this is the resulting class. */
|
89
|
+
if (class1 == class2)
|
90
|
+
return class1;
|
91
|
+
|
92
|
+
/* Rule #2: If one of the classes is NO_CLASS, the resulting class is
|
93
|
+
the other class. */
|
94
|
+
if (class1 == X86_64_NO_CLASS)
|
95
|
+
return class2;
|
96
|
+
if (class2 == X86_64_NO_CLASS)
|
97
|
+
return class1;
|
98
|
+
|
99
|
+
/* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
|
100
|
+
if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
|
101
|
+
return X86_64_MEMORY_CLASS;
|
102
|
+
|
103
|
+
/* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
|
104
|
+
if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
|
105
|
+
|| (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
|
106
|
+
return X86_64_INTEGERSI_CLASS;
|
107
|
+
if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
|
108
|
+
|| class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
|
109
|
+
return X86_64_INTEGER_CLASS;
|
110
|
+
|
111
|
+
/* Rule #5: If one of the classes is X87, X87UP, or COMPLEX_X87 class,
|
112
|
+
MEMORY is used. */
|
113
|
+
if (class1 == X86_64_X87_CLASS
|
114
|
+
|| class1 == X86_64_X87UP_CLASS
|
115
|
+
|| class1 == X86_64_COMPLEX_X87_CLASS
|
116
|
+
|| class2 == X86_64_X87_CLASS
|
117
|
+
|| class2 == X86_64_X87UP_CLASS
|
118
|
+
|| class2 == X86_64_COMPLEX_X87_CLASS)
|
119
|
+
return X86_64_MEMORY_CLASS;
|
120
|
+
|
121
|
+
/* Rule #6: Otherwise class SSE is used. */
|
122
|
+
return X86_64_SSE_CLASS;
|
123
|
+
}
|
124
|
+
|
125
|
+
/* Classify the argument of type TYPE and mode MODE.
|
126
|
+
CLASSES will be filled by the register class used to pass each word
|
127
|
+
of the operand. The number of words is returned. In case the parameter
|
128
|
+
should be passed in memory, 0 is returned. As a special case for zero
|
129
|
+
sized containers, classes[0] will be NO_CLASS and 1 is returned.
|
130
|
+
|
131
|
+
See the x86-64 PS ABI for details.
|
132
|
+
*/
|
133
|
+
static int
|
134
|
+
classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
|
135
|
+
size_t byte_offset)
|
136
|
+
{
|
137
|
+
switch (type->type)
|
138
|
+
{
|
139
|
+
case FFI_TYPE_UINT8:
|
140
|
+
case FFI_TYPE_SINT8:
|
141
|
+
case FFI_TYPE_UINT16:
|
142
|
+
case FFI_TYPE_SINT16:
|
143
|
+
case FFI_TYPE_UINT32:
|
144
|
+
case FFI_TYPE_SINT32:
|
145
|
+
case FFI_TYPE_UINT64:
|
146
|
+
case FFI_TYPE_SINT64:
|
147
|
+
case FFI_TYPE_POINTER:
|
148
|
+
if (byte_offset + type->size <= 4)
|
149
|
+
classes[0] = X86_64_INTEGERSI_CLASS;
|
150
|
+
else
|
151
|
+
classes[0] = X86_64_INTEGER_CLASS;
|
152
|
+
return 1;
|
153
|
+
case FFI_TYPE_FLOAT:
|
154
|
+
if (byte_offset == 0)
|
155
|
+
classes[0] = X86_64_SSESF_CLASS;
|
156
|
+
else
|
157
|
+
classes[0] = X86_64_SSE_CLASS;
|
158
|
+
return 1;
|
159
|
+
case FFI_TYPE_DOUBLE:
|
160
|
+
classes[0] = X86_64_SSEDF_CLASS;
|
161
|
+
return 1;
|
162
|
+
case FFI_TYPE_LONGDOUBLE:
|
163
|
+
classes[0] = X86_64_X87_CLASS;
|
164
|
+
classes[1] = X86_64_X87UP_CLASS;
|
165
|
+
return 2;
|
166
|
+
case FFI_TYPE_STRUCT:
|
167
|
+
{
|
168
|
+
const int UNITS_PER_WORD = 8;
|
169
|
+
int words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
|
170
|
+
ffi_type **ptr;
|
171
|
+
int i;
|
172
|
+
enum x86_64_reg_class subclasses[MAX_CLASSES];
|
173
|
+
|
174
|
+
/* If the struct is larger than 16 bytes, pass it on the stack. */
|
175
|
+
if (type->size > 16)
|
176
|
+
return 0;
|
177
|
+
|
178
|
+
for (i = 0; i < words; i++)
|
179
|
+
classes[i] = X86_64_NO_CLASS;
|
180
|
+
|
181
|
+
/* Merge the fields of structure. */
|
182
|
+
for (ptr = type->elements; *ptr != NULL; ptr++)
|
183
|
+
{
|
184
|
+
int num;
|
185
|
+
|
186
|
+
byte_offset = ALIGN (byte_offset, (*ptr)->alignment);
|
187
|
+
|
188
|
+
num = classify_argument (*ptr, subclasses, byte_offset % 8);
|
189
|
+
if (num == 0)
|
190
|
+
return 0;
|
191
|
+
for (i = 0; i < num; i++)
|
192
|
+
{
|
193
|
+
int pos = byte_offset / 8;
|
194
|
+
classes[i + pos] =
|
195
|
+
merge_classes (subclasses[i], classes[i + pos]);
|
196
|
+
}
|
197
|
+
|
198
|
+
byte_offset += (*ptr)->size;
|
199
|
+
}
|
200
|
+
|
201
|
+
/* Final merger cleanup. */
|
202
|
+
for (i = 0; i < words; i++)
|
203
|
+
{
|
204
|
+
/* If one class is MEMORY, everything should be passed in
|
205
|
+
memory. */
|
206
|
+
if (classes[i] == X86_64_MEMORY_CLASS)
|
207
|
+
return 0;
|
208
|
+
|
209
|
+
/* The X86_64_SSEUP_CLASS should be always preceded by
|
210
|
+
X86_64_SSE_CLASS. */
|
211
|
+
if (classes[i] == X86_64_SSEUP_CLASS
|
212
|
+
&& (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
|
213
|
+
classes[i] = X86_64_SSE_CLASS;
|
214
|
+
|
215
|
+
/* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
|
216
|
+
if (classes[i] == X86_64_X87UP_CLASS
|
217
|
+
&& (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
|
218
|
+
classes[i] = X86_64_SSE_CLASS;
|
219
|
+
}
|
220
|
+
return words;
|
221
|
+
}
|
222
|
+
|
223
|
+
default:
|
224
|
+
FFI_ASSERT(0);
|
225
|
+
}
|
226
|
+
return 0; /* Never reached. */
|
227
|
+
}
|
228
|
+
|
229
|
+
/* Examine the argument and return set number of register required in each
|
230
|
+
class. Return zero iff parameter should be passed in memory, otherwise
|
231
|
+
the number of registers. */
|
232
|
+
|
233
|
+
static int
|
234
|
+
examine_argument (ffi_type *type, enum x86_64_reg_class classes[MAX_CLASSES],
|
235
|
+
_Bool in_return, int *pngpr, int *pnsse)
|
236
|
+
{
|
237
|
+
int i, n, ngpr, nsse;
|
238
|
+
|
239
|
+
n = classify_argument (type, classes, 0);
|
240
|
+
if (n == 0)
|
241
|
+
return 0;
|
242
|
+
|
243
|
+
ngpr = nsse = 0;
|
244
|
+
for (i = 0; i < n; ++i)
|
245
|
+
switch (classes[i])
|
246
|
+
{
|
247
|
+
case X86_64_INTEGER_CLASS:
|
248
|
+
case X86_64_INTEGERSI_CLASS:
|
249
|
+
ngpr++;
|
250
|
+
break;
|
251
|
+
case X86_64_SSE_CLASS:
|
252
|
+
case X86_64_SSESF_CLASS:
|
253
|
+
case X86_64_SSEDF_CLASS:
|
254
|
+
nsse++;
|
255
|
+
break;
|
256
|
+
case X86_64_NO_CLASS:
|
257
|
+
case X86_64_SSEUP_CLASS:
|
258
|
+
break;
|
259
|
+
case X86_64_X87_CLASS:
|
260
|
+
case X86_64_X87UP_CLASS:
|
261
|
+
case X86_64_COMPLEX_X87_CLASS:
|
262
|
+
return in_return != 0;
|
263
|
+
default:
|
264
|
+
abort ();
|
265
|
+
}
|
266
|
+
|
267
|
+
*pngpr = ngpr;
|
268
|
+
*pnsse = nsse;
|
269
|
+
|
270
|
+
return n;
|
271
|
+
}
|
272
|
+
|
273
|
+
/* Perform machine dependent cif processing. */
|
274
|
+
|
275
|
+
ffi_status
|
276
|
+
ffi_prep_cif_machdep (ffi_cif *cif)
|
277
|
+
{
|
278
|
+
int gprcount, ssecount, i, avn, n, ngpr, nsse, flags;
|
279
|
+
enum x86_64_reg_class classes[MAX_CLASSES];
|
280
|
+
size_t bytes;
|
281
|
+
|
282
|
+
gprcount = ssecount = 0;
|
283
|
+
|
284
|
+
flags = cif->rtype->type;
|
285
|
+
if (flags != FFI_TYPE_VOID)
|
286
|
+
{
|
287
|
+
n = examine_argument (cif->rtype, classes, 1, &ngpr, &nsse);
|
288
|
+
if (n == 0)
|
289
|
+
{
|
290
|
+
/* The return value is passed in memory. A pointer to that
|
291
|
+
memory is the first argument. Allocate a register for it. */
|
292
|
+
gprcount++;
|
293
|
+
/* We don't have to do anything in asm for the return. */
|
294
|
+
flags = FFI_TYPE_VOID;
|
295
|
+
}
|
296
|
+
else if (flags == FFI_TYPE_STRUCT)
|
297
|
+
{
|
298
|
+
/* Mark which registers the result appears in. */
|
299
|
+
_Bool sse0 = SSE_CLASS_P (classes[0]);
|
300
|
+
_Bool sse1 = n == 2 && SSE_CLASS_P (classes[1]);
|
301
|
+
if (sse0 && !sse1)
|
302
|
+
flags |= 1 << 8;
|
303
|
+
else if (!sse0 && sse1)
|
304
|
+
flags |= 1 << 9;
|
305
|
+
else if (sse0 && sse1)
|
306
|
+
flags |= 1 << 10;
|
307
|
+
/* Mark the true size of the structure. */
|
308
|
+
flags |= cif->rtype->size << 12;
|
309
|
+
}
|
310
|
+
}
|
311
|
+
|
312
|
+
/* Go over all arguments and determine the way they should be passed.
|
313
|
+
If it's in a register and there is space for it, let that be so. If
|
314
|
+
not, add it's size to the stack byte count. */
|
315
|
+
for (bytes = 0, i = 0, avn = cif->nargs; i < avn; i++)
|
316
|
+
{
|
317
|
+
if (examine_argument (cif->arg_types[i], classes, 0, &ngpr, &nsse) == 0
|
318
|
+
|| gprcount + ngpr > MAX_GPR_REGS
|
319
|
+
|| ssecount + nsse > MAX_SSE_REGS)
|
320
|
+
{
|
321
|
+
long align = cif->arg_types[i]->alignment;
|
322
|
+
|
323
|
+
if (align < 8)
|
324
|
+
align = 8;
|
325
|
+
|
326
|
+
bytes = ALIGN(bytes, align);
|
327
|
+
bytes += cif->arg_types[i]->size;
|
328
|
+
}
|
329
|
+
else
|
330
|
+
{
|
331
|
+
gprcount += ngpr;
|
332
|
+
ssecount += nsse;
|
333
|
+
}
|
334
|
+
}
|
335
|
+
if (ssecount)
|
336
|
+
flags |= 1 << 11;
|
337
|
+
cif->flags = flags;
|
338
|
+
cif->bytes = bytes;
|
339
|
+
|
340
|
+
return FFI_OK;
|
341
|
+
}
|
342
|
+
|
343
|
+
void
|
344
|
+
ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
|
345
|
+
{
|
346
|
+
enum x86_64_reg_class classes[MAX_CLASSES];
|
347
|
+
char *stack, *argp;
|
348
|
+
ffi_type **arg_types;
|
349
|
+
int gprcount, ssecount, ngpr, nsse, i, avn;
|
350
|
+
_Bool ret_in_memory;
|
351
|
+
struct register_args *reg_args;
|
352
|
+
|
353
|
+
/* Can't call 32-bit mode from 64-bit mode. */
|
354
|
+
FFI_ASSERT (cif->abi == FFI_UNIX64);
|
355
|
+
|
356
|
+
/* If the return value is a struct and we don't have a return value
|
357
|
+
address then we need to make one. Note the setting of flags to
|
358
|
+
VOID above in ffi_prep_cif_machdep. */
|
359
|
+
ret_in_memory = (cif->rtype->type == FFI_TYPE_STRUCT
|
360
|
+
&& (cif->flags & 0xff) == FFI_TYPE_VOID);
|
361
|
+
if (rvalue == NULL && ret_in_memory)
|
362
|
+
rvalue = alloca (cif->rtype->size);
|
363
|
+
|
364
|
+
/* Allocate the space for the arguments, plus 4 words of temp space. */
|
365
|
+
stack = alloca (sizeof (struct register_args) + cif->bytes + 4*8);
|
366
|
+
reg_args = (struct register_args *) stack;
|
367
|
+
argp = stack + sizeof (struct register_args);
|
368
|
+
|
369
|
+
gprcount = ssecount = 0;
|
370
|
+
|
371
|
+
/* If the return value is passed in memory, add the pointer as the
|
372
|
+
first integer argument. */
|
373
|
+
if (ret_in_memory)
|
374
|
+
reg_args->gpr[gprcount++] = (long) rvalue;
|
375
|
+
|
376
|
+
avn = cif->nargs;
|
377
|
+
arg_types = cif->arg_types;
|
378
|
+
|
379
|
+
for (i = 0; i < avn; ++i)
|
380
|
+
{
|
381
|
+
size_t size = arg_types[i]->size;
|
382
|
+
int n;
|
383
|
+
|
384
|
+
n = examine_argument (arg_types[i], classes, 0, &ngpr, &nsse);
|
385
|
+
if (n == 0
|
386
|
+
|| gprcount + ngpr > MAX_GPR_REGS
|
387
|
+
|| ssecount + nsse > MAX_SSE_REGS)
|
388
|
+
{
|
389
|
+
long align = arg_types[i]->alignment;
|
390
|
+
|
391
|
+
/* Stack arguments are *always* at least 8 byte aligned. */
|
392
|
+
if (align < 8)
|
393
|
+
align = 8;
|
394
|
+
|
395
|
+
/* Pass this argument in memory. */
|
396
|
+
argp = (void *) ALIGN (argp, align);
|
397
|
+
memcpy (argp, avalue[i], size);
|
398
|
+
argp += size;
|
399
|
+
}
|
400
|
+
else
|
401
|
+
{
|
402
|
+
/* The argument is passed entirely in registers. */
|
403
|
+
char *a = (char *) avalue[i];
|
404
|
+
int j;
|
405
|
+
|
406
|
+
for (j = 0; j < n; j++, a += 8, size -= 8)
|
407
|
+
{
|
408
|
+
switch (classes[j])
|
409
|
+
{
|
410
|
+
case X86_64_INTEGER_CLASS:
|
411
|
+
case X86_64_INTEGERSI_CLASS:
|
412
|
+
reg_args->gpr[gprcount] = 0;
|
413
|
+
memcpy (®_args->gpr[gprcount], a, size < 8 ? size : 8);
|
414
|
+
gprcount++;
|
415
|
+
break;
|
416
|
+
case X86_64_SSE_CLASS:
|
417
|
+
case X86_64_SSEDF_CLASS:
|
418
|
+
reg_args->sse[ssecount++] = *(UINT64 *) a;
|
419
|
+
break;
|
420
|
+
case X86_64_SSESF_CLASS:
|
421
|
+
reg_args->sse[ssecount++] = *(UINT32 *) a;
|
422
|
+
break;
|
423
|
+
default:
|
424
|
+
abort();
|
425
|
+
}
|
426
|
+
}
|
427
|
+
}
|
428
|
+
}
|
429
|
+
|
430
|
+
ffi_call_unix64 (stack, cif->bytes + sizeof (struct register_args),
|
431
|
+
cif->flags, rvalue, fn, ssecount);
|
432
|
+
}
|
433
|
+
|
434
|
+
|
435
|
+
extern void ffi_closure_unix64(void);
|
436
|
+
|
437
|
+
ffi_status
|
438
|
+
ffi_prep_closure_loc (ffi_closure* closure,
|
439
|
+
ffi_cif* cif,
|
440
|
+
void (*fun)(ffi_cif*, void*, void**, void*),
|
441
|
+
void *user_data,
|
442
|
+
void *codeloc)
|
443
|
+
{
|
444
|
+
volatile unsigned short *tramp;
|
445
|
+
|
446
|
+
tramp = (volatile unsigned short *) &closure->tramp[0];
|
447
|
+
|
448
|
+
tramp[0] = 0xbb49; /* mov <code>, %r11 */
|
449
|
+
*(void * volatile *) &tramp[1] = ffi_closure_unix64;
|
450
|
+
tramp[5] = 0xba49; /* mov <data>, %r10 */
|
451
|
+
*(void * volatile *) &tramp[6] = codeloc;
|
452
|
+
|
453
|
+
/* Set the carry bit iff the function uses any sse registers.
|
454
|
+
This is clc or stc, together with the first byte of the jmp. */
|
455
|
+
tramp[10] = cif->flags & (1 << 11) ? 0x49f9 : 0x49f8;
|
456
|
+
|
457
|
+
tramp[11] = 0xe3ff; /* jmp *%r11 */
|
458
|
+
|
459
|
+
closure->cif = cif;
|
460
|
+
closure->fun = fun;
|
461
|
+
closure->user_data = user_data;
|
462
|
+
|
463
|
+
return FFI_OK;
|
464
|
+
}
|
465
|
+
|
466
|
+
int
|
467
|
+
ffi_closure_unix64_inner(ffi_closure *closure, void *rvalue,
|
468
|
+
struct register_args *reg_args, char *argp)
|
469
|
+
{
|
470
|
+
ffi_cif *cif;
|
471
|
+
void **avalue;
|
472
|
+
ffi_type **arg_types;
|
473
|
+
long i, avn;
|
474
|
+
int gprcount, ssecount, ngpr, nsse;
|
475
|
+
int ret;
|
476
|
+
|
477
|
+
cif = closure->cif;
|
478
|
+
avalue = alloca(cif->nargs * sizeof(void *));
|
479
|
+
gprcount = ssecount = 0;
|
480
|
+
|
481
|
+
ret = cif->rtype->type;
|
482
|
+
if (ret != FFI_TYPE_VOID)
|
483
|
+
{
|
484
|
+
enum x86_64_reg_class classes[MAX_CLASSES];
|
485
|
+
int n = examine_argument (cif->rtype, classes, 1, &ngpr, &nsse);
|
486
|
+
if (n == 0)
|
487
|
+
{
|
488
|
+
/* The return value goes in memory. Arrange for the closure
|
489
|
+
return value to go directly back to the original caller. */
|
490
|
+
rvalue = (void *) reg_args->gpr[gprcount++];
|
491
|
+
/* We don't have to do anything in asm for the return. */
|
492
|
+
ret = FFI_TYPE_VOID;
|
493
|
+
}
|
494
|
+
else if (ret == FFI_TYPE_STRUCT && n == 2)
|
495
|
+
{
|
496
|
+
/* Mark which register the second word of the structure goes in. */
|
497
|
+
_Bool sse0 = SSE_CLASS_P (classes[0]);
|
498
|
+
_Bool sse1 = SSE_CLASS_P (classes[1]);
|
499
|
+
if (!sse0 && sse1)
|
500
|
+
ret |= 1 << 8;
|
501
|
+
else if (sse0 && !sse1)
|
502
|
+
ret |= 1 << 9;
|
503
|
+
}
|
504
|
+
}
|
505
|
+
|
506
|
+
avn = cif->nargs;
|
507
|
+
arg_types = cif->arg_types;
|
508
|
+
|
509
|
+
for (i = 0; i < avn; ++i)
|
510
|
+
{
|
511
|
+
enum x86_64_reg_class classes[MAX_CLASSES];
|
512
|
+
int n;
|
513
|
+
|
514
|
+
n = examine_argument (arg_types[i], classes, 0, &ngpr, &nsse);
|
515
|
+
if (n == 0
|
516
|
+
|| gprcount + ngpr > MAX_GPR_REGS
|
517
|
+
|| ssecount + nsse > MAX_SSE_REGS)
|
518
|
+
{
|
519
|
+
long align = arg_types[i]->alignment;
|
520
|
+
|
521
|
+
/* Stack arguments are *always* at least 8 byte aligned. */
|
522
|
+
if (align < 8)
|
523
|
+
align = 8;
|
524
|
+
|
525
|
+
/* Pass this argument in memory. */
|
526
|
+
argp = (void *) ALIGN (argp, align);
|
527
|
+
avalue[i] = argp;
|
528
|
+
argp += arg_types[i]->size;
|
529
|
+
}
|
530
|
+
/* If the argument is in a single register, or two consecutive
|
531
|
+
registers, then we can use that address directly. */
|
532
|
+
else if (n == 1
|
533
|
+
|| (n == 2
|
534
|
+
&& SSE_CLASS_P (classes[0]) == SSE_CLASS_P (classes[1])))
|
535
|
+
{
|
536
|
+
/* The argument is in a single register. */
|
537
|
+
if (SSE_CLASS_P (classes[0]))
|
538
|
+
{
|
539
|
+
avalue[i] = ®_args->sse[ssecount];
|
540
|
+
ssecount += n;
|
541
|
+
}
|
542
|
+
else
|
543
|
+
{
|
544
|
+
avalue[i] = ®_args->gpr[gprcount];
|
545
|
+
gprcount += n;
|
546
|
+
}
|
547
|
+
}
|
548
|
+
/* Otherwise, allocate space to make them consecutive. */
|
549
|
+
else
|
550
|
+
{
|
551
|
+
char *a = alloca (16);
|
552
|
+
int j;
|
553
|
+
|
554
|
+
avalue[i] = a;
|
555
|
+
for (j = 0; j < n; j++, a += 8)
|
556
|
+
{
|
557
|
+
if (SSE_CLASS_P (classes[j]))
|
558
|
+
memcpy (a, ®_args->sse[ssecount++], 8);
|
559
|
+
else
|
560
|
+
memcpy (a, ®_args->gpr[gprcount++], 8);
|
561
|
+
}
|
562
|
+
}
|
563
|
+
}
|
564
|
+
|
565
|
+
/* Invoke the closure. */
|
566
|
+
closure->fun (cif, rvalue, avalue, closure->user_data);
|
567
|
+
|
568
|
+
/* Tell assembly how to perform return type promotions. */
|
569
|
+
return ret;
|
570
|
+
}
|
571
|
+
|
572
|
+
#endif /* __x86_64__ */
|