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: Richard Henderson <rth at cygnus dot com>
- Subject: Re: ARM: Invalid Stack Alignment BUG
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Thu, 16 Mar 2000 10:28:29 +0000
- Cc: Jeffrey A Law <law at cygnus dot com>, Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>, Craig Newell <CraigN at cheque dot uq dot edu dot au>, gcc-patches at gcc dot gnu dot org, hubicka at freesoft dot cz
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
> On Wed, Mar 15, 2000 at 09:42:48AM -0700, Jeffrey A Law wrote:
> > > IMO this must be handled in a
> > > machine independent manner, based on the information already supplied.
> > Agreed, if we are losing space due to inconvenient rounding, then we should
> > find a describe when rounding should occur so that we can write the code
> > once in the generic parts of the compiler rather than over and over again
> > in every backend.
>
> "Over and over"? One line for an alignment?
in at least three different places in every backend:
INITIAL_ELIMINATION_OFFSET, gen_prologue, gen_epilogue (or equivalent
alternatives). It's not even the same functions in each backend.
>
> The only way to do the rounding correctly not in the back end
> is to do the entire frame layout not in the back end. Rounding
> just the size of the local variable store is _always_ not the
> right thing to do. Ideally you want to round the size of the
> entire frame -- locals, save regs, outgoing args, varargs spill
> and everything.
But it still seems nonsensical to tell MI part of the compiler that I need
an aligned stack frame and to then have to align the stack frame myself.
How do I know that by adjusting the frame size I'm not breaking
assumptions built into the generated rtl?
Maybe its just a matter of creating get_rounded_frame_size() and telling
backend writers to use that (rather than get_frame_size()). But this
would still be a cleaner abstraction than the current mess.
R.