ARM: Invalid Stack Alignment BUG
Richard Earnshaw
rearnsha@arm.com
Thu Mar 16 02:29:00 GMT 2000
> 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.
More information about the Gcc-patches
mailing list