This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ARM: Invalid Stack Alignment BUG
- To: Jeffrey A Law <law at cygnus dot com>, rth at cygnus dot com
- Subject: Re: ARM: Invalid Stack Alignment BUG
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Tue, 14 Mar 2000 22:55:24 +0100
- Cc: rearnsha at arm dot com, Craig Newell <CraigN at cheque dot uq dot edu dot au>, gcc-patches at gcc dot gnu dot org, hubicka at freesoft dot cz
- References: <200003131602.QAA16283@cam-mail2.cambridge.arm.com> <7188.953049162@upchuck>
>
> In message <200003131602.QAA16283@cam-mail2.cambridge.arm.com>you write:
> > Craig,
> >
> > Thanks for looking into this. However, I'm not convinced that it correct
> > to fix this in the back end (as I think you are implying). I haven't
> > checked in detail but my gut feeling is that if the stack-frame is
> > unaligned during reload, then unallocated pseudos may get pushed at
> > unaligned addresses, which could cause all sorts of carnage.
> >
> > Jan, why does cfun->stack_alignment_needed not have a minimum value of
> > STACK_BOUNDARY?
This is mistake. At time I was designing stack_alignment_needed I was thinking
exclusivly abou the needs of frame allocation on i386 and didn't checked
this at later while modifying reload. Sorry.
This was exactly situation we (Richard and I) wanted to avoid.
There is one purpose for doing the alignment to STACK_BOUNDARY in the backends
anyway. There may be ways to use remaing few bytes as well as current scheme
of aligning in reload is kind of wasting stack space (the stack boundary is
repetativly aligned, not only in the last iteration).
We was discussing this with Richard and I believe we concluded that proper
way to handle this is to modify backends, but we wanted to do this later,
so we did the "fix" to reload.
Honza
> Agreed. I can't think of any case where stack_alignment_needed should be
> less than STACK_BOUNDARY.
>
> jeff