|
2687cfc5
|
2023-02-02T09:10:00
|
|
Add wasm32 emscripten support (#763)
* added build script
* Apply libffi-emscripten patch
* Some changes to wasm32/ffi.c
* Remove exit(0); from test suites
* Fix LONGDOUBLE argument type
* Use more macros in ffi.c
* Use switch statements instead of if chains
* Implemented struct args
* Finish struct implementation
* Partially working closures
* Got closures working (most of closures test suite passes)
* Revert changes to test suite
* Update .gitignore
* Apply code formatter
* Use stackSave and stackRestore rather than directly adjusting stack pointer
* Add missing break
* Fix visibility of ffi_closure_alloc and ffi_closure_free
* Fix FFI_TYPE_STRUCT and FFI_TYPE_LONGDOUBLE when WASM_BIGINT is not used
sig needs to be vi here for FFI_TYPE_STRUCT and FFI_TYPE_LONGDOUBLE, noticed this while running the test suite without WASM_BIGINT support.
* Always use dynCall rather than direct wasmTable lookup (function pointer cast emulation changes dynCall)
* Prevent closures.c from duplicating symbols
* Try to set up CI
* Add test with bigint
* Make test methods static
* Remove BigInt shorthand because it messes up terser
* Add selenium tests
* Update tests a bit to try to make CI work
* WASM_BIGINT is a linker flag not a compile flag
* Finish getting CI working (#1)
* update gitignore
* Avoid adding "use strict;" to generated JS
This should be controlled by -s STRICT_JS in Emscripten.
* Make JavaScript ES5 compliant
* Remove redundant EXPORTED_RUNTIME_METHODS settings
* Fix definition of DEREF_I16
* Avoid marshalling FFI_TYPE_LONGDOUBLE when WASM_BIGINT is not used
* Add missing FFI_TYPE_STRUCT signature
* Improve test scripts
* Remove redundant EXPORTED_RUNTIME_METHODS settings
* Add missing EOL
* Add struct unpacking tests
* Update ci config to try to actually use WASM_BIGINT
* Revert "Avoid marshalling FFI_TYPE_LONGDOUBLE when WASM_BIGINT is not used"
This reverts commit 61bd5a3e20891623715604581b6e872ab3dfab80.
* Fix single_entry_structs tests
* Fix return from closure call
* Fix 64 bit return from closures
* only allocate as much space on stack for return pointer as needed
* Revert "only allocate as much space on stack for return pointer as needed"
This reverts commit e54a30faea3803e7ac33eed191bde9e573850fc1.
* xfail two tests
* Fix err_bad_abi test
* Remove test logging junk
* Try to set up long double marshalling for closures
* xfail err_bad_abi
* Fix reference errors in previous commit
* Add missing argument pointer assignment
* Fix signature of function pointer in cls_dbls_struct
* Fix longdouble argument
* Try some changes to bigint handling
* Fix BigInt handling
* Fix cls_longdouble test
* Fix long double closure arg with no WASM_BIGINT
* Use EM_JS to factor out js helpers
* Support for varargs closure calls
* Fix varargs calls
* Fix err_bad_abi test
* Fix typo in previous commit
* Add more assertions to closures test suite
* Fix some asserts
* Add assertions to a few more tests
* Fix some tests
* Fix more floating point assertions
* Update more tests
* Var args for ffi_call
* Don't do node tests
* Macro for allocating on stack
* Add some comments, simplify struct handling
* Try again to fix varargs calls, add comments
* Consolidate WASM_BIGINT conditionals into LOAD_U64 and STORE_U64 macros
* A bit of cleanup
* Fix another typo
* Some fixes to the testsuite
* Another testsuite fix
* Fix varags with closures?
* Another attempt at getting closure varargs to work
* sig is initialized later
* Allow libffi.closures tests to be run
* Improve build script
* Remove redundant semicolons
* Fix a few libffi.closures test failures
* Cleanup
* Legacy dynCall API is no longer used
* Fix FFI_TYPE_LONGDOUBLE offset
* xfail 2 tests for WASM
- closure_loc_fn0; not applicable -- codeloc doesn't point to closure.
- huge_struct; function signature too long.
* Revert some redundant dg-output/printf statements
Helps Node.
* Revert "Don't do node tests"
This reverts commit a341ef4b.
* Fix assertions in cls_24byte
* More tiny formating fixes to test suite
* Revert "Revert "Don't do node tests""
This reverts commit 7722e685ea04e2420e042886816d8c4dd31f5dcb.
* Fix 64 bit returns when WASM_BIGINT is absent
* Fix print statement in cls_24byte
* Add CALL_FUNC_PTR macro to allow pyodide to define custom calling behavior to handle fpcast
* Update single_entry_structs tests
* More explanations
* Fix compile error in last commit
* Add more support for pyodide fpcast emulation, update CI to try to test it
* Clone via https
* Fix path to pyodide emsdk_env
* Add asserts to the rest of the test suite
* Fix test compile errors
* Fix some tests
* Fix cls_ulonglong
* Fix alignment of <4 byte args
* fix cls_ulonglong again
* Use snprintf instead of sprintf
* Should assert than strncmp returned 0
* Fix va_struct1 and va_struct3
* Change double and long double tests
These tests are failing because of a strange bug with prinft and doubles, but I am not convinced
it necessarily has anything to do with libffi. This version casts the double to int before printing it and avoids the issue
* Enable node tests
* Revert "Change double and long double tests"
This reverts commit 8f3ff89c6577dc99564181cd9974f2f1ba21f1e9.
* Fix PYODIDE_FPCAST flag
* add conftest.py back in
* Fix emcc error: setting `EXPORTED_FUNCTIONS` expects `<class 'list'>` but got `<class 'str'>`
See discussion on https://github.com/pyodide/pyodide/pull/1596
* Remove test.html
* Remove duplicate test file
* More changes from upstream
* Fix some whitespace
* Add some basic debug logging statements
* Reapply libffi.exp changes
* Don't build docs (#7)
Works around build issue makeinfo: command not found.
* Update long double alignment
Emscripten 2.0.26 reduces the aligmnet of long double to 8. Quoting
from `ChangeLog.md`:
> The alignment of `long double`, which is a 128-bit floating-point
> value implemented in software, is reduced from 16 to 8. The lower
> alignment allows `max_align_t` to properly match the alignment we
> use for malloc, which is 8 (raising malloc's alignment to achieve
> correctness the other way would come with a performance regression).
> (#10072)
* Update long double alignment
Emscripten 2.0.26 reduces the aligmnet of long double to 8. Quoting
from `ChangeLog.md`:
> The alignment of `long double`, which is a 128-bit floating-point
> value implemented in software, is reduced from 16 to 8. The lower
> alignment allows `max_align_t` to properly match the alignment we
> use for malloc, which is 8 (raising malloc's alignment to achieve
> correctness the other way would come with a performance regression).
> (#10072)
* Improve error handling a bit (#8)
* Fix handling of signed arguments to ffi_call (#11)
* Fix struct argument handling in ffi_call (#10)
* Remove fpcast emulation tests
* Align the stack to MAX_ALIGN before making call (#12)
* Increase MAX_ARGS
* Cleanup (#14)
* Fix Closure compiler error with -sASSERTIONS=1 (#15)
* Remove function pointer cast emulation (#13)
This reverts commit 593b402 and cbc54da, as it's no longer needed
after PR pyodide/pyodide#2019.
* Prefer the `__EMSCRIPTEN__` definition over `EMSCRIPTEN` (#18)
"The preprocessor define EMSCRIPTEN is deprecated. Don't pass it to code
in strict mode. Code should use the define __EMSCRIPTEN__ instead."
https://github.com/emscripten-core/emscripten/blob/84a634167a1cd9e8c47d37a559688153a4ceace6/emcc.py#L887-L890
* Install autoconf 2.71
* Try again with installing autoconf 2.71
* Fix compatibility with Emscripten 3.1.28
* CI: remove use of `EM_CONFIG` env
See commit:
https://github.com/emscripten-core/emsdk/commit/3d87d5ea8143b3636f872fb05b896eb4a19a070b
* Fix cls_multi_schar: cast rest_call to signed char
* Remove test xfails (#17)
* Fix long double when used as a varargs argument
* Enable unwindtest and fix it
* Add EM_JS_DEPS
* Also require convertJsFunctionToWasm
* Run tests very very verbose
* Echo the .emscripten file
* Remove --experimental-wasm-bigint insertion
* Build with assertions
* Move verbosity flags back out of LDFLAGS
* Remove debug print statement
* Use up to date pyodide docker image
* Explicitly cast res_call to fix test failure
* Put back name of main function in cls_longdouble_va.c
* Fix alignment
The stack pointer apparently needs to be aligned to 16. There were
some terrible subtle bugs caused by not respecting this. stackAlloc
knows that the stack should be 16 aligned, so we can use stackAlloc(0)
to enforce this. This way if alignment requirements change, as long
as Emscripten updates stackAlloc to continue to enforce them we should
be okay.
* Fix handling of systems with no Js bigint integration
When we run the node tests we use node v14 tests (since node v14 is
vendored with Emscripten). Node v14 has no Js bigint integration
unless the --experimental-wasm-bigint flag is passed. So only the
node tests really notice if we get this right. Turns out, it didn't
work. We can't call a JavaScript function with 64 bit integer arguments
without bigint integration.
In ffi_call, we are trying to call a wasm function that takes 64 bit
integer arguments. dynCall is designed to do this. We need to go back
to tracking the signature when we don't have WASM_BIGINT, and then use
dynCall. This works better now that emscripten can dynamically fill in
extra dynCall wrappers:
https://github.com/emscripten-core/emscripten/pull/17328
On the other hand, for the closures we are not getting a function pointer
as a first argument. We need to make our own wasm legalizer adaptor that
splits 64 bit integer arguments and then calls the JavaScript trampoline,
then the JavaScript trampoline reassembles them, calls the closure, then
splits the result (if it's a 64 bit integer) and the adaptor puts it back
together.
* Improvements to emscripten test shell scripts (#21)
This fixes the C++ unwinding tests and makes other minor improvements
to the Emscripten test shell scripts.
* Rename the test folder and move test files into emscripten test folder
* Use docker image that has autoconf-2.71
* Cleanup
* Pin emscripten 3.1.30
* Fix build.sh path
* Rearrange ci pipeline
* Fix bpo_38748 test
* Cleanup
* Improvements to comments, add static asserts, and update copyright
* Use `*_js` instead of `*_helper` for EM_JS functions (#22)
* Minor code simplification
* Xfail first dejagnu test to work around emscripten cache messages
See https://github.com/emscripten-core/emscripten/issues/18607
* Remove unneeded xfails
* Shorten conftest.py by using pytest-pyodide
* Apply formatters and linters to emscripten directory
* Fix Emscripten xfail hack
* Fix build-tests script
* Patch emscripten to quiet info messages
* Clean up compiler flags in scripts and remove some settings from circleci config
* Rename emscripten quiet script
* Add missing export
* Don't remove go.exp
* Add reference to emscripten logging issue
---------
Co-authored-by: Kleis Auke Wolthuizen <info@kleisauke.nl>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Co-authored-by: Christian Heimes <christian@python.org>
|
|
55bcc477
|
2022-09-24T22:03:52
|
|
Test idea borrowed from cpython
|
|
e79f1948
|
2022-09-24T17:11:30
|
|
Add test case transcribed from cpython
|
|
acf0ce9e
|
2022-09-18T11:04:54
|
|
Add test case
|
|
b49308ea
|
2022-09-18T08:26:23
|
|
Add missing ABI_ATTR
|
|
98d4ad65
|
2022-09-15T09:42:53
|
|
Fix test headers
|
|
4d0a0384
|
2022-09-15T07:58:26
|
|
msvc requires the printf change, not mingw
|
|
19e8354f
|
2022-09-14T07:36:06
|
|
Fix test case
|
|
4932f351
|
2022-09-14T07:08:06
|
|
Improve test case
|
|
819b01ce
|
2022-09-14T07:07:15
|
|
Add test case
|
|
55f80b02
|
2022-05-28T14:17:53
|
|
New test cases
|
|
de95947a
|
2022-05-24T03:04:43
|
|
Fix check for invalid varargs arguments. (#707)
|
|
e770fb76
|
2022-05-22T20:43:41
|
|
Clean up types
|
|
4fa6239f
|
2021-12-23T14:27:32
|
|
testsuite/libffi.call: fix mismatching return types (#679)
Co-authored-by: Andreas Schwab <schwab@suse.de>
|
|
03596285
|
2021-07-29T10:16:42
|
|
No more xfail for alpha
|
|
43e4ad4d
|
2021-07-29T07:55:59
|
|
Test passing structs by value
|
|
c96b0577
|
2021-07-16T11:16:39
|
|
Fix test check
|
|
4ed23be8
|
2021-07-16T11:08:01
|
|
Fix test check
|
|
eb244724
|
2021-07-16T14:33:04
|
|
Use CHECK to assert more things in test suite (#654)
* Use CHECK to assert more things in test suite
* Use snprintf instead of sprintf
* Fix va_struct1 and va_struct3
|
|
9fa94c60
|
2021-06-27T11:02:33
|
|
Print more information when an assertion fails in test suite (#649)
|
|
87429ce7
|
2021-06-26T08:49:45
|
|
This test includes a closure and must live in the closures test directory. (#645)
Co-authored-by: Matthew Green <squidhacks@users.noreply.github.com>
|
|
5651bea2
|
2021-06-15T15:19:26
|
|
2021-06-15 Jakub Jelinek <jakub@redhat.com>
* src/x86/ffi64.c (classify_argument): For FFI_TYPE_STRUCT set words
to number of words needed for type->size + byte_offset bytes rather
than just type->size bytes. Compute pos before the loop and check
total size of the structure.
* testsuite/libffi.call/nested_struct12.c: New test.
|
|
205cf01b
|
2021-03-23T11:31:08
|
|
Bug #680. Don't accept floats or small ints as var args. (#628)
* Bug #680. Don't accept floats or small ints as var args.
* Bug #680. Don't accept floats or small ints as var args.
* Bug #680. Don't accept floats or small ints as var args.
|
|
5dcb741f
|
2019-11-23T10:24:58
|
|
Move nested_struct3 test to closures directory
|
|
36730f5d
|
2019-11-22T19:49:38
|
|
Move closure test to closure directory
|
|
c88c0e92
|
2019-11-22T19:27:34
|
|
More more closure tests to the closure test directory
|
|
332a539e
|
2019-11-22T18:54:30
|
|
Move closure tests so we can easily XFAIL them for some targets
|
|
91a7fbe9
|
2019-11-20T07:16:41
|
|
Fix or1k lack-of-g++ checking in testsuite
|
|
bd3a4687
|
2019-11-19T17:14:23
|
|
No C++ for or1k-unknown-elf
|
|
d6e4f96b
|
2019-11-19T13:36:49
|
|
No C++ for or1k
|
|
49701868
|
2019-11-19T10:07:16
|
|
Disable type warnings for or1k.
|
|
262cf74f
|
2019-11-19T10:06:57
|
|
No c++ for or1k-elf
|
|
188de63c
|
2019-11-07T12:03:19
|
|
Mark xfail for m68k and alpha.
|
|
09f9d856
|
2019-10-09T16:26:06
|
|
Making the change to correct the comment when SUN (#521)
and GCC are used together
|
|
af6773d6
|
2018-04-02T13:55:31
|
|
Fix appveyor windows build (#420)
* Fix msvcc dll build by adding dllexport decorations to all API declarations
* Fix appveyor build for VS 2013
Use the new -DFFI_BUILDING_DLL for producing a working DLL. Update the
msvcc.sh wrapper script to successfully compile the testsuite files.
* MSVC build: suppress warnings in testsuite
* fix testsuite on appveyor
|
|
746c3ce2
|
2018-03-29T07:01:14
|
|
Expand ABI tests on x86. Testsuite bug fixes.
|
|
e8cf1338
|
2018-03-27T14:12:02
|
|
msvc c99 hack
|
|
a82b456e
|
2018-03-27T11:49:46
|
|
msvc fixes
|
|
5c2ca479
|
2018-03-27T04:01:37
|
|
Remove uninitialized warning. Fix #163.
|
|
a33bfa9b
|
2018-03-17T07:17:24
|
|
xfail unwind tests for moxie
|
|
45da2fcb
|
2018-02-17T18:53:02
|
|
new test: return small struct
The bug originally was discovered in https://bugs.gentoo.org/634190
where complicated callback was returning invalid data on ia64.
This change adds minimal reproducer that fails only on ia64 as:
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O0 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O2 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O3 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -Os execution test
Test passes on amd64. The fix is in the following commit.
Bug: https://bugs.gentoo.org/634190
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
1fb788ac
|
2017-10-10T11:37:00
|
|
aarch64: fix index base register for AArch64
The base is passed in `x3`, not in `x2`. This fixes the indexing base
so that the right value is used.
|
|
c5b408ee
|
2016-09-04T09:17:46
|
|
xfail the unwindtest for osx as per issue #279
|
|
ef8be84d
|
2016-07-29T21:01:38
|
|
Do not use fabsl() in float2.c test
Some targets may support long double variables but in the same
time may lack support of long double functions like fabsl().
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
|
|
f3201733
|
2016-07-29T19:18:41
|
|
Fix output expectations in cls_dbls_struct.c test
This test with invalid output expectations may fail on some targets
(e.g. ARC processors).
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
|
|
e5843a3a
|
2016-04-15T16:10:08
|
|
x86: Fix calling convention for ffi_closure_win64_inner
Also enable testing for the cross-abi calls.
|
|
38a4d72c
|
2015-11-17T21:18:20
|
|
add ffi_get_struct_offsets
|
|
4cdedc27
|
2015-07-25T14:29:15
|
|
Tidy call.exp test collection
Commit c952a92e20aa6013d8202d0b3fa1d87838c83054 moved all of
the complex tests to libffi.complex, but failed to remove the
anti-globbing from libffi.call.
|
|
609db2fb
|
2015-07-25T12:42:04
|
|
Test case from Issue #70
|
|
5cd411ad
|
2015-01-13T15:44:03
|
|
New test case for old aarch64 bug
|
|
3316b666
|
2014-11-15T07:31:41
|
|
Merge pull request #145 from rth7680/master
Configure and testsuite cleanups, v2
|
|
c952a92e
|
2014-11-14T11:00:14
|
|
testsuite: Move complex tests to their own subdirectory
It seems a bit silly to isolate them by globbing vs "*complex*"
when we can just as easily put them in their own subdirectory.
|
|
f1301a54
|
2014-11-14T10:50:29
|
|
testsuite: Use feature test rather than enumeration for complex
|
|
771fabc6
|
2014-11-14T14:21:35
|
|
Take a float absolute value using fabs() instead of abs().
Replace integer abs() by floating point fabs() in the approximate
equality check for float values.
|
|
9622ede2
|
2014-11-14T13:18:04
|
|
Fix floating point number comparisons in testsuite/libffi.call/float[123].c.
Rewrite the checks for approximate equality of floating point return
values to be in the form "fabs(a - b) < EPS" instead of just
"a - b < EPS".
|
|
ad89c2d9
|
2014-10-26T13:16:03
|
|
sparc: Add support for complex types
|
|
a529bec2
|
2014-10-21T11:26:59
|
|
arm: Add support for complex types
|
|
f41bec3b
|
2014-10-17T20:46:48
|
|
alpha: Add support for complex types
|
|
a992f878
|
2014-10-22T22:58:09
|
|
aarch64: Add support for complex types
|
|
198f469e
|
2014-11-05T16:34:41
|
|
x86: Add support for Complex
|
|
7cf84132
|
2014-11-07T06:56:55
|
|
testsuite: Add two dg-do run markers
Caught by clang warning about unused -L parameter.
|
|
fc501750
|
2014-11-05T16:33:44
|
|
testsuite: Fix return_complex2 vs excessive precision
Use the previously computed rc2 to validate, rather than
recomputing a floating point result with excess precision.
|
|
99db4d42
|
2014-10-23T14:12:18
|
|
win64: Rewrite
It's way too different from the 32-bit ABIs with which it is
currently associated. As seen from all of the existing XFAILs.
|
|
990eb9d4
|
2014-09-28T00:50:29
|
|
Only run the complex type tests on supported platforms.
|
|
6e8a4460
|
2014-09-20T06:21:19
|
|
2014-07-22 Dominik Vogt <vogt@linux.vnet.ibm.com>
* src/types.c (FFI_TYPEDEF, FFI_NONCONST_TYPEDEF): Merge the macros by
adding another argument that controls whether the result is const or not
(FFI_LDBL_CONST): Temporary macro to reduce ifdef confusion
* src/prep_cif.c (ffi_prep_cif_core): Replace list of systems with new
macro FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION
* src/pa/ffitarget.h (FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION):
Define.
* src/s390/ffitarget.h (FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION):
Define.
* src/x86/ffitarget.h (FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION):
Define.
2014-07-22 Dominik Vogt <vogt@linux.vnet.ibm.com>
* doc/libffi.texi (Primitive Types): Document ffi_type_complex_float,
ffi_type_complex_double and ffi_type_complex_longdouble
(Complex Types): New subsection.
(Complex Type Example): Ditto.
* testsuite/libffi.call/cls_align_complex_double.c: New
FFI_TYPE_COMPLEX test.
* testsuite/libffi.call/cls_align_complex_float.c: Ditto.
* testsuite/libffi.call/cls_align_complex_longdouble.c: Ditto.
* testsuite/libffi.call/cls_complex_double.c: Ditto.
* testsuite/libffi.call/cls_complex_float.c: Ditto.
* testsuite/libffi.call/cls_complex_longdouble.c: Ditto.
* testsuite/libffi.call/cls_complex_struct_double.c: Ditto.
* testsuite/libffi.call/cls_complex_struct_float.c: Ditto.
* testsuite/libffi.call/cls_complex_struct_longdouble.c: Ditto.
* testsuite/libffi.call/cls_complex_va_double.c: Ditto.
* testsuite/libffi.call/cls_complex_va_float.c: Ditto.
* testsuite/libffi.call/cls_complex_va_longdouble.c: Ditto.
* testsuite/libffi.call/complex_double.c: Ditto.
* testsuite/libffi.call/complex_defs_double.c: Ditto.
* testsuite/libffi.call/complex_float.c: Ditto.
* testsuite/libffi.call/complex_defs_float.c: Ditto.
* testsuite/libffi.call/complex_longdouble.c: Ditto.
* testsuite/libffi.call/complex_defs_longdouble.c: Ditto.
* testsuite/libffi.call/complex_int.c: Ditto.
* testsuite/libffi.call/many_complex_double.c: Ditto.
* testsuite/libffi.call/many_complex_float.c: Ditto.
* testsuite/libffi.call/many_complex_longdouble.c: Ditto.
* testsuite/libffi.call/return_complex1_double.c: Ditto.
* testsuite/libffi.call/return_complex1_float.c: Ditto.
* testsuite/libffi.call/return_complex1_longdouble.c: Ditto.
* testsuite/libffi.call/return_complex2_double.c: Ditto.
* testsuite/libffi.call/return_complex2_float.c: Ditto.
* testsuite/libffi.call/return_complex2_longdouble.c: Ditto.
* testsuite/libffi.call/return_complex_double.c: Ditto.
* testsuite/libffi.call/return_complex_float.c: Ditto.
* testsuite/libffi.call/return_complex_longdouble.c: Ditto.
* src/raw_api.c (ffi_raw_to_ptrarray): Handle FFI_TYPE_COMPLEX
(ffi_ptrarray_to_raw): Ditto.
* src/prep_cif.c (ffi_prep_cif_core): Abort if FFI_TYPE_COMPLEX is not
implemented in libffi for the target.
* src/java_raw_api.c (ffi_java_raw_size): FFI_TYPE_COMPLEX not supported
yet (abort).
(ffi_java_raw_to_ptrarray): Ditto.
(ffi_java_rvalue_to_raw): Ditto.
(ffi_java_raw_to_rvalue): Ditto.
* src/debug.c (ffi_type_test): Add debug tests for complex types.
* include/ffi.h.in (FFI_TYPE_COMPLEX): Add new FFI_TYPE_COMPLEX.
(FFI_TYPE_LAST): Bump.
(ffi_type_complex_float): Add new ffi_type_....
(ffi_type_complex_double): Ditto.
(ffi_type_complex_longdouble): Ditto.
2014-07-22 Dominik Vogt <vogt@linux.vnet.ibm.com>
* src/s390/ffitarget.h (FFI_TARGET_HAS_COMPLEX_TYPE): Define to provide
FFI_TYPE_COMPLEX support.
* src/s390/ffi.c (ffi_check_struct_type): Implement FFI_TYPE_COMPLEX
(ffi_prep_args): Ditto.
(ffi_prep_cif_machdep): Ditto.
(ffi_closure_helper_SYSV): Ditto.
|
|
70c303cb
|
2014-05-11T09:56:40
|
|
Fix testsuite for GCC 4.9.0
|
|
d3695227
|
2014-04-20T12:03:25
|
|
Support fastcall closures
libffi on 32-bit x86 now supports closures for all supported ABIs.
Thus, rewrite the last remaining duplicated-by-ABI test (closure_stdcall
and closure_thiscall) to use the generic ABI_NUM/ABI_ATTR mechanism.
|
|
7d698125
|
2014-03-26T23:17:56
|
|
Use the proper C++ compiler to run C++ tests
Running the C compiler with -shared-libgcc -lstdc++ does not work on
non-GCC compilers.
|
|
e48918ec
|
2014-03-16T20:29:27
|
|
testsuite: Add ABIs to the test matrix; unify tests across ABIs
This eliminates all the *_win32.c tests in favor of the tests they were
branched from, and expands test coverage to run many more tests on
stdcall, thiscall, and fastcall.
This same mechanism also supports testing any other target that has
multiple ABIs.
|
|
4d4d368e
|
2014-03-16T17:02:05
|
|
testsuite: Replace ffitestcxx.h with ffitest.h
ffitest.h contains a superset of the functionality of ffitestcxx.h;
make the C++ tests include ffitest.h instead, and remove ffitestcxx.h.
|
|
3f97cf34
|
2014-03-16T16:53:42
|
|
testsuite: Unify the C and C++ testsuites
These two testsuites differ only in the source file glob and a couple of
additional compiler options; unify the remaining bits.
|
|
0d9cce8e
|
2014-03-16T16:22:58
|
|
testsuite: ffitest.h: Parenthesize the CHECK macro
|
|
5695ec14
|
2014-03-16T16:04:58
|
|
testsuite: Factor out a function to run a matrix of tests
This commons up code from libffi.call/call.exp and
libffi.special/special.exp, unifies the optimization option matrix
between the two, and makes it easier to add more axes to the matrix
in the future.
|
|
dfdb02cc
|
2014-03-16T15:26:26
|
|
testsuite: Introduce a __THISCALL__ compiler-specific macro
|
|
bad89483
|
2014-03-16T15:16:18
|
|
testsuite: Introduce a __STDCALL__ compiler-specific macro
Several tests want to use stdcall, which differs in syntax by compiler,
so introduce a macro for it in ffitest.h.
|
|
98a793fa
|
2014-03-16T15:20:36
|
|
testsuite: Common up the ifdef blocks for compiler-specific macros
|
|
e1911f78
|
2014-03-16T03:25:53
|
|
Add support for stdcall, thiscall, and fastcall on non-Windows x86-32
Linux supports the stdcall calling convention, either via functions
explicitly declared with the stdcall attribute, or via code compiled
with -mrtd which effectively makes stdcall the default.
This introduces FFI_STDCALL, FFI_THISCALL, and FFI_FASTCALL on
non-Windows x86-32 platforms, as non-default calling conventions.
|
|
9c279328
|
2014-03-16T02:31:19
|
|
testsuite: Remove fragile stack pointer checks
testsuite/libffi.call/closure_stdcall.c and
testsuite/libffi.call/closure_thiscall.c include inline assembly to save
the stack pointer before and after the call, and compare the values.
However, compilers can and do leave the stack in different states for
these two pieces of inline assembly, such as by saving a temporary value
on the stack across the call; observed with gcc -Os, and verified as
spurious through careful inspection of disassembly.
|
|
88d562a8
|
2014-03-15T22:08:19
|
|
testsuite/libffi.call/many_win32.c: Avoid spurious failure due to excess precision
The test case testsuite/libffi.call/many_win32.c can spuriously fail due
to excess floating-point precision. Instrumenting it with some printf
calls shows differences well above FLT_EPSILON. (Note when
instrumenting it that multiple computations of the difference, such as
one in a print and another in the conditional, may produce different
results.)
Rather than complicating the test suite with architecture-specific flags
to avoid excess precision, just simplify the floating-point computation
to avoid a dependency on potential excess precision.
|
|
c00a49ec
|
2014-03-15T22:08:19
|
|
testsuite/libffi.call/many.c: Avoid spurious failure due to excess precision
The test case testsuite/libffi.call/many.c can spuriously fail due to
excess floating-point precision. Instrumenting it with some printf
calls shows differences well above FLT_EPSILON. (Note when
instrumenting it that multiple computations of the difference, such as
one in a print and another in the conditional, may produce different
results.)
Rather than complicating the test suite with architecture-specific flags
to avoid excess precision, just simplify the floating-point computation
to avoid a dependency on potential excess precision.
|
|
164283f4
|
2013-11-16T06:38:55
|
|
The powerpc64 support opted to pass floating point values both in the
fpr area and the parameter save area, necessary when the backend
doesn't know if a function argument corresponds to the ellipsis
arguments of a variadic function. This patch adds powerpc support for
variadic functions, and changes the code to only pass fp in the ABI
mandated area. ELFv2 needs this change since the parameter save area
may not exist there.
This also fixes two faulty tests that used a non-variadic function
cast to call a variadic function, and spuriously reasoned that this is
somehow necessary for static functions..
|
|
db0ace3a
|
2013-11-16T06:29:25
|
|
Fix broken test cases
|
|
cdf405d5
|
2013-11-13T15:50:21
|
|
add a testcase for the double/float issue on ARMHF
|
|
c2422174
|
2013-11-02T14:08:23
|
|
Merge pull request #45 from foss-for-synopsys-dwc-arc-processors/arc_support
arc: Fix build error
|
|
2f5626ce
|
2013-10-15T15:32:16
|
|
Fix testsuite bug
|
|
f64e4a86
|
2013-10-15T15:20:14
|
|
Fix many.c testcase for Aarch64
|
|
128cd1d2
|
2013-10-08T06:45:51
|
|
Fix spelling errors
|
|
dd26f1f3
|
2013-03-28T15:39:01
|
|
add a failing test for closures on ARM hardfloat
|
|
b9f01378
|
2013-03-25T13:27:36
|
|
add a testcase, that on ARM hardfloat needs more than the 8 VFP argument registers to pass arguments to a call
|
|
2fbdb0f2
|
2013-03-25T13:26:02
|
|
use the absolute value to check the test result against an epsilon
|
|
f308faf1
|
2013-02-11T14:25:13
|
|
Add moxie support. Release 3.0.12.
|
|
10e77227
|
2013-02-10T08:47:26
|
|
mend
|
|
a9521411
|
2013-02-09T06:54:40
|
|
sparc v8 and testsuite fixes
|
|
63ba1fa7
|
2013-02-08T15:18:19
|
|
Remove xfail for arm*-*-*.
|
|
f3a4f3fd
|
2013-02-07T09:57:20
|
|
Fixes for AIX xlc compiler.
|
|
522f8fef
|
2013-02-06T20:31:31
|
|
Fix man page. Clean out junk.
|
|
aeb8719a
|
2013-01-21T07:37:30
|
|
New microblaze support
|
|
40860245
|
2013-01-21T07:37:30
|
|
New microblaze support
|
|
f03eab08
|
2013-01-11T17:14:11
|
|
Remove obsolete inline test functions
|
|
05fbe1fa
|
2013-01-11T16:54:40
|
|
xlc compiler support
|