Re: aligned attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(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.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux