1. 19 Dec, 2018 2 commits
  2. 30 Nov, 2018 1 commit
  3. 31 Oct, 2018 1 commit
  4. 19 Sep, 2018 1 commit
  5. 18 Sep, 2018 2 commits
  6. 11 Aug, 2018 1 commit
  7. 09 Aug, 2018 1 commit
    • Andreas Schwab's avatar
      RISC-V go closures · 4cb776bc
      Andreas Schwab authored
      This implements go closures for RISC-V.  It has been tested on
      riscv64-suse-linux and against the libgo testsuite.
      4cb776bc
  8. 21 Jul, 2018 1 commit
  9. 25 Jun, 2018 1 commit
  10. 18 Jun, 2018 2 commits
  11. 09 May, 2018 2 commits
  12. 05 May, 2018 2 commits
  13. 02 May, 2018 2 commits
    • H.J. Lu's avatar
      Re-enable msabi testing (#436) · d3c54cf3
      H.J. Lu authored
      * Revert "disable msabi testing for now"
      
      This reverts commit 7b7638eb.
      
      * 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.
      d3c54cf3
    • Alan Modra's avatar
      PowerPC64 ELFv1 fp arg fixes · ebf24166
      Alan Modra authored
      The ELFv1 ABI says: "Single precision floating point values are mapped
      to the second word in a single doubleword" and also "Floating point
      registers f1 through f13 are used consecutively to pass up to 13
      floating point values, one member aggregates passed by value
      containing a floating point value, and to pass complex floating point
      values".
      
      libffi wasn't expecting float args in the second word, and wasn't
      passing one member aggregates in fp registers.  This patch fixes those
      problems, making use of the existing ELFv2 homogeneous aggregate
      support since a one element fp struct is a special case of an
      homogeneous aggregate.
      
      I've also set a flag when returning pointers that might be used one
      day.  This is just a tidy since the ppc64 assembly support code
      currently doesn't test FLAG_RETURNS_64BITS for integer types..
      
      	* src/powerpc/ffi_linux64.c (discover_homogeneous_aggregate):
      	Compile for ELFv1 too, handling single element aggregates.
      	(ffi_prep_cif_linux64_core): Call discover_homogeneous_aggregate
      	for ELFv1.  Set FLAG_RETURNS_64BITS for FFI_TYPE_POINTER return.
      	(ffi_prep_args64): Call discover_homogeneous_aggregate for ELFv1,
      	and handle single element structs containing float or double
      	as if the element wasn't wrapped in a struct.  Store floats in
      	second word of doubleword slot when big-endian.
      	(ffi_closure_helper_LINUX64): Similarly.
      ebf24166
  14. 01 May, 2018 1 commit
  15. 28 Apr, 2018 1 commit
    • Tom Tromey's avatar
      Fix two "return" issues in x86/ffi64.c (#431) · 4c2206ac
      Tom Tromey authored
      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.
      4c2206ac
  16. 27 Apr, 2018 2 commits
    • Tom Tromey's avatar
      Merge pull request #429 from yousong/m4subst · ed3ed4d8
      Tom Tromey authored
      build: fix subst toolexecdir, toolexeclibdir
      ed3ed4d8
    • Yousong Zhou's avatar
      build: fix subst toolexecdir, toolexeclibdir · b69f95d6
      Yousong Zhou authored
      On CentOS 7.4, configure script generated by autogen.sh will output the
      following values when compiling GCC source code
      
          toolexecdir='NONE/$(target_alias)'
          toolexeclibdir='NONE/$(target_alias)/lib'
      
      and cause build error
      
          ... -o libffi.la -rpath NONE/riscv64-bs-linux-gnu/lib ...
          checking for shl_load in -ldld... libtool: link: only absolute run-paths are allowed
      b69f95d6
  17. 25 Apr, 2018 1 commit
  18. 20 Apr, 2018 1 commit
  19. 19 Apr, 2018 1 commit
    • James Cowgill's avatar
      Various MIPS Fixes (#425) · 159b94e5
      James Cowgill authored
      * 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
      159b94e5
  20. 08 Apr, 2018 2 commits
  21. 05 Apr, 2018 1 commit
  22. 02 Apr, 2018 3 commits
    • Anthony Green's avatar
      3.3 release candidate 0 · 8660e693
      Anthony Green authored
      8660e693
    • Anthony Green's avatar
      disable msabi testing for now · 7b7638eb
      Anthony Green authored
      7b7638eb
    • fwg's avatar
      Fix appveyor windows build (#420) · af6773d6
      fwg authored
      * Fix msvcc dll build by adding dllexport decorations to all API declarations
      
      * Fix appveyor build for VS 2013
      
      Use the new -DFFI_BUILDING_DLL for producing a working DLL. Update the
      msvcc.sh wrapper script to successfully compile the testsuite files.
      
      * MSVC build: suppress warnings in testsuite
      
      * fix testsuite on appveyor
      af6773d6
  23. 29 Mar, 2018 4 commits
  24. 27 Mar, 2018 4 commits