Commit Graph

82 Commits

Author SHA1 Message Date
Yen Chi Hsuan
982b89c01a Install public headers in the standard path 2016-11-13 19:20:53 +08:00
Tom Tromey
b50eabf489 minor comment cleanup
This patch minor cleans up ffi.h.in comments in a minor way.  It fixes
some typos and capitalizations, adds some periods, and reformats some
comments to a more GNU-ish style.  It also fixes up some stale
documentation.
2016-05-04 06:39:21 -10:00
Tom Tromey
6c07077a61 Change ffi.h.in so that braces match
This is a tiny refactoring to make it so brace-matching works in
Emacs.
2016-05-04 06:38:34 -10:00
Tom Tromey
2fbc0369b8 move ffi_prep_cif_core to ffi_common.h 2016-05-04 06:38:34 -10:00
Tom Tromey
38a4d72c95 add ffi_get_struct_offsets 2016-02-22 16:07:55 -07: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
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
Tom Tromey
ff33ddd1ab mark ffi_prep_closure as deprecated 2015-11-07 12:04:24 -07:00
Richard Henderson
5d69d57a05 configure: Move target source selection into configure.host
This eliminates the AM_CONDITIONAL ugliness, which eliminates
just a bit of extra boilerplate for a new target.

At the same time, properly categorize the EXTRA_DIST files
into SOURCES and HEADERS, for the generation of ctags.
2014-11-14 13:06:12 +01:00
Richard Henderson
89bbde8b4e Add ffi_cfi.h
Have one copy of the HAVE_AS_CFI_PSEUDO_OP code
to share between all backends.
2014-11-12 09:15:35 +01:00
Richard Henderson
e951d64c08 Add entry points for interacting with Go
A "ffi_go_closure" is intended to be compatible with the
function descriptors used by Go, and ffi_call_go sets up
the static chain parameter for calling a Go function.

The entry points are disabled when a backend has not been
updated, much like we do for "normal" closures.
2014-11-12 09:15:35 +01:00
Dominik Vogt
6e8a446083 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.
2014-09-20 06:24:41 -04:00
Ehsan Akhgari
fb25cd08ed Add support for building with clang-cl 2014-06-12 20:42:18 -04:00
Ryan Hill
cbc5a3c020 Fix typo 2014-05-31 08:26:34 -04:00
Josh Triplett
35634dbcea Remove autogenerated files from the repository
Add an autogen.sh to regenerate them.
2014-03-16 04:24:12 -07:00
Anthony Green
3dc3f32c35 Undo iOS ARM64 changes. 2013-12-05 16:23:25 -05:00
Zachary Waldowski
cb719a5c1c Darwin/iOS: Fix LLVM 3.3 warning re: memcpy. 2013-11-30 04:09:18 -05:00
Alan Modra
ac75368893 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.
2013-11-21 06:12:35 -05:00
Anthony Green
8af42f9944 Respect HAVE_ALLOCA_H 2013-11-13 16:40:28 -05:00
Anthony Green
d2fcbcdfbe Add m88k and VAX support. Update some configury bits. 2013-10-08 06:27:46 -04:00
Anthony Green
6a028caec1 Don't use GCCisms to define types when
+       building with the SUNPRO compiler.
2013-01-10 01:19:43 -05:00
Anthony Green
4394096da0 missed trampoline_table patch. Move to GCC. 2013-01-02 08:51:35 -05:00
Anthony Green
ed7a59c3ff Windows symbol export fix. Move to GCC. 2013-01-02 08:48:01 -05:00
Anthony Green
8bad679ade New stand-alone patch 2013-01-02 08:28:35 -05:00
Anthony Green
981c32ee11 Merge with GCC. Eliminate quilt bits. 2013-01-02 07:34:03 -05:00
Anthony Green
69da33a076 Pull in config.sub for aarch64 support and more 2012-11-12 15:25:47 -05:00
Anthony Green
f680b598b7 Add missing aarch64 configury bits 2012-11-06 16:00:40 -05:00
Anthony Green
6993a6686f Fix autoconf macros 2012-10-30 06:59:32 -04:00
Anthony Green
048d2f41c3 Rebase 2012-10-11 10:55:25 -04:00
Anthony Green
213ed15c70 Add blackfin supprt from Alexandre Keunecke. 2012-04-27 01:34:15 -04:00
Zachary Waldowski
39dccddb60 Fix building with Clang for Darwin (OS X 10.6+ and iOS
4.0+)
2012-04-05 12:32:41 -04:00
Peter Rosin
0a1ab12a8d Various MSVC-related changes. 2012-03-30 08:14:08 -04:00
Anthony Green
84d3253f86 Rebase post GCC merge 2012-03-19 23:07:35 -04:00
Anthony Green
d578b89619 Fix ABI check regression 2012-02-15 00:18:18 -05:00
Anthony Green
4130e1972d Refresh autoconf-archive m4 scripts 2012-02-03 13:18:27 -06:00
Anthony Green
1ff9c604bb Rebase from GCC 2012-02-01 16:34:30 -06:00
Anthony Green
8efc0b1f40 Unlikely fixes 2012-01-23 13:47:38 -05:00
Anthony Green
c365ee7577 Refresh 2012-01-23 11:13:18 -05:00
Anthony Green
95f31151ec Rerun automake 2011-11-12 23:46:05 -05:00
Anthony Green
ff9454da44 Add David Gilbert's variadic function call support 2011-11-12 17:18:51 -05:00
Anthony Green
3d56106b07 Rebase 2011-11-12 07:20:24 -05:00
Anthony Green
8c01954c50 Build assembly files with debug info 2011-09-06 14:26:32 -04:00
Anthony Green
ee6696fdf4 3.0.11-rc1. soname bump. 2011-08-23 12:30:29 -04:00
Anthony Green
c6265c36a9 Version 3.0.10 2011-08-23 10:31:33 -04:00
Anthony Green
cc5e41bf32 Fix use of autoconf macros 2011-08-22 16:34:24 -04:00
Anthony Green
049d8386ff Many new patches 2011-08-22 14:50:10 -04:00
Anthony Green
d992ac54a2 Refresh from GCC 2011-07-29 17:32:53 -04:00
Anthony Green
09f8f310f4 More AIX fixes. rc9. 2011-02-28 15:36:07 -05:00
Landon Fuller
3000dc237f Merge remote branch 'upstream/master' 2011-02-13 08:55:53 -05:00