This is the mail archive of the libffi-discuss@sourceware.cygnus.com mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Support for sparc-*-linux* and sparc64-*-linux*


On Sun, Apr 16, 2000 at 07:12:45PM -0700, Anthony Green wrote:
> 
> Jakub wrote:
> > Following patch adds support for 32bit and 64bit SPARC Linux targets.
> 
> Excellent - thanks!
> 
> I'm about to commit it to both the libgcj and libffi trees.
> 
> The libffi tree is a little out of date - as most of the innovation is
> going directly into libgcj/libffi.  However, I think things have
> settled down enough that I'll check this all back into the libffi
> tree.

I forgot to mention, the code was written against libffi checked out from
libgcj CVS module.

> 
> Closures have been added to libffi in support of the gcj java
> interpreter.  So far they've only been ported to x86 and ia-64.  A
> sparc port would be wonderful (hint hint).  See
> http://sourceware.cygnus.com/java.

Ok, when I get some time spot for it, I'll do it.
My primary goal was to get the whole libgcj working on sparc*-*-linux*, but
it seems like the boehm GC does not work there (at least it does not pass
the testsuite at all). I have changed the obvious things in the config
headers but due to size of the code I had no time to actually study how
exactly is it supposed to work and why it does not work. Does it work on
Solaris?

> 
> > I wonder also why FFI_TYPE_UNION type is missing. If it ever gets added,
> > then FFI_V9 structure/union returning code will have to be changed slightly
> > (any union part of structure/union is passed only in integer registers,
> 
> Interesting.  What about structure fields?  So far we've been handling
> all aggregate types as if they were structs.

This is only relevant to structures/unions as return values up to 32 bytes.
The ABI sais in that case they are returned in registers, depending on the
type of the field either in a part/whole integer register or in a floating
point register. For unions the ABI sais that all data within that union is
passed in integer registers, no matter if e.g. the whole union contains only
floating point values.
The type of the field matters for structure arguments as well (in this case
only up to 16 bytes, otherwise it is passed by reference), but in that case
the ffi asm code propagates the stack data into both integer and fpu
registers, so it does not actually matter.

	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]