[RFC patch] libffi support for FreeBSD/PowerPC

Andreas Tobler toa@pop.agri.ch
Mon Jul 11 18:42:00 GMT 2005


Andreas Tobler wrote:
> Hi all,
> 
> the attached patch brings libffi support for FreeBSD/PowerPC. In the 
> core it is equal to the linux-ppc 32-bit port. But the thing which is 
> different, is the FreeBSD/PowerPC port supports the final SYSV 4 ABI 
> versus the draft one linux-ppc does. This means that small structures 
> (smaller or equal 8 bytes) are passed in r3/r4 instead of memory as 
> linux-ppc does.
> I tested the patch on FreeBSD/PowerPC and linux-ppc 32-bit. No 
> regressions. I do not have a 64-bit platform around. I'd appreciate if 
> one could give it a short run. Although I do not expect any fall out.
> 
> I'd like to point to test results, but unfortunately the FreeBSD/PowerPC 
>  port does not yet support Altivec which prevents me from running a make 
> -k check over the whole build. I need first to clean up/adjust the gcc 
> testsuite to NOT test Altivec tests on FreeBSD/PowerPC. (Which is not 
> that easy since we have tests which check Altivec directly.) GDB does it 
> better ....
> 
> A suitable CL will follow. I smoked my fbsd machine just before writing 
> the CL, with Altivec tests .....

Second try, added a CL and I also incorporated some feedback from dje. 
Less defines. Thanks David.

Andreas

2005-07-11  Andreas Tobler  <a.tobler@schweiz.ch>

	* Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
	* Makefile.in: Regenerate.
	* configure.ac: Add POWERPC_FREEBSD rules.
	* configure: Regenerate.
	* src/powerpc/ffitarget.h: Add POWERPC_FREEBSD rules.
	(FFI_SYSV_TYPE_SMALL_STRUCT): Define.
	* src/powerpc/ffi.c: Add flags to handle small structure returns
	in ffi_call_SYSV.
	(ffi_prep_cif_machdep): Handle small structures for SYSV 4 ABI.
	Aka FFI_SYSV.
	(ffi_closure_helper_SYSV): Likewise.
	* src/powerpc/ppc_closure.S: Add return types for small structures.
	* src/powerpc/sysv.S: Add bits to handle small structures for
	final SYSV 4 ABI.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fbsd-libffi-20050711.diff
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050711/b6ef2f04/attachment.ksh>


More information about the Java-patches mailing list