From: Andrew Haley <aph@redhat.com>
To: Maurizio Vitale <maurizio.vitale@polymath-solutions.com>
Cc: tprince@myrealbox.com, gcc-help@gcc.gnu.org
Subject: Re: aligned attribute
Date: Fri, 22 Dec 2006 12:02:00 -0000 [thread overview]
Message-ID: <17803.51512.892150.964321@zebedee.pink> (raw)
In-Reply-To: <91D43B74-F194-401E-8AD3-6C7E5D29099E@polymath-solutions.com>
(top-posting fixed)
Maurizio Vitale writes:
>
> On Dec 21, 2006, at 4:23 PM, Tim Prince wrote:
>
> > Maurizio Vitale wrote:
> >> Thanks. Now to add to my confusion, on my system __alignof(long
> >> double) returns 16, which I presume means that all allocation,
> >> static, dynamic and automatic for long double objects are 16 byte
> >> aligned.
> >
> > This is a reasonable choice, that long doubles would be aligned for
> > good performance, unless the alignment is over-ridden by a packed
> > or reduced alignment specification.
>
> It is certainly reasonable, but if it is true it means that the
> compiler is capable on linux, x86_64 to impose a 16 byte alignment on
> some object for all type of allocations. Then I would expect an
> __attribute__ ((aligned (16)) for a user defined type to be obeyed as
> well.
>
> I haven't tested whether long doubles are actually allocated on 16
> byte boundaries in all case (global, auto and dynamic), mainly
> because the tests would be inconclusive, unless you see an alignment
> < 16.
>
> I just mentioned the data point to see if it did say anything to GCC
> developers.
Well, we don't know what question you're trying to ask. If you can be
specific, we'll give you an answer.
Andrew.
next prev parent reply other threads:[~2006-12-22 12:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-20 13:28 Maurizio Vitale
2006-12-20 13:37 ` Andrew Haley
2006-12-20 13:52 ` Maurizio Vitale
2006-12-21 21:23 ` Tim Prince
2006-12-21 21:31 ` Maurizio Vitale
2006-12-22 12:02 ` Andrew Haley [this message]
2006-12-22 13:16 ` Maurizio Vitale
2006-12-21 21:21 ` Tim Prince
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17803.51512.892150.964321@zebedee.pink \
--to=aph@redhat.com \
--cc=gcc-help@gcc.gnu.org \
--cc=maurizio.vitale@polymath-solutions.com \
--cc=tprince@myrealbox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).