From 7a0d2c83bf2b0422e2d0ed297f847fc1eeb88bb3 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Mon, 15 Aug 2016 15:00:13 +0800 Subject: [PATCH 1/2] 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 Signed-off-by: Yousong Zhou --- src/mips/n32.S | 17 +++++++++++++++++ src/mips/o32.S | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/mips/n32.S b/src/mips/n32.S index b402c88c..edc6905c 100644 --- a/src/mips/n32.S +++ b/src/mips/n32.S @@ -112,6 +112,16 @@ loadregs: REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. +#ifdef __mips_soft_float + REG_L a0, 0*FFI_SIZEOF_ARG(t9) + REG_L a1, 1*FFI_SIZEOF_ARG(t9) + REG_L a2, 2*FFI_SIZEOF_ARG(t9) + REG_L a3, 3*FFI_SIZEOF_ARG(t9) + REG_L a4, 4*FFI_SIZEOF_ARG(t9) + REG_L a5, 5*FFI_SIZEOF_ARG(t9) + REG_L a6, 6*FFI_SIZEOF_ARG(t9) + REG_L a7, 7*FFI_SIZEOF_ARG(t9) +#else and t4, t6, ((1< Date: Mon, 15 Aug 2016 17:34:37 +0800 Subject: [PATCH 2/2] doc: fix typo Name of last argument to ffi_get_struct_offsets is `offsets`, not `sizes` Signed-off-by: Yousong Zhou --- doc/libffi.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/libffi.texi b/doc/libffi.texi index 94b7a9ec..4f167622 100644 --- a/doc/libffi.texi +++ b/doc/libffi.texi @@ -474,9 +474,9 @@ Compute the offset of each element of the given structure type. @var{abi} is the ABI to use; this is needed because in some cases the layout depends on the ABI. -@var{sizes} is an out parameter. The caller is responsible for +@var{offsets} is an out parameter. The caller is responsible for providing enough space for all the results to be written -- one -element per element type in @var{struct_type}. If @var{sizes} is +element per element type in @var{struct_type}. If @var{offsets} is @code{NULL}, then the type will be laid out but not otherwise modified. This can be useful for accessing the type's size or layout, as mentioned above.