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. >
Hi Andrew, 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. 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. Many thanks, Andrew Walrond