This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why is DImode aligned at 8 byte for i386?


On Mon, Feb 04, 2008 at 12:24:33PM +0100, Jan Hubicka wrote:
> > 
> > -malign-double is (was?) indeed a performance improvement for
> > numerical applications on 32bits.  But DImode is still not 8 bytes aligned
> > there (which makes a next-gen 32bit ABI for 64bit x86 difficult there,
> > if you want to retain DImode/DFmode 8 byte alignment and re-use the
> > kernel 32bit compatibility layer).
> 
> Perhaps it was intended for numerical applications, but it is
> implemented by increasing maximal alignment that affect long long too.
> 
> I think H. J. hit it with this auto alignment branch and I would say
> that decreasing DImode alignment there to avoid long long triggering the
> prologue is good thing to do.
> 

Yes, I run into it on the stack alignment branch. It is not a big
deal. But it is a waste of space for no performance gain. However,
it does break i386 psABI.  We align DF scalar to 8 byte and DF
field in struct to 4 byte for i386.  Can we just align DI scalar
to 4 byte and leave DI field in struct unchanged for i386?

Thanks.

H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]