src/mips/ffi.c


Log

Author Commit Date CI Message
Niclas Zeising 8276f812 2020-08-07T21:05:23 Upstream local FreeBSD patches (#567) * Add support for FreeBSD mips Add support for FreeBSD mips, this has been a local patch in the FreeBSD ports tree for quite some time. Originally submitted by sson, and committed by sbruno AT FreeBSD DOT org See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191909 for background details. Signed-off-by: Niclas Zeising <zeising@daemonic.se> * Add support for FreeBSD powerpcspe Add support for powerpcspe on FreeBSD This has been in the FreeBSD ports tree for some time. Originally submitted by jhibbits AT FreeBSD DOT org. Signed-off-by: Niclas Zeising <zeising@daemonic.se> * Fix abort() on FreeBSD arm related to __clear_cache() This patch has been in the FreeBSD ports tree for a number of years. Original commit by koobs AT FreeBSD DOT org Original commit message: > devel/libffi: Fix abort() on ARM related to __clear_cache() > > The current FreeBSD/ARM __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. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=149167 for some background details. Signed-off-by: Niclas Zeising <zeising@daemonic.se>
James Cowgill 159b94e5 2018-04-19T01:28:23 Various MIPS Fixes (#425) * mips: simplify closure #defines This commit should have no visible effect. * mips: add special handling of variadic functions MIPS requires special handling of variadic functions which pass floating point arguments: * In the o32 ABI, all float arguments are passed in integer registers. * In the n32/n64 ABIs, float arguments after the ellipsis are passed in integer registers. Implement this in libffi. To support this in n32/n64 closures, we need to add a new mips_nfixedargs field to ffi_cif which will break the libffi ABI. This fixes the libffi.call/cls_longdouble_va.c test which was failing on 64-bit MIPS. * mips: align argn for all 64-bit types in o32 closure handler Ensure that argn is pre-aligned for all 64-bit argument types (including doubles) and not just integer types. This fixes closures of the form "f(float, double, <some integer args>)". Previously the first integer argument would be read from a2 which is garbage at this point (the float arguments have already "consumed" a0-a3). After this commit, argn is correctly padded between the "float" and "double" arguments so that the first integer argument is read from the stack. Fixes "double f(float,double,int)" test in #371 * mips: do not read from floating point register if returning a struct In the o32 ABI, the pointer passed in a0 used to return structures indirectly is treated as the first argument for argument allocation purposes. This means that it should inhibit floating point registers the same way that other integer arguments do. Fixes "Double f(float,Double,double)" test in #371 * mips: fix pointer cast warnings Fix two pointer cast warnings when compiled on 64-bit mips by casting through uintptr_t. Fixes mips64el part of #404
YunQiang Su 746dbe3a 2018-01-03T10:07:41 mips/ffi.c: fix encoding for jr on r6 mips/ffi.c: instruction jr has a different encoding for r6
Gregory Pakosz bd72848c 2017-04-27T13:20:36 Prefix ALIGN macros with FFI_
foxsen 6f0201c8 2015-08-04T18:25:34 various fixes for go closure support. Now all n64 tests passed.
foxsen 697dd4e8 2015-08-04T12:53:33 add support for go closure support on mips
Mark H Weaver d3372c54 2013-10-26T08:30:06 Fix N32 ABI issue for MIPS.
Anthony Green 048d2f41 2012-10-11T10:55:25 Rebase
Anthony Green 049d8386 2011-08-22T14:50:10 Many new patches
Anthony Green 1fbf9dc4 2011-02-13T08:06:39 Fix bad_abi test. rc5.
Anthony Green 115ab36f 2009-12-24T00:22:00 Update missing changes for 3.0.9r4.
Anthony Green c6dddbd0 2009-10-04T08:11:33 Initial commit