summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove nested commentsAnthony Green2022-09-271-14/+17
|
* or1k: All struct args are passed in memoryAnthony Green2022-09-241-1/+1
|
* moxie: All struct args are passed in memoryAnthony Green2022-09-241-1/+1
|
* Update comment about platform supportAnthony Green2022-09-191-1/+1
|
* Standardize temp exec file creationAnthony Green2022-09-192-26/+2
|
* Handle win32 ABIs for struct returnAnthony Green2022-09-181-27/+30
|
* Debug x86Anthony Green2022-09-181-3/+5
|
* RevertAnthony Green2022-09-181-0/+2
|
* X86 is never defined.Anthony Green2022-09-181-3/+0
|
* Add MSYS configuration files (#728)Hans2022-09-177-30/+42
| | | | | | | | | | | | | | | | | | | | | | | | | * Add MSYS configuration files MSYS behaves very similiar to Cygwin, e.g. also __CYGWIN__ is defined. Now 'make check' passes on MSYS without extra patches. * Fix warning extra tokens at end of #endif in closures.c Extra tokens converted into a comment. Also nearby indentations corrected. * Fix missing prototype warning mkostemp() on Cygwin Cygwin requires also _GNU_SOURCE to be defined to enable mkostemp() prototype. * Fix warning label ‘out’ defined but not used in ffi functions Define same preprocessor conditions for goto and label visibility. * Fix warning label ‘out’ defined but not used and related indentations. Define same preprocessor conditions for goto and label visibility. Correct also related indentations. Co-authored-by: Hannes Müller <>
* Fix arg alignment for STDCALLAnthony Green2022-09-151-3/+8
|
* Fix limits.h inclusion for cygwinAnthony Green2022-09-121-1/+1
|
* Add static trampoline support for CygwinAnthony Green2022-09-122-14/+18
|
* dlmmap fix and always check for PaX MPROTECT on linuxAnthony Green2022-09-061-35/+54
| | | | | | Also make EMUTRAMP experimental From Stefan Bühler https://github.com/libffi/libffi/pull/282
* Pass large structs by valueAnthony Green2022-09-051-0/+16
|
* Makefile: enable target overridings. (#661)Clément Chigot2022-09-011-0/+5
| | | | | | | | | | This patch allows target to provide extra files enabling the override of Makefile rules. This patch is not needed for libffi itself but only for GCC on AIX. The t-aix file which is here empty will be replaced in GCC repository. We cannot include GCC version directly here because it has no sense for a standalone libffi. Co-authored-by: Clement <clement.chigot@atos.net>
* Change comment styleAnthony Green2022-08-311-88/+88
|
* static trampoline for LoongArch (#723)Xi Ruoyao2022-07-212-4/+59
| | | | | | | For the benefit and technical details of static trampoline, see https://github.com/libffi/libffi/pull/624. As a new architecture, let's be "safer" from the start. The change survived libffi testsuite on loongarch64-linux-gnu.
* Fix ILP32 for aarch64Anthony Green2022-06-251-0/+9
|
* Ensure that VM_PROT_EXECUTE is set on the trampoline page. (#718)Russell Keith-Magee2022-06-021-2/+14
|
* powerpc64: fix build on gcc-12 (assembly requires AltiVec) (#719)Sergei Trofimovich2022-06-022-0/+4
| | | | | | | | | | Without the change build fails on powerpc64-gcc-12 as: src/powerpc/linux64_closure.S: Assembler messages: src/powerpc/linux64_closure.S:363: Error: unrecognized opcode: `lvx' It's a 90205f67 "rs6000: Fix bootstrap (libffi)" patch by Segher Boessenkool from gcc upstream repository. It's enough to get libffi build on powerpc64.
* Fix windows arg passingAnthony Green2022-05-291-2/+1
|
* 64-bit cygwin: fix struct args. Document change.Anthony Green2022-05-291-0/+17
|
* m32r: pass copies of large structsAnthony Green2022-05-291-14/+31
|
* Fix building on aarch64 after e409225b41b60c490a094bb068e639a2364202fd (#716)Martin Storsjö2022-05-291-1/+1
| | | | The ALIGN_DOWN macro was renamed in 2018 in e6eac7863e2bf1a009ea863041b354bdb4af6b67.
* Pass large structs by value on the stackAnthony Green2022-05-281-12/+25
|
* Fix for MS x64 ABIAnthony Green2022-05-281-9/+11
|
* Fix moxie struct passingAnthony Green2022-05-281-1/+1
|
* moxie: structs > 8 go on stackAnthony Green2022-05-281-1/+1
|
* Pass copies of large structs on the stackAnthony Green2022-05-281-1/+17
|
* Pass large structs by value for Linux x86_64 and Aarch64.Anthony Green2022-05-282-9/+49
| | | | Aarch patch by Andreas Schwab. https://github.com/libffi/libffi/commit/482b37f00467325e3389bab322525099860dd9aa
* Support loongarch64 (#678)zhangwenlong2022-05-243-0/+973
| | | | | | | | | | | | | | | * update config.{guess,sub} * Support loongarch64 Co-Authored-By: Cheng Lulu <chenglulu@loongson.cn> Co-Authored-By: Xi Ruoyao <xry111@mengyan1223.wang> Co-Authored-By: Xu Hao Co-Authored-By: Zhang Wenlong <zhangwenlong@loongson.cn> Co-Authored-By: Pan Xuefeng <panxuefeng@loongson.cn> Co-authored-by: panxuefeng <panxuefeng@loongson.cn> Co-authored-by: Cheng Lulu <chenglulu@loongson.cn> Co-authored-by: Xi Ruoyao <xry111@mengyan1223.wang>
* Revert "Don't dereference beyond the last array entry. (#667)" (#715)Anthony Green2022-05-231-1/+1
| | | This reverts commit 92d77d0e87a5f2a8c9c9b2431ffd264cb664e17a.
* Upstream FreeBSD riscv patch (#708)Kevin Bowling2022-05-231-0/+2
| | | | | | | | | | | | Like 8276f812a99b10d1f2c387dbd6ef2ca4f597c733 commit message: > devel/libffi: Fix abort() on ARM related to __clear_cache() > > The current FreeBSD __clear_cache() implementation does nothing #if > __i386__ || __x86_64__ #else abort(); > > cognet@ advises this is an issue for anything !Apple that is using the > libcompiler_rt provided by Clang on ARM, and requires upstreaming. Co-authored-by: Kristof Provost <kp@FreeBSD.org>
* Fix check for invalid varargs arguments. (#707)Roland Schatz2022-05-231-1/+2
|
* Don't dereference beyond the last array entry. (#667)Anthony Green2022-05-231-1/+1
|
* MIPS: fix some N32 test failure (#701)YunQiang Su2022-05-153-40/+88
| | | | Some go closure and pointer testcase fails. These failures is not introduced by the complex support code.
* MIPS: fix O32 softfloat support (#702)YunQiang Su2022-05-151-2/+2
|
* x86-64: Always double jump table slot size for CET (#710) (#711)hjl-tools2022-05-151-6/+5
| | | | | | | | | | | | | | | | When CET is enabled, double jump table slot size to add 4 bytes of ENDBR64 for CET. Since CET enabled clang doesn't have the LLVM assembler bug: https://bugs.llvm.org/show_bug.cgi?id=21501 fixed by commit 04d39260d64e08b8bfb3844109ad43d4055b2e8d Author: Rafael Espindola <rafael.espindola@gmail.com> Date: Wed Nov 4 23:50:29 2015 +0000 Simplify .org processing and make it a bit more powerful. we can use .org to allocate jump table slot size to 16 bytes.
* MIPS: add Complex support (#698)YunQiang Su2022-03-314-80/+380
|
* Allow system to have overlapping mallopt defines (#700)Ole André Vadla Ravnås2022-03-311-0/+5
| | | Which is the case on some OSes, such as QNX.
* Clean up the QNX ARM bits (#699)Ole André Vadla Ravnås2022-03-311-3/+7
| | | | - Add missing include. - Use constants instead of magic values.
* Xtensa cleanups and XEA3 support (#677)Max Filippov2022-02-203-24/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xtensa: clean up stack usage in ffi_trampoline call Space for outgoing call arguments reserved in the stack frame of the function ffi_trampoline overlaps register spill overflow area at the top of the frame. In xtensa XEA2 exception architecture the layout of overlapping areas is identical so that even if the ffi_trampoline registers frame gets spilled the memory contents doesn't change. This is not so with the xtensa XEA3 exception architecture, where registers a0 - a7 of a different function are spilled in that location. Reserve spill area for 8 registers to avoid overlapping of the spill area with the outgoing call arguments area in the ffi_trampoline. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> * xtensa: support xtensa XEA3 exception architecture XEA3 requires that 32 bytes of register spill area is reserved in all functions. Fix ffi_cacheflush entry instruction to satisfy this requirement. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> * xtensa: maintain stack alignment xtensa ABI requires stack alignment on 16 byte boundary and passing up to 6 arguments in registers. To simplify stack alignment maintenance fixed amount of stack space is reserved for arguments passed in registers and variable but correctly aligned amount is reserved for the remaining arguments. After copying arguments to the stack and loading registers the fixed part of the stack reservation is freed. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> * xtensa: fix err_bad_abi tests Check ffi_cif::abi value in the ffi_prep_closure_loc and return FFI_BAD_ABI error if it's not one of the supported values. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* riscv: extend return types smaller than ffi_arg (#680)Andreas Schwab2022-02-131-1/+26
| | | Co-authored-by: Andreas Schwab <schwab@suse.de>
* powerpc64: fix handling of homogeneous float128 structs (#689)Dan Horák2022-01-311-1/+1
| | | | | | If there is a homogeneous struct with float128 members, they should be copied to vector register save area. The current code incorrectly copies only the value of the first member, not increasing the pointer with each iteration. Fix this.
* src/x86/win64.S: Use #define instead of .macro (#665) (#669)rorth2021-12-231-7/+6
| | | | The Solaris/x86 assembler doesn't support .macro/.endm, so use #define since win64.S is passed through cpp anyway.
* Fix 'type'-oAnthony Green2021-07-291-3/+3
|
* Fix struct arg passingAnthony Green2021-07-291-22/+31
|
* Fix trampoline_code_table for x32. (#657)Harald van Dijk2021-07-241-4/+20
| | | | x32's struct tramp_parm has 32-bit pointers. This change adjusts the loads and offsets accordingly.
* 2021-06-15 Jakub Jelinek <jakub@redhat.com>Jakub Jelinek2021-06-151-3/+5
| | | | | | | | * src/x86/ffi64.c (classify_argument): For FFI_TYPE_STRUCT set words to number of words needed for type->size + byte_offset bytes rather than just type->size bytes. Compute pos before the loop and check total size of the structure. * testsuite/libffi.call/nested_struct12.c: New test.