Altivec + 16 byte alignment
John David Anglin
dave@hiauly1.hia.nrc.ca
Thu Feb 13 18:06:00 GMT 2003
> > When STACK_BOUNDARY is set to 64, there is one fill word in the frame
> > as a result of the starting frame offset and the need to align it to a
> > STACK_BOUNDARY. If STACK_BOUNDARY were set to 512, we would have 15
> > fill words.
>
> Eh? Is the stack pointer aligned or not?
The comment for STACK_BOUNDARY says "GCC for the PA always rounds its
stacks to a 8 * STACK_BOUNDARY boundary, but that happens late in the
compilation process." The final size and rounding is determined during
reload. This calculation is done in compute_frame_size. However, the
value returned is always rounded no matter when it is called. We add
in STARTING_FRAME_OFFSET if the frame pointer is needed or the size
returned by get_frame_size () is non-zero. We also add in space for
the outgoing args, register saves, etc.
Hmmm, I see a small bug. The rounding in compute_frame_size incorrectly
uses STACK_BOUNDARY. Based on our current methodology, it should be
using PREFERRED_STACK_BOUNDARY. However, this isn't the answer to your
question.
I will investigate to see why the above occurs.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
More information about the Gcc
mailing list