memcpy performance (fnobuiltin)

Joel Sherrill
Wed Dec 10 13:28:00 GMT 1997

I am forwarding these to the newlib mailing list for comments.  If there
is something which can improved for the newlib or egcs RTEMS
configuration, then we would like to go ahead and get it in. :) 


On Wed, 10 Dec 1997, Eric Norum wrote:

> I just finished building the RTEMS/GNU tools with  
> Things turned out pretty much as I expected:
> A call to memcpy is now just that -- a call to the memcpy routine.   
> No more overhead of calling bcopy then memmove then checking for  
> overlap.  The loop in the memcpy routine is still byte-by-byte (and 5  
> instructions on a CPU32+) though.
> I think that -DTARGET_MEM_FUNCTIONS=1 should be part of the next  
> tools snapshot for RTEMS.
> The small change I suggested about rearranging the memcpy loop  
> reduces the byte-by-byte loop to 3 instructions.  Better, but still  
> lots of room for improvement! The `right' thing to do, of course, is  
> to redo the memcpy routine `right' so that it doesn't do byte-by-byte  
> and has low-level versions for architectures that would benefit  
> (like the CPU32+ loop-mode operation).
> ---
> Eric Norum                       
> Saskatchewan Accelerator Laboratory        Phone: (306) 966-6308
> University of Saskatchewan                 FAX:   (306) 966-6058
> Saskatoon, Canada.

More information about the Newlib mailing list