[RFC|patch] libffi soft-float support for linux-ppc-32

Andreas Tobler toa@pop.agri.ch
Wed Nov 21 22:10:00 GMT 2007

Hi all,

this is next iteration for soft-float support in libffi for linux-ppc-32.
I took the hint from David and tried to implement what he suggested.

The soft-float ABI for long-double-128 is not yet finalized. The 
approach I took is based on IRC conversation with jsm. Jsm, please 
correct me if I did not understood things correctly.

I tested this version on soft-float-64, soft-float-128 and native, a mac 
mini running fedora 8 and also on a chroot which supports real 

The test cases do pass for libjava and libffi. The test cases for libffi 
lack the abstraction for 'printf' on non fpu units. I'll adjust the test 
cases not to print floats, doubles or long doubles. This will be another 
patch to follow.

I'd really appreciate additional comments. Even an ack to commit :)

Thanks in advance.


2007-11-21  Andreas Tobler  <a.tobler@schweiz.org>

	PR libffi/31937
	* src/powerpc/ffitarget.h: Introduce new ABI FFI_LINUX_SOFT_FLOAT.
	Add local FFI_TYPE_UINT128 to handle soft-float long-double-128.
	* src/powerpc/ffi.c: Distinguish between __NO_FPRS__ and not and
	set the NUM_FPR_ARG_REGISTERS according to.
	Add support for potential soft-float support under hard-float
	(ffi_prep_args_SYSV): Set NUM_FPR_ARG_REGISTERS to 0 in case of
	FFI_LINUX_SOFT_FLOAT, handle float, doubles and long-doubles according
	(ffi_prep_cif_machdep): Likewise.
	(ffi_closure_helper_SYSV): Likewise.
	* src/powerpc/ppc_closure.S: Make sure not to store float/double
	on archs where __NO_FPRS__ is true.
	Add FFI_TYPE_UINT128 support.
	* src/powerpc/sysv.S: Add support for soft-float long-double-128.
	Adjust copyright notice.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sfld-20071121-1.diff
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20071121/8e77aa05/attachment.ksh>

More information about the Java-patches mailing list