| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Bug: http://b/162610242
Test: mmma external/libffi
Change-Id: I9f1f980af1545a0de8f7897291b1c5206bf17b02
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit e19d12e6c863f084576006328570cfccf0c51e6a.
Reason for revert: Broke x86 build
Bug: http://b/162905794
Bug: http://b/162610242
Change-Id: I6a1373ad0cd269c1734176c202d0514d6efc1673
|
| |
|
|
|
|
|
|
|
|
|
| |
It turns out that this win32.S file is not part of the upstream
repository, and it thus has duplicate definitions (as libffi has evolved
proper ones over time it seems). This allows libffi to also now build as
a shared library as well, so I went ahead and enabled that as well.
Bug: http://b/162610242
Test: mmma . (in external/libffi)
Change-Id: Iee7ea2435817718b626edb8a0582f37c7eb7d110
|
| |
|
|
|
|
|
|
|
| |
These files aren't upstream, and using the same files as linux at least
builds (and seems to work so far...)
Fixes: 152920678
Test: prebuilts/build-tools/build-prebuilt.sh on an aosp build-tools branch on mac
Change-Id: I0bf4919df802fd3ee769accab95c3350789ca1f9
|
| |\
| |
| |
| |
| | |
Change-Id: I6a61dabe01ca74452a73185ff0e78d9ac2b7812e
Test: treehugger
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| | |
Required to fix build error on macos with gcc-9
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
macro where appropriate
Fix issue #439
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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_
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | | |
|
| | |
| |
| |
| | |
This reverts commit a5a0f3cf36dfb4d64316414a872288c3170e6c1d.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
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)'
|
| | |\
| | |
| | | |
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.
|
| | |\ \
| | | |
| | | | |
Xcode build improvements
|
| | | |\ \
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- 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.
|
| | |/ /
| | |
| | |
| | | |
Since x32 doesn't support WIN64/EFI64, skip it if __ILP32__ is defined.
|
| | | | |
|
| | |/ |
|
| | | |
|
| | |
| |
| |
| | |
use assembly with Intel syntax in that case
|
| | | |
|
| | |
| |
| |
| |
| | |
Darwin uses a label prefix of _.
cctools assembler will not accept .purgem as a directive.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
Also enable testing for the cross-abi calls.
|
| | |
| |
| |
| | |
Clang doesn't understand .org with symbolic operands.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Move the macros from unix64.S into a shared header asmnames.h and use
them in win64.S too.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
The section syntax is just that little bit different.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| | |
| |
| |
| |
| | |
Missed structure initialization for raw path.
Apparently there are no tests for this outside gcc.
|
| | |\
| | |
| | | |
Support PCC as producer and consumer
|
| | | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | |\|
| | |
| | | |
Fix build on darwin
|
| | | | |
|