This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: function parms in regs, patch 3 of 3


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


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