On Tue, 25 Jul 2005, Ian Lance Taylor wrote:
... the struct maintains its 8-byte alignment even though nothing
inside of it requires 8-byte alignment any more.
When I try that with a powerpc-eabi compiler, it appears to generates
a struct with a size of 12 bytes and an alignment of 4 bytes. Do you
not see that with a Darwin compiler? What target are you configuring
for? What sources are you using?
This is a powerpc-darwin specific issue I believe. The Darwin ABI states
(roughly) that doubles have 4-byte alignment, unless they are the first
element of a structure (in which they have 8-byte alignment). I think
this is a holdover from AIX compatibility.
It is my guess that this ABI rule is overruling the user request, but I
don't really know how to go about verifying this, or working around it :(
-Chris
--
http://nondot.org/sabre/
http://llvm.org/