On Sun, May 20, 2001 at 07:02:06PM -0400, Kevin Lawton wrote:
> In 'kernel/util-nexus.c', there are some simple routines which
> could use some asm speedups (memzero/memcpy/memset).
>
> Last time I checked, there's some code in the Linux kernel
> that you could base it on.
See these, too (i686 optimized):
http://cvs.gnu.org/cgi-bin/cvsweb/glibc/sysdeps/i386/i686/memcpy.S?rev=1.3&content-type=text/x-cvsweb-markup
http://cvs.gnu.org/cgi-bin/cvsweb/glibc/sysdeps/i386/i686/memset.S?rev=1.4&content-type=text/x-cvsweb-markup
Although the Linux stuff seems nicer...
MMX memcpy:
http://lxr.linux.no/source/arch/i386/lib/mmx.c?v=2.4.4#L29
normal memcpy:
http://lxr.linux.no/source/include/asm-i386/string.h#L199
memset:
http://lxr.linux.no/source/include/asm-i386/string.h?v=2.4.4#L388
memzero is defined in terms of memset:
http://lxr.linux.no/source/arch/i386/boot/compressed/misc.c#L24
But if util-nexus is ever used in kernel-space (and it seems it is),
it should use the ones the Linux asm-i386 headers provide instead of
defining its own.