This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: function parms in regs, patch 3 of 3
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jim Wilson <wilson at tuliptree dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 2 May 2003 22:08:30 +0930
- Subject: Re: function parms in regs, patch 3 of 3
- References: <20030424153446.GZ1189@bubble.sa.bigpond.net.au> <20030430132857.GJ25514@bubble.sa.bigpond.net.au> <3EB1E09E.7090307@tuliptree.org>
On Thu, May 01, 2003 at 11:06:06PM -0400, Jim Wilson wrote:
> FUNCTION_ARG does have enough info. If the PARALLEL stuff had 3 items
> location/size/alignment instead of the current 2 location/size, then I
> believe we could fix this problem, your powerpc problem, and probably
> also some ABI problems in other ports that we may or may not know about.
I like the idea. It would be nice if the called function could use
the regs in a parallel without copying to the stack too, at least for
simple cases. eg. for
struct it { char c[3]; };
int foo (struct it x) { return x.c[0]; }
I get
.foo:
sldi 3,3,40
std 3,48(1)
lbz 3,48(1)
blr
when we could dispense with the store to the stack and just have
.foo
rldicl 3,3,48,56
blr
> Having said that, I really should take a closer look at the patch to see
> what it actually does. And I need to look at the second patch of the set.
The second patch doesn't do much besides move code around and a little
tidying. The last patch is really about honouring FUNCTION_ARG_PADDING
in all cases. See the comment added to rs6000.c:function_arg_padding.
--
Alan Modra
IBM OzLabs - Linux Technology Centre