summaryrefslogtreecommitdiff
path: root/src/prep_cif.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix check for invalid varargs arguments. (#707)Roland Schatz2022-05-231-1/+2
|
* Bug #680. Don't accept floats or small ints as var args. (#628)Anthony Green2021-03-231-2/+21
| | | | | | | * 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.
* Fix building for aarch64 windows with mingw toolchains (#555)Martin Storsjö2020-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * aarch64: Check _WIN32 instead of _M_ARM64 for detecting windows This fixes building for aarch64 with mingw toolchains. _M_ARM64 is predefined by MSVC, while mingw compilers predefine __aarch64__. In aarch64 specific code, change checks for _M_ARM64 into checks for _WIN32. In arch independent code, check for (defined(_M_ARM64) || defined(__aarch64__)) && defined(_WIN32) instead of just _M_ARM64. In src/closures.c, coalesce checks like defined(X86_WIN32) || defined(X86_WIN64) || defined(_M_ARM64) into plain defined(_WIN32). Technically, this enables code for ARM32 windows where it wasn't, but as far as I can see it, those codepaths should be fine for that architecture variant as well. * aarch64: Only use armasm source when building with MSVC When building for windows/arm64 with clang, the normal gas style .S source works fine. sysv.S and win64_armasm.S seem to be functionally equivalent, with only differences being due to assembler syntax.
* fix mingw build and crashing bugs for Python Windows ARM64 (#496)Paul Monson2019-08-071-2/+2
| | | | | | * fix mingw build and crashing bugs for Python Windows ARM64 * Fix issues found in PR review
* libffi: added ARM64 support for Windows (#486)ossdev072019-06-251-2/+4
| | | | | | | | | | | | | | | | | | * libffi: added ARM64 support for Windows 1. ported sysv.S to win64_armasm.S for armasm64 assembler 2. added msvc_build folder for visual studio solution 3. updated README.md for the same 4. MSVC solution created with the changes, and below test suites are tested with test script written in python. libffi.bhaible libffi.call 5. Basic functionality of above test suites are getting passed Signed-off-by: ossdev07 <ossdev@puresoftware.com> * Update README.md
* Prefix ALIGN macros with FFI_Gregory Pakosz2017-04-271-4/+4
|
* add ffi_get_struct_offsetsTom Tromey2016-02-221-4/+23
|
* sparc: Rewrite everythingRichard Henderson2014-11-121-11/+0
| | | | | | | | | It's impossible to call between v8 and v9 ABIs, because of the stack bias in the v9 ABI. So let's not pretend it's just not implemented yet. Split the v9 code out to a separate file. The register windows prevent ffi_call from setting up the entire stack frame the assembly, but we needn't make an indirect call back to prep_args.
* 2014-07-22 Dominik Vogt <vogt@linux.vnet.ibm.com>Dominik Vogt2014-09-201-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* prep_cif.c: Remove unnecessary ifdef for X86_WIN32Josh Triplett2014-03-161-5/+0
| | | | | | | | ffi_prep_cif_core had a special case for X86_WIN32, checking for FFI_THISCALL in addition to the FFI_FIRST_ABI-to-FFI_LAST_ABI range before returning FFI_BAD_ABI. However, on X86_WIN32, FFI_THISCALL already falls in that range, making the special case unnecessary. Remove it.
* Darwin/x86_64: Fix 64-bit type shortening warningsZachary Waldowski2014-02-051-1/+1
|
* Undo iOS ARM64 changes.Anthony Green2013-12-051-1/+1
|
* Darwin: Misc size_t warningsZachary Waldowski2013-11-301-1/+1
|
* This separates the 32-bit sysv/linux/bsd code from the 64-bit linuxAlan Modra2013-11-211-0/+4
| | | | | | | | | | | | | | | | code, and makes it possible to link code compiled with different options to those used to compile libffi. For example, a -mlong-double-128 libffi can be used with -mlong-double-64 code. Using the return value area as a place to pass parameters wasn't such a good idea, causing a failure of cls_ulonglong.c. I didn't see this when running the mainline gcc libffi testsuite because that version of the test is inferior to the upstreamm libffi test. Using NUM_FPR_ARG_REGISTERS rather than NUM_FPR_ARG_REGISTERS64 meant that a parameter save area could be allocated before it was strictly necessary. Wrong but harmless. Found when splitting apart ffi.c into 32-bit and 64-bit support.
* Add nios2 port.Sandra Loosemore2013-10-151-1/+10
|
* Xtensa supportAnthony Green2013-01-211-0/+8
|
* TILE-Gx/TILEPro supportAnthony Green2012-10-121-0/+13
|
* abi check fixes and Linux/x32 supportAnthony Green2012-03-031-1/+1
|
* Fix ABI check regressionAnthony Green2012-02-151-2/+2
|
* Rebased from gccAnthony Green2012-02-101-2/+7
|
* Add David Gilbert's variadic function call supportAnthony Green2011-11-121-3/+37
|
* Fix bad_abi test. rc5.Anthony Green2011-02-131-10/+4
|
* Fix xfailsAnthony Green2011-02-091-3/+15
|
* stdcall-x86-closure-fixAnthony Green2010-08-051-2/+2
|
* FFI_LAST_ABI fixAnthony Green2010-07-231-1/+1
|
* Microsoft Visual C portAnthony Green2010-01-151-6/+3
|
* Initial commitAnthony Green2009-10-041-0/+174