|
032b3cd6
|
2020-10-27T07:06:21
|
|
Support building x86 and arm64 without FFI_GO_CLOSURES (#586)
* x86: Support building without FFI_GO_CLOSURES
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* arm: Support building without FFI_GO_CLOSURES
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
c78fcf88
|
2020-10-27T07:02:36
|
|
Removing unnecessary instruction from ffi_call_unix64 (#588)
unix64.S's `ffi_call_unix64` looks like it used to take six parameters,
where the sixth said the number of SSE register arguments. However,
currently the function only takes five parameters, and the number of SSE
register arguments is encoded in the `struct register_args *` passed as
the first parameter to `ffi_call_unix64`. This change removes an
instruction that tries to use this missing sixth parameter as the number
of SSE arguments.
This fix should not change any behavior, nor fix any bugs, because a few
instructions later the value moved from %r9d into %eax is overwritten by
the correct value anyway. This change merely makes the code a tad less
confusing, because currently the assembly moves from a register (r9)
whose value is never set.
|
|
407394c0
|
2020-10-11T15:07:40
|
|
docs: fix simple typo, paramters -> parameters (#589)
There is a small typo in src/x86/ffi.c.
Should read `parameters` rather than `paramters`.
|
|
d9abffea
|
2020-02-22T06:32:22
|
|
x86: Fix ffi_prep_closure_loc (#542)
Since FFI_TRAMPOLINE_SIZE is increased by 4 bytes to add ENDBR32, adjust
jump displacement by 4 bytes.
|
|
78556561
|
2020-02-21T19:08:06
|
|
x86: Add indirect branch tracking support (#540)
Intel Control-flow Enforcement Technology (CET):
https://software.intel.com/en-us/articles/intel-sdm
contains shadow stack (SHSTK) and indirect branch tracking (IBT). When
CET is enabled, ELF object files must be marked with .note.gnu.property
section. When Intel CET is enabled, include <cet.h> in assembly codes
to mark Intel CET support.
Also when IBT is enabled, all indirect branch targets must start with
ENDBR instruction and notrack prefix can be used to disable IBT on
indirect branch. <cet.h> defines _CET_ENDBR which can be used in
assembly codes for ENDBR instruction. If <cet.h> isn't included,
define _CET_ENDBR as empty so that _CET_ENDBR can be used in assembly
codes.
Trampoline must be enlarged to add ENDBR instruction unconditionally,
which is NOP on non-CET processors. This is required regardless if
libffi is enabled with CET since libffi.so will be marked in legacy
bitmap, but trampoline won't. Update library version for larger
FFI_TRAMPOLINE_SIZE.
This fixed:
https://github.com/libffi/libffi/issues/474
Tested with
$ CC="gcc -Wl,-z,cet-report=error -fcf-protection" CXX="g++ -Wl,-z,cet-report=error -fcf-protection" .../configure
on Linux CET machines in i686, x32 and x86-64 modes.
|
|
a8efc2f7
|
2019-10-26T14:57:05
|
|
Fix FFI_STDCALL ABI (#514)
Even for a stdcall function, the stack alignment is still the
responsibility of the caller. Remember the original, not stack-aligned
argument size, but align when setting up a stack frame. In
ffi_closure_inner, return the true argument size, so that
ffi_[go_]closure_STDCALL doesn't adjust too much.
|
|
c4f61240
|
2019-10-09T18:59:32
|
|
Add long double test (#492)
Required to fix build error on macos with gcc-9
|
|
06bf1a9d
|
2019-04-28T03:21:44
|
|
fix x86/x64 MSVC build (#487)
|
|
05a17964
|
2019-02-19T04:11:28
|
|
Cleanup symbol exports on darwin and add architecture preprocessor checks to assist in building fat binaries (eg: i386+x86_64 on macOS or arm+aarch64 on iOS) (#450)
* x86: Ensure _efi64 suffixed symbols are not exported
* x86: Ensure we do not export ffi_prep_cif_machdep
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* x86: Ensure we don't export ffi_call_win64, ffi_closure_win64, or ffi_go_closure_win64
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* closures: Silence a semantic warning
libffi/src/closures.c:175:23: This function declaration is not a prototype
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* aarch64: Ensure we don't export ffi_prep_cif_machdep
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* arm: Ensure we don't export ffi_prep_cif_machdep
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* aarch64, arm, x86: Add architecture preprocessor checks to support easier fat builds (eg: iOS)
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* x86: Silence some static analysis warnings
libffi/src/x86/ffi64.c:286:21: The left operand of '!=' is a garbage value due to array index out of bounds
libffi/src/x86/ffi64.c:297:22: The left operand of '!=' is a garbage value due to array index out of bounds
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* aarch: Use FFI_HIDDEN rather than .hidden
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* ffi.h: Don't advertise ffi_java_rvalue_to_raw, ffi_prep_java_raw_closure, and ffi_prep_java_raw_closure_loc when FFI_NATIVE_RAW_API is 0
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
e1118af5
|
2019-02-19T03:58:25
|
|
changes for win32 on windows (#468)
|
|
ba73a671
|
2018-07-20T09:37:43
|
|
Update FFI_HIDDEN() to use .private_extern on Apple platforms and use the macro where appropriate
Fix issue #439
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
|
|
65da63ab
|
2018-06-25T04:38:58
|
|
Add compact unwind for darwin/i386 (#440)
* x86: Add implementation of compact unwind for ffi_call_i386, et al.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* x86: Use __text as the section name to avoid deprecated section name warnings.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* darwin: Add missing regular,debug attributes for compact unwind sections
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
|
|
2309b584
|
2018-06-17T17:04:24
|
|
Mark sysv.S as SafeSEH compatible (#438)
It contains no exception handler, so we can just emit the special
@feat.00 symbol to indicate that it's trivially SafeSEH compatible.
SafeSEH only applies to x86 and not x86-64, hence its inclusion in the
x86-specific block. See [1] for details.
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx#the_.sxdata_section_
|
|
1d704051
|
2018-06-17T17:01:50
|
|
i386: Fix missing break; in case statement leading to incorrectly returned FFI_BAD_ABI (#437)
* i386: Add missing break triggering dead store static analyzer checks.
Register calling sequence is being reported as bad ABI instead of working as intended.
Found-by: Clang Static Analysis
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* Mark ffi arm sysv entry points as private_extern.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* x86_64: Add implementation of compact unwind for ffi_call_unix64.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
b55baf0b
|
2018-05-09T13:21:02
|
|
Handle FFI_GNUW64 on non-Windows systems (EFI)
|
|
b5ee3957
|
2018-05-05T07:41:53
|
|
Revert "Remove some symbol exports and cleanup newline warnings (#433)"
This reverts commit a5a0f3cf36dfb4d64316414a872288c3170e6c1d.
|
|
a5a0f3cf
|
2018-05-05T03:44:33
|
|
Remove some symbol exports and cleanup newline warnings (#433)
* build: Ensure darwin generated sources end with a new line
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
* build: Use .private_extern where missing to prevent exporting symbols that are not API
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
|
|
d3c54cf3
|
2018-05-02T06:19:58
|
|
Re-enable msabi testing (#436)
* Revert "disable msabi testing for now"
This reverts commit 7b7638eb0eac2adfa72f7ec9f254ba287c9947e2.
* x86: Correct testing for 64-bit x86-64
Since passing -m32 to x86-64 compiler will generate i386 code, we
need to check both __ILP32__ and __i386__ for 64-bit x86-64.
* x86: Check __i386__ instead of i?86-*-* targets
Since passing -m32 to x86-64 compiler will generate i386 code, we need
to check __i386__ instead of i?86-*-* targets for i386 targets.
* i386: Properly passing integer parameters in registers
For thiscall and fastcall, if the paramter passed as 64-bit integer or
struct, all following integer paramters will be passed on stack.
* test: Add ABI_ATTR to callback_code
Add ABI_ATTR to callback_code to properly test different ABIs.
|
|
4c2206ac
|
2018-04-28T04:46:10
|
|
Fix two "return" issues in x86/ffi64.c (#431)
Issue #70 pointed out that at least one compiler didn't like:
return ffi_call_efi64(cif, fn, rvalue, avalue);
... where the return type is "void". This patch splits the statement
into two.
I also noticed that ffi_call_go here seems to do a double call. I
suspect a "return" is missing here, so this patch adds it as well.
|
|
369ef49f
|
2018-03-18T12:53:42
|
|
Add missing FFI_GNUW64 enum
|
|
43980dd1
|
2018-03-18T12:32:10
|
|
Add FFI_GNUW64 ABI for GNU 80-bit long double support
|
|
9bc40d87
|
2018-03-18T12:32:10
|
|
Add FFI_GWIN64 ABI for GNU 80-bit long double support
|
|
28d3b61b
|
2018-01-20T23:56:17
|
|
Fix x86 SysV closure in PIC mode
The assembly single-line comments swallowed up the remaining assembly
code of the macros due to lack of line-endings.
This is a regression introduced in b7f6d7a.
|
|
d15581c6
|
2017-12-01T00:34:30
|
|
Updating calls to ffi_closure_unix64_inner and ffi_closure_win64_inner to use PLT. Without this fix, statically linking libffi causes the linker error i.e. 'requires dynamic R_X86_64_PC32 reloc against ffi_closure_unix64_inner which may overflow at runtime; recompile with -fPIC)'
|
|
dc2ff5ba
|
2017-10-25T13:11:40
|
|
Merge pull request #323 from compnerd/x86-alloca-alignment
x86: align alloca to 16-byte boundary
|
|
927da716
|
2017-10-25T13:05:53
|
|
Merge pull request #379 from jlj/master
Xcode build improvements
|
|
9d9d92b4
|
2017-10-25T04:59:31
|
|
Skip WIN64/EFI64 support for x32
Since x32 doesn't support WIN64/EFI64, skip it if __ILP32__ is defined.
|
|
181fc4cc
|
2017-10-23T15:02:29
|
|
Merge branch 'master' based on ksjogo/libffi
Added a tvOS target in Xcode project. Misc Xcode project cleanup.
Fix macOS build target in Xcode project.
# Conflicts:
# src/aarch64/ffi.c
# src/x86/ffi64.c
|
|
79d1509c
|
2017-10-10T11:39:45
|
|
x86: align alloca to 16-byte boundary
Align the stack allocation to a 16-byte boundary. This ensures that the
stack parameters are 16-byte aligned which is needed for some
instructions.
|
|
a78da739
|
2017-09-04T15:55:34
|
|
Fix macOS build target in Xcode project.
- Add missing files for desktop platforms in generate-darwin-source-and-headers.py, and in the Xcode project.
- Add a static library target for macOS.
- Fix "implicit conversion loses integer precision" warnings for iOS mad macOS targets.
|
|
9c12209d
|
2017-08-03T10:46:28
|
|
Fix misaligned memory access in ffi_call_int
|
|
bd72848c
|
2017-04-27T13:20:36
|
|
Prefix ALIGN macros with FFI_
|
|
a94c999b
|
2017-03-19T07:36:07
|
|
Handle fastcall declaration differently for some Microsoft compilers
|
|
1e0d107b
|
2017-01-08T20:12:59
|
|
Modify configure.host to detect compilation with Microsoft Visual C++ and use assembly with Intel syntax in that case
|
|
794a54d4
|
2016-06-05T14:57:00
|
|
Mark win64.S with GNU-stack note
|
|
92810b4b
|
2016-05-26T08:56:51
|
|
[Darwin-x86, build] Fix up label prefixes, remove .purgem
Darwin uses a label prefix of _.
cctools assembler will not accept .purgem as a directive.
|
|
4a677a42
|
2016-03-05T09:58:38
|
|
Fix -Wsign-compare warnings in x86/ffi64.c
This was originally reported on the Python tracker:
httpa://bugs.python.org/issue23958
The original patch was written by Steve R. Hastings.
I've updated it to current master of libffi.
|
|
e5843a3a
|
2016-04-15T16:10:08
|
|
x86: Fix calling convention for ffi_closure_win64_inner
Also enable testing for the cross-abi calls.
|
|
d0675197
|
2016-03-07T12:14:22
|
|
x86: Copy fix for clang .org from unix64.S
Clang doesn't understand .org with symbolic operands.
|
|
1f6b5a91
|
2015-07-26T16:27:34
|
|
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.
|
|
6de51f3e
|
2015-07-26T16:23:55
|
|
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.
|
|
eaa59755
|
2015-07-26T17:17:16
|
|
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.
|
|
c8e82d9f
|
2015-07-26T16:18:57
|
|
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.
|
|
3ac1610a
|
2015-01-19T20:48:40
|
|
x86: Fix cygwin32 build
The section syntax is just that little bit different.
|
|
f1560b7b
|
2015-01-16T11:31:37
|
|
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.
|
|
f27c4e46
|
2015-01-13T07:22:07
|
|
x86: Fix thinko in ffi_raw_call
Missed structure initialization for raw path.
Apparently there are no tests for this outside gcc.
|
|
1c61e73a
|
2015-01-10T09:23:30
|
|
Merge pull request #165 from rth7680/pcc
Support PCC as producer and consumer
|
|
dd0b59a5
|
2015-01-10T09:22:55
|
|
Merge pull request #164 from rth7680/darwin
Fix build on darwin
|
|
9131039c
|
2015-01-10T09:22:42
|
|
Merge pull request #160 from nobu/msvc-no-complex
x86: MSVC does not support Complex type
|
|
3fa5d70c
|
2015-01-05T13:03:06
|
|
x86: Avoid fastcall when building with pcc
Apparently, PCC doesn't support the fastcall calling convention.
Nor does it issue a warning or error for the attribute that it
does not understand.
|
|
a03d2310
|
2014-12-24T16:03:34
|
|
x86: Load structure return address into eax
|
|
b7f6d7aa
|
2014-12-10T13:37:36
|
|
x86: Reinstate hand-written unwind info for sysv.S
|
|
6cedf81c
|
2014-12-10T09:43:58
|
|
x86: Expand FFI_GO_CLOSURE
If we're going to have to hand-write unwind info for darwin,
these macros make the job harder.
|
|
ae842a51
|
2014-11-25T11:43:40
|
|
x86: More Darwin unwind fixups
EHFrame{N} IIRC is a special cue to ld64 that it should treat the unwind
in the object as "special/legacy" .. [these days everything is .cfi_xxxx
(except, cctools-as, as you noted)] .. without that much confusion arises
with ld64's atom-isation of the eh_frame section.
xxxx.eh labels are not needed for darwin ld64 >= 85.2.1 (i.e. darwin9,
xcode 3.1.4) to all intents and purposes, that's all that matters now,
since I think that anyone trying to build on 10.4/darwin8/xcode2.5 would
have to use a later ld64 (from odcctools) for other reasons.
|
|
8fa3c9f2
|
2014-11-25T09:27:54
|
|
x86: Reinstate hand-written unwind info for unix64.S
One more try to get default Darwin to work.
|
|
5f35e0ff
|
2014-11-24T16:26:50
|
|
x86: Avoid using gas local labels
Which are unsupported by Darwin cctools as.
Thankfully this doesn't uglify the source too much.
|
|
ed1ca277
|
2014-11-24T13:02:03
|
|
x86: Remove use of .cfi_escape
The unwind info isn't 100% correct at all points during the epilogue,
and not annotating is just as incorrect as the annotation. This works
better on systems that do not support DW_OP_call_frame_cfa.
|
|
1b12593d
|
2014-11-24T12:55:43
|
|
x86: Honor alignment of arguments
Darwin aligns long-double to 16, and thus all of the long double
tests were failing due to not honoring that. We ought to be able
to devise a test case for GCC using __attribute__((aligned)) that
would have failed too.
|
|
042b8daf
|
2014-11-24T11:24:02
|
|
x86: Use .balign not .align
The Apple assembler defaults to power of two alignment, rather than
byte alignment like everyone else. Force byte alignment by using
the proper directive.
|
|
0172bc02
|
2014-11-24T10:42:02
|
|
x86: Disable .org for Darwin
|
|
9f112619
|
2014-11-22T20:02:43
|
|
x86: Best guess at update for Darwin
|
|
7282d328
|
2014-12-22T17:14:40
|
|
x86: MSVC does not support Complex type
|
|
5f8881a5
|
2014-12-22T17:08:08
|
|
x86: Fix void pointer arithmetic
|
|
2f652469
|
2014-12-11T14:16:00
|
|
x86: Handle void arguments as if an empty structure
Since libffi currently doesn't allow empty structures, libgo
currently maps them to ffi_type_void. Given that we'll abort
on this case, handle it gracefully.
|
|
097ccfd6
|
2014-12-10T13:25:14
|
|
x86: Fix some unwind errors
|
|
dea49e20
|
2014-11-14T13:05:14
|
|
x86: Fix typo in ffi_prep_go_closure
Used the wrong register for THISCALL and FASTCALL.
|
|
0e303c06
|
2014-11-12T03:58:58
|
|
x86: Work around clang bugs
http://llvm.org/bugs/show_bug.cgi?21500
http://llvm.org/bugs/show_bug.cgi?21501
http://llvm.org/bugs/show_bug.cgi?21515
|
|
2650f47f
|
2014-11-06T10:57:04
|
|
x86: Use win32 name mangling for fastcall functions
|
|
f8c64e24
|
2014-11-05T17:04:29
|
|
x86: Add support for Go closures
|
|
198f469e
|
2014-11-05T16:34:41
|
|
x86: Add support for Complex
|
|
b21ec1ce
|
2014-11-05T10:15:25
|
|
x86: Rewrite closures
Move everything into sysv.S, removing win32.S and freebsd.S.
Handle all abis with a single ffi_closure_inner function.
Move complexity of the raw THISCALL trampoline into assembly
instead of the trampoline itself.
Only push the context for the REGISTER abi; let the rest
receive it in a register.
|
|
b9ac94f3
|
2014-11-01T15:10:34
|
|
x86: Rewrite ffi_call
Decouple the assembly from FFI_TYPE_*. Merge prep_args with ffi_call,
passing the frame and the stack to the assembly.
Note that this patch isn't really standalone, as this breaks closures.
|
|
159d3788
|
2014-10-31T12:07:02
|
|
x86: Convert to gas generated unwind info
|
|
e7b0056d
|
2014-10-30T13:57:39
|
|
x86: Force FFI_TYPE_LONGDOUBLE different from FFI_TYPE_DOUBLE
There are few abis that set double = long double. Eliminate the
conditional compilation and let this code simply be unused there.
|
|
4b2fad8f
|
2014-10-30T12:41:31
|
|
x86: Remove some conditional compilation
Removal of ifdefs made possible to due to ffi_abi unification.
|
|
ef762056
|
2014-10-30T12:13:31
|
|
x86: Tidy ffi_abi
The x86_64 unix port only handles one ABI; don't define all of the
other symbols. The UNIX64 symbol retains the same value.
The i386 ports ought to have the same symbols, even if we can't yet
unify the values without incrementing the libffi soname.
|
|
610c90bf
|
2014-10-28T11:21:50
|
|
x86_64: Add support for complex types
|
|
32c56831
|
2014-10-28T11:17:35
|
|
x86_64: Decouple return types from FFI_TYPE constants
We can better support structure returns, and as prep for
complex types.
|
|
2e9dc165
|
2014-10-27T13:41:39
|
|
x86_64: Fixups for x32
|
|
ebd82769
|
2014-10-23T23:57:06
|
|
win64: Remove support from ffi.c
|
|
99db4d42
|
2014-10-23T14:12:18
|
|
win64: Rewrite
It's way too different from the 32-bit ABIs with which it is
currently associated. As seen from all of the existing XFAILs.
|
|
6b62fb4a
|
2014-10-17T11:11:58
|
|
x86-64: Support go closures
Dumps all of the hand-coded unwind info for gas generated. Move jump
table data into .rodata. Adjust ffi_call_unix64 to load the static
chain. Split out sse portions of ffi_closure_unix64 to
ffi_closure_unix64_sse rather than test cif->flags at runtime.
|
|
a0bdc525
|
2014-11-11T09:43:01
|
|
Fix typo
|
|
6695983d
|
2014-09-20T07:44:37
|
|
Add complex type support. Mostly broken right now
|
|
bfcbf329
|
2014-09-20T06:51:45
|
|
2014-05-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
Fix current cygwin-64 build problems.
* src/java_raw_api.c: Remove if !defined(FFI_NO_RAW_API).
* src/x86/ffi.c: Add if defined(__CYGWIN__).
* src/x86/win64.S (ffi_closure_win64, ffi_call_win64): Added
handling for FFI_TYPE_UINT64, FFI_TYPE_POINTER and FFI_TYPE_INT.
Added SEH information. Fixed formatting.
|
|
6e8a4460
|
2014-09-20T06:21:19
|
|
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.
|
|
5d6340ef
|
2014-08-25T17:29:44
|
|
Determine whether register arguments (THISCALL/FASTCALL/REGISTER) are really passed via register to closures. Use stack if not.
|
|
6e346487
|
2014-08-25T12:23:29
|
|
Fixed THISCALL/FASTCALL closures and added basic support for PASCAL/REGISTER closures.
|
|
098dca6b
|
2014-08-23T00:18:47
|
|
Support for calling functions with PASCAL and REGISTER calling conventions on x86 Windows/Linux.
Also changed indentation to be more consistent throughout the (adjusted) files.
|
|
978c9540
|
2014-05-31T08:53:10
|
|
Add missing GNU stack markings in win32.S
|
|
99909eb6
|
2014-04-22T21:17:52
|
|
src/x86/win32.S: Define ffi_closure_FASTCALL in the MASM section, too
|
|
d3695227
|
2014-04-20T12:03:25
|
|
Support fastcall closures
libffi on 32-bit x86 now supports closures for all supported ABIs.
Thus, rewrite the last remaining duplicated-by-ABI test (closure_stdcall
and closure_thiscall) to use the generic ABI_NUM/ABI_ATTR mechanism.
|
|
3e2b84d2
|
2014-04-12T01:04:04
|
|
Fix Windows regression
Introduced by b5fed601948237037513a9b7f967c8fc6c9ff1f6.
|
|
b5fed601
|
2014-04-05T17:33:42
|
|
Fix ABI on 32-bit non-Windows x86: go back to trampoline size 10
The trampoline size is part of the ABI, so it cannot change. Move the
logic from the stdcall and thiscall trampolines to the functions they
call, to reduce them both to 10 bytes.
This drops the previously added support for raw THISCALL closures on
non-Windows. (Non-raw THISCALL closures still work.)
|
|
afee5373
|
2014-03-25T16:12:35
|
|
Merge pull request #106 from joshtriplett/darwin-award
[3.1 blocker] Update OS X build system to include win32.S on 32-bit
|
|
7d247856
|
2014-03-25T16:12:17
|
|
Merge pull request #110 from joshtriplett/w64
Fix 64-bit Windows support
|
|
be50b87a
|
2014-03-24T21:44:13
|
|
Always use configure to detect whether global symbols need underscores
64-bit Windows already used this check; make it universal, and use it in
place of an ifdef on X86_WIN32, to handle non-Windows platforms that use
the underscore, such as Darwin.
|
|
56be47f8
|
2014-03-24T21:24:53
|
|
Fix a warning on 64-bit Windows
When sizeof(size_t) != sizeof(unsigned), adding a size_t to cif->bytes
produces a "possible loss of data" warning. However, the size_t in
question refers to the size of a single parameter. Use a cast to avoid
the warning.
|
|
48a8eda7
|
2014-03-24T21:21:12
|
|
Avoid referencing undefined ABIs on 64-bit Windows builds
64-bit Windows does not have FFI_STDCALL, FFI_THISCALL, or FFI_FASTCALL.
|
|
f0f4138f
|
2014-03-22T10:00:53
|
|
win32.S: Add handling for position-independent code on Darwin
Newer versions of Darwin generate the necessary stub functions
automatically and just need a call instruction, but accomodating older
versions as well requires adding the stub.
|