This is the mail archive of the gcc@gcc.gnu.org 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]: Stack alignment


> Right.  This is because you need to keep the stack aligned, so you can
> never have an empty frame.  Which brings us back to a variant of the
> previous poster's question: is the stack pointer supposed to be
> aligned, or not?

I have one additional point.  The alignment that reload does aligns
the stack to BIGGEST_ALIGNMENT.  This is an alignment suitable for
any local.  What the request doesn't do is align the stack to
STACK_BOUNDARY or PREFERRED_STACK_BOUNDARY.  If these are larger
than BIGGEST_ALIGNMENT, then the stack won't be properly aligned
unless the backend fixes the alignment.

I am questioning whether it is necessary to align the stack for locals
when there aren't any locals.  I am convinced that's not necessary on
the PA due to the way that we align the stack and what happens when
we have no frame.  If we have to make STARTING_FRAME_OFFSET a multiple
of BIGGEST_ALIGNMENT / 8 or whatever is needed to ensure that no
alignment occurs, then we have to waste space in every frame.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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