libc patch: update of memcpy et al
The patch below bring the performance of memcpy(), memmove(), bcopy(), and bzero() up to more reasonable levels. I haven't run this through "make check", but I believe the changes to be OK.
Thanks,
--david
ChangeLog
2001-05-22 David Mosberger <[email protected]>
* sysdeps/ia64/memmove.S: Increase MEMLAT from 6 to 21 for better performance.
* sysdeps/ia64/memcpy.S: Ditto.
* sysdeps/ia64/bcopy.S: New file.
* sysdeps/ia64/bzero.S: New file (derived from memset.S).
Index: sysdeps/ia64/memcpy.S
=================================RCS file: /cvs/glibc/libc/sysdeps/ia64/memcpy.S,v retrieving revision 1.6
ia64/memcpy.S +4 -2
@@ -68,10 +68,12 @@ br.ctop.sptk .loop##shift ; \ br.cond.sptk .cpyfew ; /* deal with the remaining bytes */ +#define MEMLAT 21 +#define Nrot (((2*MEMLAT+3) + 7) & ~7) + ENTRY(memcpy) .prologue - alloc r2 = ar.pfs, 3, 16 - 3, 0, 16 -#include "softpipe.h" + alloc r2 = ar.pfs, 3, Nrot - 3, 0, Nrot .rotr r[MEMLAT + 2], q[MEMLAT + 1] .rotp p[MEMLAT + 2] mov ret0 = in0 // return value = dest
Index: sysdeps/ia64/memmove.S
=================================RCS file: /cvs/glibc/libc/sysdeps/ia64/memmove.S,v retrieving revision 1.3
ia64/memmove.S +19 -5
@@ -67,10 +67,12 @@ br.ctop.sptk .loop##shift ; \ br.cond.sptk .cpyfew ; /* deal with the remaining bytes */ -ENTRY(memmove) +#define MEMLAT 21 +#define Nrot (((2*MEMLAT+3) + 7) & ~7) + +ENTRY(__memmove) .prologue - alloc r2 = ar.pfs, 3, 29, 0, 32 -#include "softpipe.h" + alloc r2 = ar.pfs, 3, Nrot - 3, 0, Nrot .rotr r[MEMLAT + 2], q[MEMLAT + 1] .rotp p[MEMLAT + 2] mov ret0 = in0 // return value = dest
@@ -235,6 +237,8 @@ data8 .loop56 - .loop40 data8 .loop56 - .loop48 data8 .loop56 - .loop56 + +END(__memmove) -END(memmove) +weak_alias(__memmove, memmove) --- /dev/null Sat Mar 24 01:35:12 2001 +++ sysdeps/ia64/bcopy.S Tue May 22 00:14:54 2001
@@ -0,0 +1,10 @@ +#include <sysdep.h> + +ENTRY(bcopy) + .regstk 3, 0, 0, 0 + mov r8 = in0 + mov in0 = in1 + ;; + mov in1 = r8 + br.cond.sptk.many __memmove +END(bcopy)
ia64/bzero.S new file +94 -0
94 lines not on this page · raw message