Anthony Green
93d8e7dd17
Fix #265
2017-09-27 21:51:34 -04:00
Anthony Green
02a5145abb
Merge pull request #263 from ksjogo/master
...
fix ios builds
2017-09-27 21:43:03 -04:00
Anthony Green
10099d6cad
Merge pull request #271 from frida/fix/qnx-cache-flushing
...
arm: Fix cache flushing on QNX
2017-09-27 20:54:09 -04:00
Anthony Green
db4dad97e2
Merge pull request #312 from fjricci/fix_ub
...
Fix misaligned memory access in ffi_call_int
2017-09-27 20:47:08 -04:00
Francis Ricci
9c12209d2e
Fix misaligned memory access in ffi_call_int
2017-08-03 10:46:28 -07:00
Tony Reix
0ff9419f2e
This patch enables FFI Go Closure on AIX.
2017-05-17 14:57:53 +02:00
Gregory Pakosz
bd72848c7a
Prefix ALIGN macros with FFI_
2017-04-27 13:22:28 +02:00
Ole André Vadla Ravnås
57d8ff044c
Simplify iOS trampoline table allocation
...
By using VM_FLAGS_OVERWRITE there is no need for speculatively
allocating on a page we just deallocated. This approach eliminates the
race-condition and gets rid of the retry logic.
2017-03-30 13:30:50 +02:00
Johannes Goslar
0040694505
Update Xcodeproj
...
Include all currently relevent files.
Call autogen is build script.
Fix compiler settings.
Fix mach include.
2017-03-30 13:26:15 +02:00
Anthony Green
a94c999ba0
Handle fastcall declaration differently for some Microsoft compilers
2017-03-19 07:36:07 -04:00
Anthony Green
a0b14eea2b
Merge pull request #291 from ramon-garcia/visual-studio-build
...
Build with Visual C++ (64 bits)
2017-03-17 09:20:40 -04:00
Ole André Vadla Ravnås
d42ce7b95c
Fix error path so mutex is unlocked before returning
...
In the unusual case where ffi_trampoline_table_alloc() fails.
2017-03-15 01:27:43 +01:00
Ramón García Fernández
1e0d107b4b
Modify configure.host to detect compilation with Microsoft Visual C++ and use assembly with Intel syntax in that case
2017-01-08 20:34:44 +01:00
Richard Henderson
256ce51c40
Merge pull request #273 from wbx-github/master
...
m68k: support ISA-A Coldfire CPUs
2016-09-01 13:54:51 -07:00
Richard Henderson
2ded2a4f49
Merge pull request #272 from yousong/mips64-soft-float
...
Mips64 soft float
2016-09-01 13:30:45 -07:00
Yuriy Kolerov
b545ff81f5
ARC: Remove unused variable
...
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com >
2016-08-23 20:23:37 +03:00
Waldemar Brodkorb
52a11f6d91
m68k: support ISA-A Coldfire CPUs
...
Fix compilation for m68k/coldfire CPUs like mcf5208.
Signed-off-by: Thorsten Glaser <tg@mirbsd.de >
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org >
2016-08-20 01:05:32 +02:00
Yousong Zhou
7a0d2c83bf
mips: fix MIPS softfloat build issue
...
The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi:
fix MIPS softfloat build issue with current binutils"
Signed-off-by: Felix Fietkau <nbd@openwrt.org >
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com >
2016-08-15 15:14:54 +08:00
Tom Tromey
06d7c5190e
Merge pull request #269 from frida/fix/aarch64-variadic-closures-on-ios
...
aarch64: Fix handling of variadic closures on iOS
2016-08-10 15:06:16 -06:00
Tom Tromey
aa7ed78c0e
Merge pull request #268 from frida/fix/aarch64-large-aggregates
...
aarch64: Fix handling of aggregates larger than 16 bytes
2016-08-10 15:03:37 -06:00
Ole André Vadla Ravnås
4da814b18a
aarch64: Fix handling of aggregates larger than 16 bytes
...
Instead of allocating stack space for a pointer we would allocate stack
space for the actual aggregate size.
2016-08-10 22:48:09 +02:00
s1341
ed8488345e
arm: Fix cache flushing on QNX
...
Use `msync()` directly as `__clear_cache()` is broken in the
qnx650_gcc4.8.3 toolchain.
2016-08-10 17:09:17 +02:00
Ole André Vadla Ravnås
5e9ac7e252
aarch64: Fix warning about unused function on iOS
2016-08-10 17:07:17 +02:00
Ole André Vadla Ravnås
4d1f11f6a9
aarch64: Fix operand size warning reported by Clang
2016-08-10 17:07:11 +02:00
Ole André Vadla Ravnås
301166b11e
aarch64: Fix handling of variadic closures on iOS
2016-08-10 17:05:00 +02:00
Tom Tromey
cf4b2a5041
Don't dereference "ecif" before NULL check
...
Fixes #260
2016-06-17 10:09:44 +01:00
Richard Henderson
794a54d4a6
Mark win64.S with GNU-stack note
2016-06-05 14:57:00 -07:00
Iain Sandoe
52fbd12dca
[Darwin-ppc, build] Fixes for clang build.
...
clang is experimental on powerpc-darwin, but the changes are appropriate to cctools as as well.
Use the 'official' simplified cmpwi insn, rather than the implied one accepted by cctools.
Do not re-use a set value.
2016-05-26 09:06:35 +01:00
Iain Sandoe
92810b4bc1
[Darwin-x86, build] Fix up label prefixes, remove .purgem
...
Darwin uses a label prefix of _.
cctools assembler will not accept .purgem as a directive.
2016-05-26 09:06:35 +01:00
Berker Peksag
74b3f52014
Remove unused FFI_CLOSURE_TEST
...
It was here since the first commit c6dddbd (warning: huge diff) and
it wasn't defined by the configure script. It was probably used
manually during development.
2016-05-19 18:05:36 +03:00
Tom Tromey
0969a1c1b3
Merge pull request #232 from berkerpeksag/signcompare
...
Fix -Wsign-compare warnings in x86/ffi64.c
2016-05-18 10:09:28 -06:00
Berker Peksag
1e82e1cda4
Define _GNU_SOURCE on Linux for mremap()
...
This was committed to CPython's libffi copy in
https://bugs.python.org/issue10309
mremap() documentation says _GNU_SOURCE needs to
be defined in order to use mremap(): see the
synopsis section at http://linux.die.net/man/2/mremap
Original commit: https://hg.python.org/cpython/rev/9986fff720a2
Original patch was written by Hallvard B Furuseth.
2016-05-18 10:42:38 +03:00
Berker Peksag
4a677a425c
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.
2016-05-18 10:35:20 +03:00
Tom Tromey
9443eaeda8
Merge pull request #242 from somasis/master
...
Fix usage on musl libc
2016-05-17 17:04:50 -06:00
Richard Henderson
48bfae1f37
Merge pull request #236 from andreas-schwab/master
...
Define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32
2016-05-02 20:58:57 -10:00
Kylie McClain
e169ba2b83
Fix usage on musl libc
...
A gcc compiled on musl does not define __gnu_linux__, it defines __linux__.
Only on glibc does __gnu_linux__ get defined, but both define __linux__, so
we should check for that instead.
With this patch, libffi works perfectly, and passes its testsuite entirely
on musl libc systems.
2016-04-29 21:31:59 -04:00
Richard Henderson
e5843a3a09
x86: Fix calling convention for ffi_closure_win64_inner
...
Also enable testing for the cross-abi calls.
2016-04-29 14:17:36 -07:00
Richard Henderson
d06751979b
x86: Copy fix for clang .org from unix64.S
...
Clang doesn't understand .org with symbolic operands.
2016-04-15 16:10:28 -07:00
Andreas Schwab
d76975dbd2
Define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32
...
Like x32, aarch64 ILP32 needs to define FFI_SIZEOF_JAVA_RAW. This fixes
the java interpreter.
2016-03-16 12:23:07 +01:00
Tom Tromey
38a4d72c95
add ffi_get_struct_offsets
2016-02-22 16:07:55 -07:00
Anthony Green
49b95edafd
Merge pull request #194 from amodra/master
...
Correct powerpc sysv stack argument accounting
2016-02-20 06:49:40 -05:00
Anthony Green
415723b40b
Merge pull request #104 from joshtriplett/efi64
...
Support the Windows/EFI calling convention on all x86-64 targets
2016-02-20 06:49:19 -05:00
Anthony Green
69143d06c6
Merge pull request #197 from foxsen/mips_go_closure
...
Mips go closure support
2016-02-20 06:44:28 -05:00
Russell Keith-Magee
bc4fc07aa5
Fixed #181 -- Corrected problems with ARMv7 build under iOS.
...
Based on a patch from @fealebenpae, with input from @SolaWing and @rth7680,
and testing from @superdump.
2015-12-21 00:37:06 +08: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