|
ebbc5e14
|
2023-02-02T11:40:17
|
|
Fix signed vs unsigned comparison (#765)
As reported by -Wsign-compare. In the case of getting the result of
comparing the result of sysconf (_SC_PAGESIZE) to other value, this also
correctly handles edge cases where the above fails and returns -1.
Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
|
|
de95947a
|
2022-05-24T03:04:43
|
|
Fix check for invalid varargs arguments. (#707)
|
|
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.
|
|
c06468fa
|
2020-04-26T04:58:33
|
|
Fix building for aarch64 windows with mingw toolchains (#555)
* 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.
|
|
c2a68590
|
2019-08-07T11:57:45
|
|
fix mingw build and crashing bugs for Python Windows ARM64 (#496)
* fix mingw build and crashing bugs for Python Windows ARM64
* Fix issues found in PR review
|
|
d856743e
|
2019-06-26T07:31:22
|
|
libffi: added ARM64 support for Windows (#486)
* 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
|
|
bd72848c
|
2017-04-27T13:20:36
|
|
Prefix ALIGN macros with FFI_
|
|
38a4d72c
|
2015-11-17T21:18:20
|
|
add ffi_get_struct_offsets
|
|
2b27890b
|
2014-10-24T16:10:48
|
|
sparc: Rewrite everything
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.
|
|
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.
|
|
9531d05f
|
2014-03-16T01:50:02
|
|
prep_cif.c: Remove unnecessary ifdef for X86_WIN32
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.
|
|
9da28b44
|
2013-12-30T16:23:21
|
|
Darwin/x86_64: Fix 64-bit type shortening warnings
|
|
3dc3f32c
|
2013-12-05T16:23:25
|
|
Undo iOS ARM64 changes.
|
|
0612081e
|
2013-11-30T03:03:00
|
|
Darwin: Misc size_t warnings
|
|
ab79d6e2
|
2013-11-21T06:12:35
|
|
This separates the 32-bit sysv/linux/bsd code from the 64-bit linux
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.
|
|
ac753688
|
2013-11-21T06:12:35
|
|
This separates the 32-bit sysv/linux/bsd code from the 64-bit linux
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.
|
|
16b93a21
|
2013-10-15T15:33:59
|
|
Add nios2 port.
|
|
20cae32b
|
2013-01-21T07:07:38
|
|
Xtensa support
|
|
9c00a3f6
|
2012-10-12T16:46:06
|
|
TILE-Gx/TILEPro support
|
|
964c5b93
|
2012-03-03T14:46:20
|
|
abi check fixes and Linux/x32 support
|
|
d578b896
|
2012-02-15T00:18:18
|
|
Fix ABI check regression
|
|
dee20f8e
|
2012-02-10T13:06:46
|
|
Rebased from gcc
|
|
ff9454da
|
2011-11-12T17:18:51
|
|
Add David Gilbert's variadic function call support
|
|
1fbf9dc4
|
2011-02-13T08:06:39
|
|
Fix bad_abi test. rc5.
|
|
69dbe845
|
2011-02-09T07:38:43
|
|
Fix xfails
|
|
c1d28ba8
|
2010-08-05T08:48:16
|
|
stdcall-x86-closure-fix
|
|
d14178be
|
2010-07-23T09:14:00
|
|
FFI_LAST_ABI fix
|
|
cadeba6c
|
2010-01-15T10:46:51
|
|
Microsoft Visual C port
|
|
c6dddbd0
|
2009-10-04T08:11:33
|
|
Initial commit
|