This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Altivec + 16 byte alignment
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: gcc at gcc dot gnu dot org, gianni at scaramanga dot co dot uk, kenner at vlsi1 dot ultra dot nyu dot edu
- Date: Tue, 11 Feb 2003 14:59:33 -0500 (EST)
- Subject: Re: Altivec + 16 byte alignment
> /* Ignore alignment we can't do with expected alignment of the
> boundary. */
> if (alignment * BITS_PER_UNIT > PREFERRED_STACK_BOUNDARY)
> alignment = PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT;
>
> but really that's wrong, and at a minimum it should warn the user
> that their requested alignment isn't going to happen (better would be
> to just ensure the requested alignment). We occasionally get bug
> reports about this, but so far no-one has invested the effort to
> implement arbitrary stack alignment.
>
> Now we have *yet another* macro involved in alignment!
Another issue is GCC's alignment attribute is silently ignored for stack
locals and the documentation doesn't say that.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)