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: help interpreting gcc 4.1.1 optimisation bug


andrew@walrond.org writes:
 > On Tue, Jun 13, 2006 at 12:01:39PM +0100, Andrew Haley wrote:
 > > 
 > > All you've got here is an inline asm version of 
 > > 
 > > inline void longcpy(long* _dst, long* _src, unsigned _numwords)
 > > {
 > >   __builtin_memcpy (_dst, _src, _numwords * sizeof (long));
 > > }
 > > 
 > > which gcc will optimize if it can.  
 > > 
 > > These days, "rep movs" is not as advantageous as it once was, and you
 > > may get better performance by allowing gcc to choose how to do memory
 > > copies.
 > 
 > Actually, I knew this, but I was using longcpy as a bellwether
 > of many more complex inline-asm functions in a c++ big integer
 > library.

OK.  I'm used to seeing random bits of inline asm that might have made
sense Once Upon A Time but now only serve to slow down a program!

 > I've just finished a trawl through the entire library, fixing a Good
 > Many Things which I now know (thanks to you guys) could really confuse
 > the optimiser.

That's great.

Andrew.


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