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]

Re: __attribute__((aligned(16)) on x86


* 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!!


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