PATCH: libffi: improvements for MIPS o32.

Casey Marshall csm@gnu.org
Wed Jun 30 21:11:00 GMT 2004


Hi.

The attached patch expands on my previous patches to libffi for the
MIPS o32 ABI. It adds closure and exception unwinding support for this
architecture.

I have some questions about this, however:

  * It's been indicated that the ABI is different for software-only
    floating point architectures. I don't know how to handle this,
    though. Is this something an #ifdef can handle?

  * I'm using the `cacheflush' system call to flush the I-cache, but
    have been warned by the man page that that function is only
    available for MIPS. I don't know if this means "MIPS Linux", or if
    this system call is available on other OSes.

    I also see that on Linux this system call is totally inefficient
    (it flushes the entire cache, not just the region specified).

  * The libffi testsuite in mainline seems broken for my cross-compile
    setup. I have run the old `ffitest.c' test file (with the long
    long test enabled) and all tests pass.

  * gij isn't created when I make my cross gcc. I built and installed
    it on the target by hand, but don't know if tests that use it get
    missed.

Should I post my test results to gcc-testresults? Even though it is a
patched version? At any rate, I get the following results for libjava:

# of expected passes            2711
# of unexpected failures        24
# of expected failures          14
# of untested testcases         34

Comments greatly appreciated.


2004-06-30  Casey Marshall <csm@gnu.org>

	* src/mips/ffi.c (ffi_pref_cif_machdep): set `cif->flags' to
	contain `FFI_TYPE_UINT64' as return type for any 64-bit
	integer (O32 ABI only).
	(ffi_prep_closure): new function. 
	(ffi_closure_mips_inner_O32): new function.
	* src/mips/ffitarget.h: Define `FFI_CLOSURES' and
	`FFI_TRAMPOLINE_SIZE' appropriately if the ABI is o32.
	* src/mips/o32.S (ffi_call_O32): add labels for .eh_frame. Return
	64 bit integers correctly.
	(ffi_closure_O32): new function.
	Added DWARF-2 unwind info for both functions.

-- 
Casey Marshall || csm@gnu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffi-o32.patch
Type: text/x-patch
Size: 10560 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040630/2b11cc29/attachment.bin>


More information about the Java-patches mailing list