Jeremy Huddleston Sequoia [Fri, 20 Jul 2018 16:37:43 +0000 (09:37 -0700)]
Update FFI_HIDDEN() to use .private_extern on Apple platforms and use the macro where appropriate
Fix issue #439
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
Jeremy Huddleston Sequoia [Mon, 25 Jun 2018 11:38:58 +0000 (04:38 -0700)]
Add compact unwind for darwin/i386 (#440)
* x86: Add implementation of compact unwind for ffi_call_i386, et al.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* x86: Use __text as the section name to avoid deprecated section name warnings.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* darwin: Add missing regular,debug attributes for compact unwind sections
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
Shoaib Meenai [Mon, 18 Jun 2018 00:04:24 +0000 (17:04 -0700)]
Mark sysv.S as SafeSEH compatible (#438)
It contains no exception handler, so we can just emit the special
@feat.00 symbol to indicate that it's trivially SafeSEH compatible.
SafeSEH only applies to x86 and not x86-64, hence its inclusion in the
x86-specific block. See [1] for details.
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx#the_.sxdata_section_
Jeremy Huddleston Sequoia [Mon, 18 Jun 2018 00:01:50 +0000 (17:01 -0700)]
i386: Fix missing break; in case statement leading to incorrectly returned FFI_BAD_ABI (#437)
* i386: Add missing break triggering dead store static analyzer checks.
Register calling sequence is being reported as bad ABI instead of working as intended.
Found-by: Clang Static Analysis
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* Mark ffi arm sysv entry points as private_extern.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* x86_64: Add implementation of compact unwind for ffi_call_unix64.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Anthony Green [Wed, 9 May 2018 17:21:02 +0000 (13:21 -0400)]
Handle FFI_GNUW64 on non-Windows systems (EFI)
Anthony Green [Wed, 9 May 2018 14:50:46 +0000 (10:50 -0400)]
Mark some cases as xfail due to GCC bug
Anthony Green [Sat, 5 May 2018 11:41:53 +0000 (07:41 -0400)]
Revert "Remove some symbol exports and cleanup newline warnings (#433)"
This reverts commit
a5a0f3cf36dfb4d64316414a872288c3170e6c1d.
Jeremy Huddleston Sequoia [Sat, 5 May 2018 10:44:33 +0000 (03:44 -0700)]
Remove some symbol exports and cleanup newline warnings (#433)
* build: Ensure darwin generated sources end with a new line
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* build: Use .private_extern where missing to prevent exporting symbols that are not API
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
hjl-tools [Wed, 2 May 2018 13:19:58 +0000 (06:19 -0700)]
Re-enable msabi testing (#436)
* Revert "disable msabi testing for now"
This reverts commit
7b7638eb0eac2adfa72f7ec9f254ba287c9947e2.
* x86: Correct testing for 64-bit x86-64
Since passing -m32 to x86-64 compiler will generate i386 code, we
need to check both __ILP32__ and __i386__ for 64-bit x86-64.
* x86: Check __i386__ instead of i?86-*-* targets
Since passing -m32 to x86-64 compiler will generate i386 code, we need
to check __i386__ instead of i?86-*-* targets for i386 targets.
* i386: Properly passing integer parameters in registers
For thiscall and fastcall, if the paramter passed as 64-bit integer or
struct, all following integer paramters will be passed on stack.
* test: Add ABI_ATTR to callback_code
Add ABI_ATTR to callback_code to properly test different ABIs.
Alan Modra [Wed, 2 May 2018 04:25:29 +0000 (13:55 +0930)]
PowerPC64 ELFv1 fp arg fixes
The ELFv1 ABI says: "Single precision floating point values are mapped
to the second word in a single doubleword" and also "Floating point
registers f1 through f13 are used consecutively to pass up to 13
floating point values, one member aggregates passed by value
containing a floating point value, and to pass complex floating point
values".
libffi wasn't expecting float args in the second word, and wasn't
passing one member aggregates in fp registers. This patch fixes those
problems, making use of the existing ELFv2 homogeneous aggregate
support since a one element fp struct is a special case of an
homogeneous aggregate.
I've also set a flag when returning pointers that might be used one
day. This is just a tidy since the ppc64 assembly support code
currently doesn't test FLAG_RETURNS_64BITS for integer types..
* src/powerpc/ffi_linux64.c (discover_homogeneous_aggregate):
Compile for ELFv1 too, handling single element aggregates.
(ffi_prep_cif_linux64_core): Call discover_homogeneous_aggregate
for ELFv1. Set FLAG_RETURNS_64BITS for FFI_TYPE_POINTER return.
(ffi_prep_args64): Call discover_homogeneous_aggregate for ELFv1,
and handle single element structs containing float or double
as if the element wasn't wrapped in a struct. Store floats in
second word of doubleword slot when big-endian.
(ffi_closure_helper_LINUX64): Similarly.
Anthony Green [Tue, 1 May 2018 10:46:30 +0000 (06:46 -0400)]
Add license for build-time tools
Tom Tromey [Sat, 28 Apr 2018 10:46:10 +0000 (04:46 -0600)]
Fix two "return" issues in x86/ffi64.c (#431)
Issue #70 pointed out that at least one compiler didn't like:
return ffi_call_efi64(cif, fn, rvalue, avalue);
... where the return type is "void". This patch splits the statement
into two.
I also noticed that ffi_call_go here seems to do a double call. I
suspect a "return" is missing here, so this patch adds it as well.
Tom Tromey [Fri, 27 Apr 2018 16:48:51 +0000 (10:48 -0600)]
Merge pull request #429 from yousong/m4subst
build: fix subst toolexecdir, toolexeclibdir
Yousong Zhou [Thu, 26 Apr 2018 11:27:54 +0000 (19:27 +0800)]
build: fix subst toolexecdir, toolexeclibdir
On CentOS 7.4, configure script generated by autogen.sh will output the
following values when compiling GCC source code
toolexecdir='NONE/$(target_alias)'
toolexeclibdir='NONE/$(target_alias)/lib'
and cause build error
... -o libffi.la -rpath NONE/riscv64-bs-linux-gnu/lib ...
checking for shl_load in -ldld... libtool: link: only absolute run-paths are allowed
Stephen [Wed, 25 Apr 2018 20:17:32 +0000 (13:17 -0700)]
update to https for cygwin download (#428)
Lucas Pluvinage [Fri, 20 Apr 2018 22:24:50 +0000 (00:24 +0200)]
xtensa-linux: use cache flush instruction only if it is available (#426)
James Cowgill [Thu, 19 Apr 2018 00:28:23 +0000 (01:28 +0100)]
Various MIPS Fixes (#425)
* mips: simplify closure #defines
This commit should have no visible effect.
* mips: add special handling of variadic functions
MIPS requires special handling of variadic functions which pass floating
point arguments:
* In the o32 ABI, all float arguments are passed in integer registers.
* In the n32/n64 ABIs, float arguments after the ellipsis are passed in
integer registers.
Implement this in libffi. To support this in n32/n64 closures, we need to add
a new mips_nfixedargs field to ffi_cif which will break the libffi ABI.
This fixes the libffi.call/cls_longdouble_va.c test which was failing on
64-bit MIPS.
* mips: align argn for all 64-bit types in o32 closure handler
Ensure that argn is pre-aligned for all 64-bit argument types (including
doubles) and not just integer types.
This fixes closures of the form "f(float, double, <some integer args>)".
Previously the first integer argument would be read from a2 which is garbage
at this point (the float arguments have already "consumed" a0-a3). After
this commit, argn is correctly padded between the "float" and "double"
arguments so that the first integer argument is read from the stack.
Fixes "double f(float,double,int)" test in #371
* mips: do not read from floating point register if returning a struct
In the o32 ABI, the pointer passed in a0 used to return structures
indirectly is treated as the first argument for argument allocation purposes.
This means that it should inhibit floating point registers the same way that
other integer arguments do.
Fixes "Double f(float,Double,double)" test in #371
* mips: fix pointer cast warnings
Fix two pointer cast warnings when compiled on 64-bit mips by casting
through uintptr_t.
Fixes mips64el part of #404
Anthony Green [Sun, 8 Apr 2018 22:25:43 +0000 (18:25 -0400)]
Merge branch 'master' of github.com:/libffi/libffi
Anthony Green [Sun, 8 Apr 2018 22:25:34 +0000 (18:25 -0400)]
Fix case where callback arg value is split across regs and stack
Andreas Krebbel [Thu, 5 Apr 2018 12:27:32 +0000 (14:27 +0200)]
Fix issue #421 (#422)
Fantastic - thanks for digging into this.
Anthony Green [Mon, 2 Apr 2018 12:30:17 +0000 (08:30 -0400)]
3.3 release candidate 0
Anthony Green [Mon, 2 Apr 2018 12:24:44 +0000 (08:24 -0400)]
disable msabi testing for now
fwg [Mon, 2 Apr 2018 11:55:31 +0000 (13:55 +0200)]
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
Anthony Green [Thu, 29 Mar 2018 11:22:57 +0000 (07:22 -0400)]
Trim some optimization tests
Anthony Green [Thu, 29 Mar 2018 11:22:38 +0000 (07:22 -0400)]
Simplify matrix
Anthony Green [Thu, 29 Mar 2018 11:10:23 +0000 (07:10 -0400)]
Remove warning message from clang
Anthony Green [Thu, 29 Mar 2018 11:01:14 +0000 (07:01 -0400)]
Expand ABI tests on x86. Testsuite bug fixes.
Anthony Green [Tue, 27 Mar 2018 18:45:40 +0000 (14:45 -0400)]
deal with msvc warnings
Anthony Green [Tue, 27 Mar 2018 18:37:50 +0000 (14:37 -0400)]
fix quoting issue
Anthony Green [Tue, 27 Mar 2018 18:35:10 +0000 (14:35 -0400)]
Don't ignore a file
Anthony Green [Tue, 27 Mar 2018 18:34:31 +0000 (14:34 -0400)]
Try different msvc hack
Anthony Green [Tue, 27 Mar 2018 18:12:02 +0000 (14:12 -0400)]
msvc c99 hack
Anthony Green [Tue, 27 Mar 2018 15:58:42 +0000 (11:58 -0400)]
More msvc hacks
Anthony Green [Tue, 27 Mar 2018 15:49:46 +0000 (11:49 -0400)]
msvc fixes
Anthony Green [Tue, 27 Mar 2018 15:36:04 +0000 (11:36 -0400)]
Remove debug output
Anthony Green [Tue, 27 Mar 2018 15:35:23 +0000 (11:35 -0400)]
Force literals to float (msvc warning)
Anthony Green [Tue, 27 Mar 2018 15:28:40 +0000 (11:28 -0400)]
Fix msvc linking
Anthony Green [Tue, 27 Mar 2018 15:20:21 +0000 (11:20 -0400)]
Fix library path handling
Anthony Green [Tue, 27 Mar 2018 15:14:56 +0000 (11:14 -0400)]
Deal with libpath
Anthony Green [Tue, 27 Mar 2018 12:25:26 +0000 (08:25 -0400)]
Fix library path handling
Anthony Green [Tue, 27 Mar 2018 12:10:03 +0000 (08:10 -0400)]
Use mixed cygpath paths
Anthony Green [Tue, 27 Mar 2018 12:05:42 +0000 (08:05 -0400)]
Copy - don't symlink - to support msvc builds
Anthony Green [Tue, 27 Mar 2018 11:35:33 +0000 (07:35 -0400)]
Use cygpath to convert windows paths
Anthony Green [Tue, 27 Mar 2018 11:14:59 +0000 (07:14 -0400)]
try to fix windows builds
Anthony Green [Tue, 27 Mar 2018 11:06:01 +0000 (07:06 -0400)]
Reduce verbosity
Anthony Green [Tue, 27 Mar 2018 10:23:29 +0000 (06:23 -0400)]
iOS builds
Anthony Green [Tue, 27 Mar 2018 10:22:57 +0000 (06:22 -0400)]
Fix -L support
Anthony Green [Tue, 27 Mar 2018 09:59:26 +0000 (05:59 -0400)]
Fix quoting
Anthony Green [Tue, 27 Mar 2018 09:35:35 +0000 (05:35 -0400)]
Don't set AM_MAKEFLAGS
Anthony Green [Tue, 27 Mar 2018 09:13:38 +0000 (05:13 -0400)]
Run tests with lots of debug output
Anthony Green [Tue, 27 Mar 2018 09:11:52 +0000 (05:11 -0400)]
Add -L and -l support
Anthony Green [Tue, 27 Mar 2018 09:07:08 +0000 (05:07 -0400)]
Mention C99 and build requirements
Anthony Green [Tue, 27 Mar 2018 08:46:04 +0000 (04:46 -0400)]
Remove reference to wiki
Anthony Green [Tue, 27 Mar 2018 08:09:56 +0000 (04:09 -0400)]
Refactor travis build instructions. Add iOS build
Anthony Green [Tue, 27 Mar 2018 08:02:06 +0000 (04:02 -0400)]
Add issue template
Anthony Green [Tue, 27 Mar 2018 08:01:37 +0000 (04:01 -0400)]
Remove uninitialized warning. Fix #163.
Anthony Green [Sat, 24 Mar 2018 13:05:14 +0000 (09:05 -0400)]
revert
Anthony Green [Sat, 24 Mar 2018 12:45:59 +0000 (08:45 -0400)]
Try bhaible tests in appveyor
Anthony Green [Sat, 24 Mar 2018 12:40:04 +0000 (08:40 -0400)]
Formatting fixes
Anthony Green [Fri, 23 Mar 2018 15:47:29 +0000 (11:47 -0400)]
Add libffi.map.in to extra dist files
Anthony Green [Fri, 23 Mar 2018 13:06:08 +0000 (09:06 -0400)]
Add sparc solaris build notes
Anthony Green [Mon, 19 Mar 2018 01:22:55 +0000 (21:22 -0400)]
Fix formatting
Anthony Green [Mon, 19 Mar 2018 00:36:52 +0000 (20:36 -0400)]
Fix formatting
Anthony Green [Sun, 18 Mar 2018 20:00:04 +0000 (16:00 -0400)]
Don't align-double for 32-bit x86
Anthony Green [Sun, 18 Mar 2018 19:30:00 +0000 (15:30 -0400)]
Remove debug output
Anthony Green [Sun, 18 Mar 2018 19:13:21 +0000 (15:13 -0400)]
Add m4/ax_require_defined.m4
Anthony Green [Sun, 18 Mar 2018 17:41:15 +0000 (13:41 -0400)]
travis debug
Anthony Green [Sun, 18 Mar 2018 17:32:03 +0000 (13:32 -0400)]
Update autoconf archive macros
Anthony Green [Sun, 18 Mar 2018 16:53:42 +0000 (12:53 -0400)]
Add missing FFI_GNUW64 enum
Anthony Green [Sun, 18 Mar 2018 16:34:18 +0000 (12:34 -0400)]
Merge branch 'master' of github.com:/libffi/libffi
Anthony Green [Sun, 18 Mar 2018 16:32:10 +0000 (12:32 -0400)]
Add FFI_GNUW64 ABI for GNU 80-bit long double support
Anthony Green [Sun, 18 Mar 2018 16:32:10 +0000 (12:32 -0400)]
Add FFI_GWIN64 ABI for GNU 80-bit long double support
Ryan C. Underwood [Sun, 18 Mar 2018 14:00:42 +0000 (07:00 -0700)]
Fully allocate file backing writable maps (#389)
When ftruncate() is used on a filesystem supporting sparse files,
space in the file is not actually allocated. Then, when the file
is mmap'd and libffi writes to the mapping, SIGBUS is thrown to
the calling application. Instead, always fully allocate the file
that will back writable maps.
Anthony Green [Sun, 18 Mar 2018 11:01:54 +0000 (07:01 -0400)]
Fix return values
Anthony Green [Sun, 18 Mar 2018 02:49:58 +0000 (22:49 -0400)]
Make tests compile/run standalone
Anthony Green [Sat, 17 Mar 2018 13:03:42 +0000 (09:03 -0400)]
Formatting fixes. Add 'bug fixes' note.
Anthony Green [Sat, 17 Mar 2018 11:17:24 +0000 (07:17 -0400)]
xfail unwind tests for moxie
Anthony Green [Sat, 17 Mar 2018 03:54:28 +0000 (23:54 -0400)]
Install moxie libstdc++
Anthony Green [Sat, 17 Mar 2018 03:36:51 +0000 (23:36 -0400)]
Install moxie-elf-g++
Anthony Green [Fri, 16 Mar 2018 21:53:33 +0000 (17:53 -0400)]
Fix closure case where 8-byte value is partially passed in register. Fixes cls_many_mixed_float_double test case.
Anthony Green [Fri, 16 Mar 2018 11:28:33 +0000 (07:28 -0400)]
Run dejagnu's runtest with -a option to prevent travis timeouts after 10min
Anthony Green [Thu, 15 Mar 2018 12:17:18 +0000 (08:17 -0400)]
fix .travis.yml
Anthony Green [Thu, 15 Mar 2018 01:21:06 +0000 (21:21 -0400)]
fix .travis.yml
Anthony Green [Thu, 15 Mar 2018 01:00:55 +0000 (21:00 -0400)]
fix .travis.yml
Anthony Green [Thu, 15 Mar 2018 00:32:00 +0000 (20:32 -0400)]
fix .travis.yml
Anthony Green [Thu, 15 Mar 2018 00:22:33 +0000 (20:22 -0400)]
fix .travis.yml
Anthony Green [Wed, 14 Mar 2018 18:09:39 +0000 (14:09 -0400)]
fix .travis.yml
Anthony Green [Wed, 14 Mar 2018 17:47:27 +0000 (13:47 -0400)]
fix .travis.yml
Anthony Green [Wed, 14 Mar 2018 17:25:04 +0000 (13:25 -0400)]
fix .travis.yml
Anthony Green [Wed, 14 Mar 2018 17:07:04 +0000 (13:07 -0400)]
fix .travis.yml
Anthony Green [Wed, 14 Mar 2018 16:40:58 +0000 (12:40 -0400)]
Fix travis.yml
Anthony Green [Wed, 14 Mar 2018 16:15:04 +0000 (12:15 -0400)]
yaml syntax error fix
Anthony Green [Wed, 14 Mar 2018 15:13:32 +0000 (11:13 -0400)]
markdown fixes
Anthony Green [Wed, 14 Mar 2018 13:06:38 +0000 (09:06 -0400)]
Fix test cases with short results
Anthony Green [Wed, 14 Mar 2018 12:02:10 +0000 (08:02 -0400)]
Debug travis output
Anthony Green [Wed, 14 Mar 2018 11:40:53 +0000 (07:40 -0400)]
test
Anthony Green [Wed, 14 Mar 2018 03:31:18 +0000 (23:31 -0400)]
debug
Anthony Green [Wed, 14 Mar 2018 03:30:52 +0000 (23:30 -0400)]
debug
Anthony Green [Wed, 14 Mar 2018 03:20:15 +0000 (23:20 -0400)]
Debug env
Anthony Green [Wed, 14 Mar 2018 03:07:10 +0000 (23:07 -0400)]
Refactor