This is the mail archive of the 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: [PATCH] Alignment and split function args

On Friday 27 February 2004 4:23 am, Ian Lance Taylor wrote:
> Paul Brook <> writes:
> > I've run into a problem with argument alignment when function arguments
> > are split between registers and memory.
> ...
> > AFAICS arm(iwmmxt) is the only target currently effected. All other ports
> > either have STACK_BOUNDARY == PREFERRED_STACK_BOUNDARY or do not allow
> > splitting of args between registers and memory.
> I spent a little while poking at this problem a couple of weeks ago.
> Does your patch fix gcc.c-torture/execute/20030914-1.c for iWMMXt?

Yes, it does.

> Have you looked at this thread:
> ?

No, I'd not seen this. I can however confirm that the code generated for that 
case is still the same.

> Does it bother anybody that both function.c and calls.c define the
> macro STACK_BYTES, but that the definition is different in the two
> files?
> > The other alternative is to make pretend_args a multiple of
> > PREFERRED_STACK_BOUNDARY. This would waste stack space for no good
> > reason.
> It seems to me that that would change the ABI.
> > +	      /* We assume at most one partial arg, and it must be the first
> > +	         argument on the stack.  */
> > +	      if (extra_pretend_bytes || current_function_pretend_args_size)
> > +		abort ();
> Is this assumption true for MIPS EABI, which counts integer and
> floating point registers separately?

I'm not sure, but that assummption was already implicit in the code. I just 
made it explicit.


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