This is the mail archive of the
mailing list for the GCC project.
Re: IA64 alignment problem / how to fix?
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 20 Jan 2005 09:26:41 -0800 (PST)
- Subject: Re: IA64 alignment problem / how to fix?
> From: Richard Henderson <email@example.com>
> On Wed, Jan 19, 2005 at 09:46:39AM -0800, Steve Ellcey wrote:
> > The other way I think I can fix it is to have ia64_function_arg return a
> > PARALLEL instead of a regular REG for it's argument. However when I
> > tried this (removed the size check in ia64_function_arg and always
> > returned a PARALLEL for structures on big-endian machines) my bootstrap
> > broke. This also generates less efficient code because assumes the
> > memory location is not aligned and does more stores and has other code
> > to compensate for that fact.
> Yes. And I think that move_block_from_reg should be fixed so that
> it generates this same less efficient code. Anything less is leaving
> this latent bug for someone else to fix later.
OK, maybe you could help me on a couple of points. Currently it looks
like ia64_function_arg returns a single register when it has an
aggregate argument that is larger then one register. I need to return a
parallel for HP-UX to handle the alignment issue, should I also return a
parallel for such aggregates on IA64 Linux? It seems to be working
without it but returning a parallel seems like it is the right thing to
do for aggregates larger then one register on both OS's.
As to move_block_from_reg, it looks like the only places it gets called
from are in function.c and I *think* that if ia64_function_arg and
ia64_function_value always return PARALLEL's for aggregates then
move_block_from_reg will never get called to copy aggregates (or for
anything else as near as I can tell).