src/mips/ffitarget.h


Log

Author Commit Date CI Message
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
Yen Chi Hsuan 9fc9dc53 2017-10-27T16:12:56 Fix linux detection (closes #303)
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
Anthony Green 8360bf1c 2012-02-23T07:01:13 Ensure that users don't include ffitarget.h directly
Anthony Green 049d8386 2011-08-22T14:50:10 Many new patches
Anthony Green 42695e72 2011-02-09T15:12:35 Fix IRIX support
Anthony Green 3b836249 2011-02-08T14:28:59 Rebase from GCC
Anthony Green d14178be 2010-07-23T09:14:00 FFI_LAST_ABI fix
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