This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __m128 data type *not* auto aligned with GCC. :-/
- From: Arunachalam G <arunachalam at deeproot dot co dot in>
- To: Ozzy <ozzy at orkysquad dot org>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Tue, 31 Dec 2002 19:44:12 +0530 (IST)
- Subject: Re: __m128 data type *not* auto aligned with GCC. :-/
- References: <3E10976D.4C6D8653@orkysquad.org>
Hi,
On Mon, 30 Dec 2002, Ozzy wrote:
> Hi,
>
[...]
> using __m128 data types inside your sets of structures. In fact, i
> haven't been able to get
> the right/same structure bytes fields organisation with GCC while using
> :
> __attribute__((aligned(16)))
> is this aligning something??????
>
Yes, this does aligning if the object globally visible.
eg.
int gi __attribute__ ((aligned(128)));
main()
{
int i __attribute__ ((aligned(128)));
}
the variable gi will be aligned to 128bytes boundary not the
variable i even though it is requested. You can check this with
__alignof__ operator. Alignment can't be done in stack area.
Sincerely,
Arunachalam.