From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Lehmann To: egcs@cygnus.com Subject: Re: [EGCS] Re: double alignment patch for x86 Date: Sun, 17 Aug 1997 21:48:08 -0000 Message-id: In-reply-to: 199708171940.PAA05296@jfc. X-SW-Source: 1997-08/0049.html John Carr wrote: > >byte alignment. 8 byte alignment is desirable (and has always been -- >Sun made a bad choice 10 years ago). gcc copies misaligned double >arguments to aligned locations on the stack. Doing this on x86 might I thinkt the patch already does this with -mstack-align-double the (broken) -marg-align-double is just to squeeze out the last bit of performance ;) >help performance without breaking compatibility (or it might not: on x86 >there is only a cost if the dynamic value of the pointer is not aligned >but SPARC requires two instructions instead of one to support possibly >misaligned pointers). It takes 2 additional cycles per double access.. this can sum up to 30% runtime penalty on important algorithms like matrix multiply... It was a actually physicist that actually pointed this out to me (and H.J.Lu for the libc, I believe). -----==- ----==-- _ ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / pcg@goof.com -=====/_/_//_/\_,_/ /_/\_\ The choice of a GNU generation