On Fri, 1 Apr 2011, H.J. Lu wrote: > On Fri, Apr 1, 2011 at 4:49 AM, Joseph S. Myers <jos...@codesourcery.com> > wrote: > > On Thu, 31 Mar 2011, H.J. Lu wrote: > > > >> Hi, > >> > >> I'd like to bump the default alignment of complex float from 4 byte > >> to 8 byte. ADJUST_ALIGNMENT doesn't work since SC is a stand > >> mode. Is that OK to update mode_base_align directly? > > > > What do you mean by "default alignment"? You can't change the alignment > > in ABI terms, or that returned by alignof; the alignment of complex types > > is required to be the same as that of "an array type containing exactly > > two elements of the corresponding real type". > > > > My ABI uses 8byte alignment for SCmode. How can I do that?
That is not a valid ABI for ISO C, supposing that SCmode is _Complex float, unless float also uses 8-byte alignment (and the representation of _Complex float must be the same as that of float[2], as well as the alignment, meaning that it would be at least 16 bytes in that case). You can do what you like in registers, or choose to align variables for optimization to more than the ABI-specified alignment, but you need to keep the in-memory representation and alignment of _Complex float the same as that of float[2]. -- Joseph S. Myers jos...@codesourcery.com