[patch] libffi, fix powerpc-unknown-freebsd
Andreas Tobler
andreast-list@fgznet.ch
Thu Aug 21 22:50:00 GMT 2008
David Edelsohn wrote:
> * src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
> FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
> Adjust copyright notice.
> * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix bit position
> calculation for FFI_SYSV_TYPE_SMALL_STRUCT.
> (ffi_closure_helper_SYSV): Fix return type for
> FFI_SYSV_TYPE_SMALL_STRUCT.
> Adjust copyright notice.
>
> Okay.
>
> Please add more documentation for FFI_SYSV_TYPE_SMALL_STRUCT -- what
> it represents and that it uses two bits.
Sigh, I expected that... I should know you :)
Here another iteration.
Instead of playing with FFI_SYSV_TYPE_SMALL_STRUCT for bit shifts I
introduced two new flags which tell us if we need r3 or r3 and r4 for
structs passing.
The issue is this, I need to tell the ppc_closure.S exactly which type I
expect when returning. And unfortunatley the implementation needs a
distinction for every type and size. Type 1 to 15 are already used, so I
can start with using type 16 and up.
If it is still not clear, let me know, I try to be more verbose then.
The attached patch was tested under fbsd-7.0 gcc-4.3 and trunk.
Currently a ppc-linux build is running for base config and also for
soft-float.
2008-08-21 Andreas Tobler <a.tobler@schweiz.org>
* src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
Adjust copyright notice.
* src/powerpc/ffi.c: Add two new flags to indicate if we have one
register or two register to use for FFI_SYSV structs.
(ffi_prep_cif_machdep): Pass the right register flag introduced above.
(ffi_closure_helper_SYSV): Fix the return type for
FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
Adjust copyright notice.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fbsd_ffi3.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080821/7461f5f9/attachment.ksh>
More information about the Gcc-patches
mailing list