* __m128 data type *not* auto aligned with GCC. :-/
@ 2002-12-31 5:16 Ozzy
2002-12-31 7:11 ` Arunachalam G
0 siblings, 1 reply; 2+ messages in thread
From: Ozzy @ 2002-12-31 5:16 UTC (permalink / raw)
To: gcc-help
Hi,
I'm working on a port from a win32 prg to linux.
My last problem is due to automatic data alignment under VisualC++ or
ICC when u are
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??????
or
#pragma pack(push,16)
(may get same structure size but not exactly padded as it was intended)
or
the combination of both but it doesn't work aswell. ;)
Anyhow, any help is welcome on the subject! I hope that 3.3 will fix
that problem which makes Instrinsics code portability a real nightmare!
:)=
bye,
Ozzy.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: __m128 data type *not* auto aligned with GCC. :-/
2002-12-31 5:16 __m128 data type *not* auto aligned with GCC. :-/ Ozzy
@ 2002-12-31 7:11 ` Arunachalam G
0 siblings, 0 replies; 2+ messages in thread
From: Arunachalam G @ 2002-12-31 7:11 UTC (permalink / raw)
To: Ozzy; +Cc: gcc-help
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-31 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-31 5:16 __m128 data type *not* auto aligned with GCC. :-/ Ozzy
2002-12-31 7:11 ` Arunachalam G
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).