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 Tuesday, February 11, 2003, at 11:59 AM, John David Anglin wrote:
/* 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.
Let us agree that this is just a bug, or at least a bug for CPUs that have hard requirements of say 16 bytes (Altivec, SSE) and the user asks for 16 byte alignment and we silently only do 8 byte alignment.


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