This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __attribute__((aligned(16)) on x86
- To: mike stump <mrs at windriver dot com>
- Subject: Re: __attribute__((aligned(16)) on x86
- From: "Ryan T. Sammartino" <ryants at home dot com>
- Date: Mon, 30 Jul 2001 09:39:03 -0700
- Cc: aoliva at redhat dot com, gcc at gcc dot gnu dot org
- References: <200107301531.IAA23235@kankakee.wrs.com>
* mike stump <mrs@windriver.com> [30/07/2001 08:33]:
> > Aligning the stack is no good, since if I do something like:
>
> > char c;
> > vector v1;
>
> > my vector will be misaligned by sizeof(char).
>
> You misunderstand. Examine how alignment of global data can work
> with:
>
> char c;
> double d;
>
> Hint, you pack c with and around other small things, and put d on an 8
> boundary.
Of course... let this be a lesson... don't reply to e-mail late at night
or after 16 hour work days :)
At any rate, -mpreferred-stack-boundary (or whatever it's called) didn't
work for me... the only way I could get v1, v2 and ret to align properly
was to either declare them static or insert some dummy "int"
declarations (see GNATs 3299)
Thanks for the clarification
--
Ryan T. Sammartino
http://members.home.net/ryants/
Here I am in 53 B.C. and all I want is a dill pickle!!