This is the mail archive of the gcc-help@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: __m128 data type *not* auto aligned with GCC. :-/


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.


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