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: Altivec + 16 byte alignment


On Thu, Feb 13, 2003 at 01:14:30AM -0500, John David Anglin wrote:
> > PREFERRED_STACK_BOUNDARY is a suggestion.  The theory is that
> > *if* every object file is compiled with this, that we'll get
> > some speedup at runtime, due to fewer misalignment fixups.
> > 
> > But it is *not* ABI mandated, and you have to assume that 
> > someone somewhere may not honor this.
> 
> Yes, it is.

No.  That is not the purpose of PREFERRED_STACK_BOUNDARY.
The ABI mandated quantity is STACK_BOUNDARY.

> I guess you are saying that STACK_BOUNDARY really should be 512...

If that's what the ABI mandates, yes.

> Can you describe under what
> circumstances if any gcc will not be able to align to the preferred
> stack boundary?

None.  That's not the point.

> Looking at the documentation, it says that STACK_BOUNDARY should be set
> to the *minimum* alignment enforced by hardware for the stack pointer
> on the machine.  It doesn't say the ABI mandated value.

Then the docs need updating.

> 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?



r~


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