Altivec + 16 byte alignment
Neil Booth
neil@daikokuya.co.uk
Tue Feb 11 22:03:00 GMT 2003
Geoff Keating wrote:-
> > Isn't an even better place to do it in the front end, just after parsing
> > the alignment request?
>
> You could do it if you discovered that a user-requested stack local
> needed more alignment than assign_stack_local can currently give,
> but it's not clear to me that the front end will always have that
> information, and certainly it doesn't have it when it's just seen the
> alignment request; consider
>
> struct foo {
> int x __attribute__((aligned (512)));
> }
>
> which might, or might not, end up on the stack.
You could diagnose that when the object of that type is declared, just
like we have to make other checks (particularly in C++) at that time.
Neil.
More information about the Gcc
mailing list