Josh Triplett [Mon, 17 Mar 2014 03:29:27 +0000 (20:29 -0700)]
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.
Josh Triplett [Mon, 17 Mar 2014 00:02:05 +0000 (17:02 -0700)]
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.
Josh Triplett [Sun, 16 Mar 2014 23:53:42 +0000 (16:53 -0700)]
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.
Josh Triplett [Sun, 16 Mar 2014 23:22:58 +0000 (16:22 -0700)]
testsuite: ffitest.h: Parenthesize the CHECK macro
Josh Triplett [Sun, 16 Mar 2014 23:04:58 +0000 (16:04 -0700)]
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.
Josh Triplett [Sun, 16 Mar 2014 22:26:26 +0000 (15:26 -0700)]
testsuite: Introduce a __THISCALL__ compiler-specific macro
Josh Triplett [Sun, 16 Mar 2014 22:16:18 +0000 (15:16 -0700)]
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.
Josh Triplett [Sun, 16 Mar 2014 22:20:36 +0000 (15:20 -0700)]
testsuite: Common up the ifdef blocks for compiler-specific macros
Anthony Green [Sun, 16 Mar 2014 14:53:48 +0000 (10:53 -0400)]
Merge pull request #98 from joshtriplett/unconfigure.host
Merge configure.host into configure.ac
Josh Triplett [Sun, 16 Mar 2014 13:58:59 +0000 (06:58 -0700)]
Merge configure.host into configure.ac
configure.host only has a single entry, and shows no signs of needing
more added.
Anthony Green [Sun, 16 Mar 2014 13:45:55 +0000 (09:45 -0400)]
Update version to 3.1-rc0. Clean up README.
Anthony Green [Sun, 16 Mar 2014 13:39:08 +0000 (09:39 -0400)]
Merge pull request #97 from joshtriplett/remove-more-generated-files
Remove more generated files
Anthony Green [Sun, 16 Mar 2014 13:38:47 +0000 (09:38 -0400)]
Merge pull request #96 from joshtriplett/sawing-changelogs
Generate ChangeLog from git in make dist; remove it from version control
Josh Triplett [Sun, 16 Mar 2014 13:26:03 +0000 (06:26 -0700)]
doc: Remove autogenerated info file and stamp
Josh Triplett [Sun, 16 Mar 2014 13:25:52 +0000 (06:25 -0700)]
fficonfig.h.in: Remove, configure generates it
Josh Triplett [Sun, 16 Mar 2014 13:11:58 +0000 (06:11 -0700)]
Generate ChangeLog from git in make dist
Archive the existing ChangeLog to ChangeLog.libffi-3.1
Josh Triplett [Sun, 16 Mar 2014 12:52:00 +0000 (05:52 -0700)]
ChangeLog.v1: Fix typo in explanatory header.
Anthony Green [Sun, 16 Mar 2014 13:03:57 +0000 (09:03 -0400)]
Add missing ChangeLog entry. Clean up some entries.
Anthony Green [Sun, 16 Mar 2014 12:41:00 +0000 (08:41 -0400)]
Merge pull request #95 from joshtriplett/news
README: Update news for 3.0.14
Josh Triplett [Sun, 16 Mar 2014 12:38:24 +0000 (05:38 -0700)]
README: Update news for 3.0.14
Anthony Green [Sun, 16 Mar 2014 12:32:05 +0000 (08:32 -0400)]
Merge pull request #93 from joshtriplett/travis-dist
Make Travis check "make dist"
Josh Triplett [Sun, 16 Mar 2014 12:29:08 +0000 (05:29 -0700)]
.travis.yml: Test "make dist" too.
Anthony Green [Sun, 16 Mar 2014 12:05:51 +0000 (08:05 -0400)]
Merge pull request #85 from joshtriplett/stdcall
stdcall support on Linux
Josh Triplett [Sun, 16 Mar 2014 10:25:53 +0000 (03:25 -0700)]
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.
Anthony Green [Sun, 16 Mar 2014 11:58:16 +0000 (07:58 -0400)]
Merge pull request #90 from joshtriplett/win32-unifdef
prep_cif.c: Remove unnecessary ifdef for X86_WIN32
Anthony Green [Sun, 16 Mar 2014 11:57:59 +0000 (07:57 -0400)]
Merge pull request #89 from joshtriplett/travis32
.travis.yml: Test on both 32-bit and 64-bit
Josh Triplett [Sun, 16 Mar 2014 08:50:02 +0000 (01:50 -0700)]
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.
Josh Triplett [Sun, 16 Mar 2014 06:27:56 +0000 (23:27 -0700)]
.travis.yml: Test on both 32-bit and 64-bit
Anthony Green [Sun, 16 Mar 2014 11:51:33 +0000 (07:51 -0400)]
Merge pull request #94 from joshtriplett/esp-extra-stackery-perception
ChangeLog: Document testsuite changes to remove fragile stack pointer checks
Josh Triplett [Sun, 16 Mar 2014 11:49:36 +0000 (04:49 -0700)]
ChangeLog: Document testsuite changes to remove fragile stack pointer checks
Anthony Green [Sun, 16 Mar 2014 11:47:17 +0000 (07:47 -0400)]
Merge pull request #91 from joshtriplett/esp-extra-stackery-perception
testsuite: Remove fragile stack pointer checks
Josh Triplett [Sun, 16 Mar 2014 09:31:19 +0000 (02:31 -0700)]
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.
Anthony Green [Sun, 16 Mar 2014 11:44:08 +0000 (07:44 -0400)]
Merge pull request #88 from joshtriplett/such-precision-many-fail-wow
testsuite/libffi.call/many.c: Avoid spurious failure due to excess precision
Josh Triplett [Sun, 16 Mar 2014 11:27:32 +0000 (04:27 -0700)]
ChangeLog: Document many.c and many_win32.c changes to avoid spurious failures
Josh Triplett [Sun, 16 Mar 2014 05:08:19 +0000 (22:08 -0700)]
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.
Josh Triplett [Sun, 16 Mar 2014 05:08:19 +0000 (22:08 -0700)]
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.
Anthony Green [Sun, 16 Mar 2014 11:36:52 +0000 (07:36 -0400)]
Merge pull request #92 from joshtriplett/autogen
Re-add libtool-ldflags
Josh Triplett [Sun, 16 Mar 2014 11:35:12 +0000 (04:35 -0700)]
Re-add libtool-ldflags
Anthony Green [Sun, 16 Mar 2014 11:25:18 +0000 (07:25 -0400)]
Merge pull request #87 from joshtriplett/autogen
Remove autogenerated files from the repository
Josh Triplett [Sun, 16 Mar 2014 01:11:16 +0000 (18:11 -0700)]
Remove autogenerated files from the repository
Add an autogen.sh to regenerate them.
Anthony Green [Fri, 14 Mar 2014 20:54:31 +0000 (16:54 -0400)]
Ensure the linker supports @unwind sections in libffi.
Anthony Green [Fri, 14 Mar 2014 20:51:20 +0000 (16:51 -0400)]
Fix merge
Anthony Green [Fri, 14 Mar 2014 20:47:57 +0000 (16:47 -0400)]
Merge pull request #81 from rvandermeulen/bug-756740
Allow building for mipsel with Android NDK r8.
Ryan VanderMeulen [Mon, 10 Mar 2014 19:12:47 +0000 (15:12 -0400)]
Remove stray hunk that shouldn't have been included in this patch.
Ryan VanderMeulen [Mon, 10 Mar 2014 19:04:58 +0000 (15:04 -0400)]
Replace double quotes with single quotes in Makefile.in to improve compatibility between some versions of MSYS and gmake. From Mozilla bug 943728.
https://bugzilla.mozilla.org/show_bug.cgi?id=943728
Ryan VanderMeulen [Mon, 10 Mar 2014 18:53:48 +0000 (14:53 -0400)]
Ensure the linker supports @unwind sections in libffi. From Mozilla bug 756740.
https://bugzilla.mozilla.org/show_bug.cgi?id=778414
Also tracked as issue #42.
https://github.com/atgreen/libffi/issues/42
Ryan VanderMeulen [Mon, 10 Mar 2014 18:43:37 +0000 (14:43 -0400)]
Allow building for mipsel with Android NDK r8. From Mozilla bug 756740.
https://bugzilla.mozilla.org/show_bug.cgi?id=756740
Anthony Green [Sat, 1 Mar 2014 23:37:29 +0000 (18:37 -0500)]
Update Makefile for new darwin scripts
Anthony Green [Sat, 1 Mar 2014 23:34:18 +0000 (18:34 -0500)]
Add README note
Anthony Green [Fri, 28 Feb 2014 22:20:59 +0000 (17:20 -0500)]
Add missing -DFFI_DEBUG flag
Anthony Green [Fri, 28 Feb 2014 06:10:17 +0000 (01:10 -0500)]
Merge branch 'master' of github.com:/atgreen/libffi
Anthony Green [Fri, 28 Feb 2014 06:06:48 +0000 (01:06 -0500)]
Merge pull request #46 from makotokato/android-clang
Fix build failure when using clang for Android
Anthony Green [Fri, 28 Feb 2014 06:06:48 +0000 (01:06 -0500)]
Merge pull request #46 from makotokato/android-clang
Fix build failure when using clang for Android
Anthony Green [Fri, 28 Feb 2014 06:01:29 +0000 (01:01 -0500)]
Merge branch 'master' of github.com:/atgreen/libffi
Anthony Green [Fri, 28 Feb 2014 06:01:02 +0000 (01:01 -0500)]
Merge pull request #40 from wojdyr/master
Correct the -L flag in libffi.pc.in
Anthony Green [Fri, 28 Feb 2014 05:56:27 +0000 (00:56 -0500)]
Merge pull request #66 from ppizarro/master
BlackFin fixes - Fatal error when calling a function defined in a shared library from within the function called by FFI
Anthony Green [Fri, 28 Feb 2014 05:56:27 +0000 (00:56 -0500)]
Merge pull request #66 from ppizarro/master
BlackFin fixes - Fatal error when calling a function defined in a shared library from within the function called by FFI
Anthony Green [Fri, 28 Feb 2014 05:52:56 +0000 (00:52 -0500)]
Add ChangeLog entry for Josh's change
Anthony Green [Fri, 28 Feb 2014 05:50:25 +0000 (00:50 -0500)]
Merge pull request #75 from joshtriplett/longdouble
Fix build error on x86 without distinct long double
Anthony Green [Fri, 28 Feb 2014 05:38:41 +0000 (00:38 -0500)]
Rebuilt with new libtool
Anthony Green [Fri, 28 Feb 2014 05:26:57 +0000 (00:26 -0500)]
Merge branch 'master' of github.com:/atgreen/libffi
Conflicts:
ChangeLog
Anthony Green [Fri, 28 Feb 2014 05:23:04 +0000 (00:23 -0500)]
Fix spelling errors
Anthony Green [Fri, 28 Feb 2014 05:23:04 +0000 (00:23 -0500)]
Fix spelling errors
Anthony Green [Fri, 28 Feb 2014 05:20:17 +0000 (00:20 -0500)]
When no VFP arguments are present the IP register is used
uninitialized. Initialize it to the value of FP.
This fixes a number of testsuite failures when configured for
armv7l-unknown-linux-gnueabihf
Anthony Green [Fri, 28 Feb 2014 05:17:16 +0000 (00:17 -0500)]
aarch64 fix
Anthony Green [Thu, 27 Feb 2014 20:42:41 +0000 (15:42 -0500)]
Fix ChangeLog merge
Josh Triplett [Mon, 17 Feb 2014 19:20:33 +0000 (11:20 -0800)]
Fix build error on x86 without distinct long double
src/x86/ffi64.c: In function 'classify_argument':
src/x86/ffi64.c:205:5: error: duplicate case value
case FFI_TYPE_LONGDOUBLE:
^
src/x86/ffi64.c:202:5: error: previously used here
case FFI_TYPE_DOUBLE:
^
Anthony Green [Sat, 15 Feb 2014 13:06:29 +0000 (08:06 -0500)]
Merge pull request #72 from heiher/devel
MIPS N32: Fix call floating point va function
Anthony Green [Sat, 15 Feb 2014 13:06:11 +0000 (08:06 -0500)]
Merge pull request #68 from zeldin/master
Linux/ppc64: Remove assumption on contents of r11 in closure
Heiher [Tue, 21 Jan 2014 15:18:27 +0000 (23:18 +0800)]
Fix call floating point va function
I'm not sure floating-point arguments in GPR or FPR before calling
variable number arguments function. so, load all arguments to GPR and
FPR.
Zachary Waldowski [Wed, 5 Feb 2014 19:22:52 +0000 (14:22 -0500)]
AArch64: Fix void fall-through case when assertions are enabled
Zachary Waldowski [Tue, 21 Jan 2014 21:38:31 +0000 (16:38 -0500)]
AArch64: Fix missing semicolons when assertions are enabled
Anthony Green [Sun, 1 Dec 2013 01:58:31 +0000 (20:58 -0500)]
Remove build-ios from Makefile
Conflicts:
ChangeLog
Anthony Green [Sun, 1 Dec 2013 02:06:51 +0000 (21:06 -0500)]
Mention Aarch64 on iOS
Zachary Waldowski [Mon, 30 Dec 2013 22:36:39 +0000 (17:36 -0500)]
Update ChangeLog
Zachary Waldowski [Thu, 9 Jan 2014 18:50:17 +0000 (13:50 -0500)]
AArch64: Remove duplicitous element_count call.
This inhibits an analyzer warning by Clang.
Zachary Waldowski [Thu, 9 Jan 2014 18:53:30 +0000 (13:53 -0500)]
Darwin/aarch64: Respect iOS ABI re: stack argument alignment
Zachary Waldowski [Thu, 9 Jan 2014 19:03:29 +0000 (14:03 -0500)]
Darwin/aarch64: Fix size_t assumptions
Zachary Waldowski [Mon, 30 Dec 2013 21:14:02 +0000 (16:14 -0500)]
Darwin/aarch64: Fix "shadows declaration" warnings
Zachary Waldowski [Thu, 9 Jan 2014 18:55:21 +0000 (13:55 -0500)]
Darwin/aarch64: Use Clang cache invalidation builtin
Zachary Waldowski [Mon, 30 Dec 2013 20:45:51 +0000 (15:45 -0500)]
Darwin/aarch64: Account for long double being equal to double
Zachary Waldowski [Mon, 30 Dec 2013 21:33:47 +0000 (16:33 -0500)]
Darwin/aarch64: Use CNAME, restrict .size like ARM
Zachary Waldowski [Mon, 30 Dec 2013 22:48:22 +0000 (17:48 -0500)]
Darwin/aarch64: Fix invalid reference in assembly
Zachary Waldowski [Mon, 30 Dec 2013 21:23:21 +0000 (16:23 -0500)]
Darwin/x86_64: Fix 64-bit type shortening warnings
Zachary Waldowski [Thu, 9 Jan 2014 18:15:06 +0000 (13:15 -0500)]
Darwin: Merge build scripts, redo project, incl. arm64
Zachary Waldowski [Mon, 30 Dec 2013 22:48:10 +0000 (17:48 -0500)]
Darwin/iOS: Improve unified syntax use for LLVM
Zachary Waldowski [Mon, 30 Dec 2013 20:27:44 +0000 (15:27 -0500)]
Fix dlmalloc warnings due to set_segment_flags, sizeof(size_t)
Zachary Waldowski [Mon, 30 Dec 2013 20:27:14 +0000 (15:27 -0500)]
Darwin/iOS: Fix mis-typing of vfp_reg_free
Zachary Waldowski [Mon, 30 Dec 2013 20:26:20 +0000 (15:26 -0500)]
Darwin/ARM: Assert on NULL dereference
This inhibits an analyzer warning by Clang on all platforms.
Zachary Waldowski [Thu, 9 Jan 2014 18:42:08 +0000 (13:42 -0500)]
Darwin/i386: Inhibit Clang previous prototype warnings
Zachary Waldowski [Thu, 9 Jan 2014 18:41:45 +0000 (13:41 -0500)]
Darwin/ARM: Inhibit Clang previous prototype warnings
Zachary Waldowski [Thu, 9 Jan 2014 18:41:27 +0000 (13:41 -0500)]
Darwin/AArch64: Inhibit Clang previous prototype warnings
Marcus Comstedt [Sat, 4 Jan 2014 18:00:08 +0000 (19:00 +0100)]
Linux/ppc64: Remove assumption on contents of r11 in closure
Paulo Pizarro [Thu, 2 Jan 2014 18:17:59 +0000 (16:17 -0200)]
When the function called by the ffi called a function defined in a shared library generate a fatal error
The correction was to take into consideration the GOT.
Anthony Green [Thu, 5 Dec 2013 21:23:25 +0000 (16:23 -0500)]
Undo iOS ARM64 changes.
Anthony Green [Sun, 1 Dec 2013 03:38:13 +0000 (22:38 -0500)]
Merge branch 'master' of github.com:/atgreen/libffi
Anthony Green [Sun, 1 Dec 2013 02:06:51 +0000 (21:06 -0500)]
Mention Aarch64 on iOS
Anthony Green [Sun, 1 Dec 2013 02:06:51 +0000 (21:06 -0500)]
Mention Aarch64 on iOS
Anthony Green [Sun, 1 Dec 2013 01:58:31 +0000 (20:58 -0500)]
Remove build-ios from Makefile
Anthony Green [Sun, 1 Dec 2013 01:54:54 +0000 (20:54 -0500)]
Merge branch 'master' of github.com:/atgreen/libffi
Add ChangeLog entry.