This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] libffi support for CRIS
- From: Simon Posnjak <simon dot posnjak at siol dot net>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, java-patches at gcc dot gnu dot org,green at redhat dot com
- Date: Mon, 08 Nov 2004 08:59:23 +0100
- Subject: Re: [PATCH] libffi support for CRIS
- Organization: ACME
- References: <1098703798.10993.29.camel@matilda.kranj.cetrtapot.si> <Pine.BSF.4.58.0410251900210.26076@dair.pair.com> <1098789150.5095.248.camel@matilda.kranj.cetrtapot.si> <Pine.BSF.4.58.0410272224530.86355@dair.pair.com> <1098956572.7120.106.camel@matilda.kranj.cetrtapot.si> <Pine.BSF.4.58.0410290755130.74648@dair.pair.com>
V sob, 06.11.2004 ob 18:48 je Hans-Peter Nilsson napisal(a):
> Huh, again sent as an attachment, not in-text. It takes a
> little longer to review it this way. Though that's not the
> main reason for this delay, sorry.
It's my dam mailer. I told it, it should send the attachments in-line
but is still does not do it (copy&past makes a mess of the patch).
Sorry.
> > > > +ffi_status
> > > > +ffi_prep_cif_machdep (ffi_cif * cif,
> > >
> > > > + if ((cif->rtype->size == 0)
> > > > + && (initialize_aggregate (cif->rtype) != FFI_OK))
> > >
> > > Don't you mean initialize_aggregate_packed_struct here?
> > No, thats correct - this one works on aligned parameters, not packed.
>
> What do you mean by that? The return value doesn't have any
> different layout than parameters; it's "packed" too. I see no
> reason to not call initialize_aggregate_packed_struct there.
There was a reason why I left that in, but i can not recall what it was.
Does the ffitest (or the test-suite) work if you comment it out? [I
would try it myself but i really do not have the time to do it right
now]
> > > > + ;; Used for stack pointer saving.
> > > > + push $r8
> > >
> > > Still suboptimal register allocation, wrt. my earlier movem comment.
> > This is still open. I do not have the time (and my knowledge of CRIS asm
> > is not that good) to fix it right now. (I tried a quick fix but I am
> > getting just segfaults).
>
> If you care to revisit some time, look at output from an -O2
> compilation.
OK, I will look in to it when I find the time.
Regards Simon