Commit Graph

940 Commits

Author SHA1 Message Date
Tom Tromey
38a4d72c95 add ffi_get_struct_offsets 2016-02-22 16:07:55 -07:00
Anthony Green
f2f234aef2 Merge pull request #190 from havardgraff/master
Add configure-option to disable building docs
2016-02-20 06:50:29 -05:00
Anthony Green
49b95edafd Merge pull request #194 from amodra/master
Correct powerpc sysv stack argument accounting
2016-02-20 06:49:40 -05:00
Anthony Green
415723b40b Merge pull request #104 from joshtriplett/efi64
Support the Windows/EFI calling convention on all x86-64 targets
2016-02-20 06:49:19 -05:00
Anthony Green
7c27fcbe09 Merge pull request #199 from Pan7/master
Fix configuring msvc compiler
2016-02-20 06:45:00 -05:00
Anthony Green
69143d06c6 Merge pull request #197 from foxsen/mips_go_closure
Mips go closure support
2016-02-20 06:44:28 -05:00
Anthony Green
755f1e642d Merge pull request #193 from rth7680/fix-70
Test case from issue #70
2016-02-20 06:43:48 -05:00
Anthony Green
183ee6a672 Merge pull request #206 from edolnx/master
Add configure flag to disable multi-os-directory support
2016-02-20 06:43:28 -05:00
Anthony Green
0bb71b52f5 Merge pull request #211 from tromey/move-prep-types-out-of-ffi.h
ffi_prep_types is internal-only
2016-02-20 06:41:10 -05:00
Anthony Green
296a283a46 Merge pull request #213 from tromey/remove-FFI_TYPE
remove FFI_TYPE typedef
2016-02-20 06:40:21 -05:00
Anthony Green
e7c713a0b6 Merge pull request #214 from tromey/document-enum-support
document (lack of) enum handling in libffi
2016-02-20 06:40:03 -05:00
Anthony Green
79666abca8 Merge pull request #205 from filbranden/tool_opts
Fix dejagnu test support for --tool_opts
2016-02-20 06:38:40 -05:00
Anthony Green
20c7c31ca0 Merge pull request #225 from ehsan/safeseh
Don't clobber safeseh for msvcc.sh -clang-cl in 32-bit mode
2016-02-20 06:38:01 -05:00
Filipe Brandenburger
89b760503e Fix dejagnu test support for --tool_opts
Right now it concatenates it with the existing options and then appends
it to that list, fix it to simply append it as is, same as it is done
with the other variables.

Tested by running the following command which includes gcc options:
  $ make check RUNTESTFLAGS="--tool_opts '-Werror'"

Without this patch, all the tests fail. With it, the test succeed.
Inspecting the logs shows that -Werror was indeed used when compiling
the test sources.
2016-02-03 13:37:39 -08:00
Ehsan Akhgari
9c14cbfc7f Don't clobber safeseh for msvcc.sh -clang-cl in 32-bit mode
The commit fb25cd0 went a bit too far and removed safeseh
when -clang-cl was passed, but that's only needed in x86-64
which is already handled by the -m64 flag.

I discovered this when building Firefox x86 with clang-cl.
2016-01-28 16:57:18 -05:00
Anthony Green
6ba2a49e22 Merge pull request #222 from freakboy3742/t181
Fixed #181 -- Corrected problems with ARMv7 build under iOS.
2016-01-02 20:03:41 -05:00
Anthony Green
8005600a92 Merge pull request #224 from plicease/travis
update apt-get in travis
2016-01-02 16:44:29 -05:00
Graham Ollis
5e2b18a65d update apt-get in travis 2016-01-02 07:56:05 -05:00
Russell Keith-Magee
6a3a6acd9f Merge branch 'master' into t181 2015-12-21 00:37:37 +08:00
Russell Keith-Magee
bc4fc07aa5 Fixed #181 -- Corrected problems with ARMv7 build under iOS.
Based on a patch from @fealebenpae, with input from @SolaWing and @rth7680,
and testing from @superdump.
2015-12-21 00:37:06 +08:00
Anthony Green
70594f7f8d Merge pull request #221 from tromey/document-closure-ffi_arg
Document closure ffi arg
2015-12-18 10:24:38 -05:00
Tom Tromey
6affad7911 correctly document closure return promotion 2015-12-17 16:59:11 -07:00
Tom Tromey
8a7cdeb041 fix formatting of ffi_prep_closure_loc arguments 2015-12-17 16:58:23 -07:00
Tom Tromey
f45e9e3570 document (lack of) enum handling in libffi 2015-11-19 15:21:14 -07:00
Tom Tromey
4805bf9ccd remove FFI_TYPE typedef 2015-11-19 14:17:42 -07:00
Tom Tromey
8bec5ca26a ffi_prep_types is internal-only 2015-11-15 10:51:14 -07:00
Anthony Green
88deacdd42 speling fix 2015-11-15 08:39:17 -05:00
Anthony Green
5973dca595 Merge pull request #209 from tromey/documentation-updates
documentation fixes
2015-11-15 08:36:48 -05:00
Anthony Green
2a988c4455 Merge pull request #207 from tromey/deprecate-ffi-prep-closure
mark ffi_prep_closure as deprecated
2015-11-15 08:33:46 -05:00
Tom Tromey
473bcbcad3 documentation fixes
Fixes #78.  Documentation for #33 and #35, but no fix.
2015-11-10 16:14:02 -07:00
Tom Tromey
ff33ddd1ab mark ffi_prep_closure as deprecated 2015-11-07 12:04:24 -07:00
Carl Perry
877ea9bf9a Add configure flag to disable multi-os-directory support
In some environments, installing the library to GCC's
multi-os-directory is not perferable. This patch adds a switch
to configure "--disable-multi-os-directory" which will disable
that check, typically falling back to ${libdir} unless
cross-compiling.

Original patch was written by Stewart Brodie, and was found at
https://sourceware.org/ml/libffi-discuss/2013/msg00144.html

I've just updated it to work with the current version.
2015-10-29 22:50:42 -05:00
Richard Henderson
4cdedc279f Tidy call.exp test collection
Commit c952a92e20 moved all of
the complex tests to libffi.complex, but failed to remove the
anti-globbing from libffi.call.
2015-10-20 07:16:10 -10:00
Richard Henderson
609db2fbe4 Test case from Issue #70 2015-10-20 07:16:10 -10:00
Anthony Green
e9de7e35f2 Merge pull request #202 from tromey/note-prep-cif-var-usage
document that there must be ntotalargs types
2015-10-11 10:54:50 -04:00
Anthony Green
d19b6cc78e Merge pull request #201 from tromey/fix-texinfo-buglet
Add missing "@" to @var{}
2015-10-11 10:54:22 -04:00
Tom Tromey
0ebde2d24a document that there must be ntotalargs types 2015-10-06 11:42:43 -06:00
Tom Tromey
36f3fb9141 Add missing "@" to @var{} 2015-10-05 10:20:05 -06:00
Pan7
e061243958 Fix configuring msvc compiler 2015-09-14 08:25:09 +02:00
Zhang Fuxin
505346e18f fix type error in unwind code 2015-08-26 09:57:10 +08:00
foxsen
5953c66bd7 add unwind infor for *go_closure;
reorder the labels to make thing more clear
2015-08-20 20:28:13 +08:00
Zhang Fuxin
f0ecd5d403 fix O32 stack unwind code
add missing 1: label
2015-08-11 12:47:36 +08:00
foxsen
6f0201c803 various fixes for go closure support. Now all n64 tests passed. 2015-08-04 18:25:34 +08:00
foxsen
697dd4e8a0 add support for go closure support on mips 2015-08-04 12:53:33 +08:00
Alan Modra
43fc5bca48 Correct powerpc sysv stack argument accounting
ppc32 starts using the stack for integer arg passing when we run out
of integer arg passing registers.  Similarly, we start using the stack
for floating point args when we run out of floating point registers.
The decision on where an integer arg goes does not depend on number of
floating point args, nor does the decision on where a floating point
arg goes depend on number of integer args.  Alignment of stack args
also simply depends on number of stack args.

This patch untangles the horrible mess we had, with intarg_count being
wrongly used to count both integer args and stack words.

	* src/powerpc/ffi_sysv.c (ffi_prep_cif_sysv_core): Count fprs,
	gprs, and stack words separately.
	(ffi_prep_args_SYSV): Similarly.
2015-08-03 23:34:05 +09:30
Josh Triplett
1f6b5a91f4 Support the WIN64/EFI64 calling convention on all X86_64 platforms
Add a new calling convention FFI_EFI64, alias FFI_WIN64, on all X86_64
platforms.  This allows libffi compiled on a 64-bit x86 platform to call
EFI functions.

Compile in ffiw64.c and win64.S on all X86_64 platforms.  When compiled
for a platform other than X86_WIN64, ffiw64.c suffixes its functions
with _efi64, to avoid conflict with the platform's actual
implementations of those functions.
2015-07-26 17:18:16 -07:00
Josh Triplett
6de51f3e04 src/x86/ffiw64.c: Don't assign a "char *" to an "unsigned char *"
Declare a local variable to match the type of the struct field assigned
to it, rather than adding unsigned to the type.  Fixes a -Wpointer-sign
warning.
2015-07-26 17:18:16 -07:00
Josh Triplett
eaa59755fc src/x86/win64.S: Handle name mangling and PIC
Move the macros from unix64.S into a shared header asmnames.h and use
them in win64.S too.
2015-07-26 17:18:16 -07:00
Josh Triplett
c8e82d9fbf src/x86/win64.S: Support compiling on non-WIN64 platforms
Non-WIN64 versions of the GNU assembler don't support the .seh_*
directives for structured exception handling, so wrap them in a macro
that compiles to nothing.

Handle the registers used for the non-Windows x86-64 calling convention
when on a non-Windows platform.  Distinguish between cases that should
refer to the native argument registers (defined as arg0, arg1, arg2, and
arg3) and cases that should always refer to the Windows argument
registers.
2015-07-26 16:18:57 -07:00
Havard Graff
fa7a257113 Add configure-option to disable building docs 2015-05-12 10:45:13 +02:00