Altivec + 16 byte alignment
Geoff Keating
geoffk@geoffk.org
Tue Feb 11 18:59:00 GMT 2003
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> BIGGEST_ALIGNMENT is 128, but STACK_BOUNDARY is 64 unless you give
> -mabi=altivec (in 3.2+).
>
> I must say that I find this confusing. Although the documentation is
> unclear, I've always thought of BIGGEST_ALIGNMENT as being the largest
> alignment we can guarantee and I think there's code that depends on that.
BIGGEST_ALIGNMENT is defined in the documentation as:
`BIGGEST_ALIGNMENT'
Biggest alignment that any data type can require on this machine,
in bits.
> But if STACK_BOUNDARY < BIGGEST_ALIGNMENT, that's clearly not true.
I don't see that. The prologue can always try to align the stack
itself, although at some runtime cost. I think that's what
PREFERRED_STACK_BOUNDARY is all about.
> Has the definition changed?
It's been like this since at least 1997.
> If so, how *do* you find the largest alignment you can guarantee?
For error checking? MAX_OFILE_ALIGNMENT is probably the value you
want.
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc
mailing list