diff options
author | Alan Modra <amodra@gmail.com> | 2013-11-21 06:12:35 -0500 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2013-11-21 06:12:35 -0500 |
commit | ac7536889334d4be50709006d7e23536364d7891 (patch) | |
tree | f829dbf38044afa4e7a95a1ab9f952c1e9b06af1 /include | |
parent | 69df91cfb4fa6bcb644350a80bff970f27478a6a (diff) | |
download | libffi-ac7536889334d4be50709006d7e23536364d7891.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.in | 1 | ||||
-rw-r--r-- | include/ffi.h.in | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/Makefile.in b/include/Makefile.in index ddd28fa..0d0a8dc 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -205,6 +205,7 @@ FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@ FGREP = @FGREP@ GREP = @GREP@ HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ +HAVE_LONG_DOUBLE_VARIANT = @HAVE_LONG_DOUBLE_VARIANT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/include/ffi.h.in b/include/ffi.h.in index a51583b..93c776f 100644 --- a/include/ffi.h.in +++ b/include/ffi.h.in @@ -221,6 +221,11 @@ typedef struct { #endif } ffi_cif; +#if HAVE_LONG_DOUBLE_VARIANT +/* Used to adjust size/alignment of ffi types. */ +void ffi_prep_types (ffi_abi abi); +# endif + /* Used internally, but overridden by some architectures */ ffi_status ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi, |