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: rearnsha at arm dot com
- Subject: Re: ARM: Invalid Stack Alignment BUG
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 15 Mar 2000 09:42:48 -0700
- cc: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>, rth at cygnus 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
- Reply-To: law at cygnus dot com
In message <200003151343.NAA08727@cam-mail2.cambridge.arm.com>you write:
>
> hubicka@atrey.karlin.mff.cuni.cz said:
> > 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.
>
> Just because the current implementation is not particularly efficient in
> terms of stack usage doesn't mean that the rounding should be done in the
> backend. Virtually every port has some definition for STACK_BOUNDARY, so
> it is a gross inefficiency if every port then has to also add code to
> correctly align the stack pointer. Besides which, if backends are making
> adjustments to the amount of stack space pushed, how are they to know that
> they haven't altered a vital offset? 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.
jeff