Dave Korn wrote:
> >   "a long double member within a structure or union shall start at the
> >    lowest available offset aligned on a 16byte boundary"

>   It only implies that the offset should be such a multiple, but since the
> struct itself will have to be aligned to a multiple of 16 if any of its
> members have to be aligned to a multiple of 16 (at least according to the C
> language rules), it works out the same: the base address is aligned, the
> offset is aligned because of the paragraph above, so the actual member
> address (offset + base) is also aligned.

 Humm, doesn't "member has to be aligned on a multiple of X" apply to the
 address of the member ? 
 
 My understanding was that the maximum of those member address alignment
 constraints have to be propagated to the aggregate to be translatable into
 local constraints on offsets.
 
 Actually the whole EABI paragraph reads:

 "Unlike the SVR4 ABI, an array, structure or union containing a long double
  shall start aligned on an 8 byte boundary. However, as in the SVR4 ABI, a
  long double member within a structure or union shall start at the lowest
  available offset aligned on a 16byte boundary, and the size of the structure
  or union with a long double member shall be a multiple of 16 bytes."

 What I find very surprising is that statisfying an EABI rule on long double
 offsets in aggregates has to translate into painful to maintain constraints
 on the stack pointer just contrary to one of the EABI major points (relaxing
 the stack pointer alignment).

 Thanks for your feedback,

 Olivier

Reply via email to