Commit Graph

1015 Commits

Author SHA1 Message Date
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
Russell Keith-Magee
e3d2812ce4 Modified arm/sysv.S to remove directives not allowed by clang. 2015-04-25 19:03:03 +08:00
Anthony Green
17ffc3655a Merge pull request #185 from freakboy3742/t184
Fixed #184 -- Corrected source file references in Darwin source generator tool.
2015-03-29 21:38:26 -04:00
Anthony Green
173757ce97 Merge pull request #186 from freakboy3742/gitignore
Added generated source file to .gitignore.
2015-03-29 21:38:12 -04:00
Russell Keith-Magee
dd9e4c8d46 Added generated source file to .gitignore. 2015-03-13 08:03:13 +08:00
Russell Keith-Magee
a5b3eaa279 Fixed #184 -- Corrected file references in Darwin source generator tool. 2015-03-13 07:59:11 +08:00
Anthony Green
f5ec6279a4 Merge pull request #178 from rth7680/aa64-ilp32
aarch64: Handle ILP32 ABI
2015-03-04 13:58:04 -05:00
Andrew Pinski
95df379193 aarch64: Handle ILP32 ABI 2015-02-11 08:31:48 -08:00
Anthony Green
06747d3187 Merge pull request #176 from 0-wiz-0/master
Handle NetBSD/powerpc the same as FreeBSD and OpenBSD.
2015-01-29 07:22:23 -05:00
Thomas Klausner
6c5357757f Handle NetBSD/powerpc the same as FreeBSD and OpenBSD.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
2015-01-29 12:32:28 +01:00
Anthony Green
db1b34b7e1 Remove incomplete sentence 2015-01-28 18:08:06 -05:00
Anthony Green
56036a6b58 Merge pull request #175 from rth7680/sparc
sparc: Re-introduce hand-written unwind info
2015-01-28 18:03:57 -05:00
Anthony Green
035715b333 Merge pull request #174 from rth7680/fbsd
configure: Run HAVE_AS_X86_PCREL for all X86 targets
2015-01-28 18:03:06 -05:00
Richard Henderson
2104b2a4fc sparc: Re-introduce hand-written unwind info
Fixes the build with the Solaris assembler.
2015-01-28 09:41:07 -08:00
Richard Henderson
b0e9796344 configure: Run HAVE_AS_X86_PCREL for all X86 targets 2015-01-27 22:10:12 -08:00
Anthony Green
31a6185307 Merge pull request #170 from fealebenpae/aarch64-trampoline-table
Support closures on ARM64 iOS
2015-01-21 05:55:47 -05:00
Anthony Green
d6675c16cc Merge pull request #172 from rth7680/fixes
x86: Fix cygwin32 build
2015-01-21 05:53:21 -05:00
Richard Henderson
3ac1610aa3 x86: Fix cygwin32 build
The section syntax is just that little bit different.
2015-01-19 20:48:40 +01:00
Anthony Green
a25a46a7fe Merge pull request #171 from rth7680/fixes
Fixes from mainline gcc
2015-01-16 17:32:07 -05:00
Richard Henderson
1ad0b17177 sparc: Also mark the return address in unwind info 2015-01-16 13:30:05 -08:00
Richard Henderson
d68c8aed19 sparc: Solaris fixes, part 2
/bin/as seems to only understand single-digit labels
/bin/as knows nothing about .rept/.endr
2015-01-16 11:40:33 -08:00
Rainer Orth
b740ab7cc9 sparc: Solaris fixes
* /bin/as requires .type fn,#function instead of @function.
* /bin/as doesn't support .macro/.endm.  I'm using preprocessor macros
  instead to implement E in src/sparc/v[89].S.
2015-01-16 11:32:23 -08:00
Rainer Orth
f1560b7bbe x86: Solaris fixes
* Solaris/x86 /bin/as doesn't support .org, so I've just disabled the
  uses in src/x86/{sysv, unix64}.S, as on Darwin.
* Solaris/x86 needs to use EH_FRAME_FLAGS so manually and compiler
  generated .eh_frame sections match, otherwise libffi.so fails to link:
* Solaris/x86 /bin/as has different COMDAT syntax; I've disabled it for
  the moment.
2015-01-16 11:32:11 -08:00
Yavor Georgiev
536366349c aarch64: implement the trampoline table workaround for ffi closures on Apple systems
This is a direct copy/paste port of the ARM code, with changes because of Aarch64 pc-relative addressing restrictions.
2015-01-16 15:31:55 +02:00
Yavor Georgiev
05e65b4e20 aarch64: rewrite range syntax into list to appease Clang
Clang's assembler in Xcode 6 appears to choke when the operand of st4 is a range, but is happy with a list.
2015-01-16 15:31:02 +02:00
Anthony Green
5cd411ad5d New test case for old aarch64 bug 2015-01-13 15:44:03 -05:00