1
/* $OpenBSD: bzero.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
3
* Written by J.T. Conklin <jtc@netbsd.org>.
7
#include <machine/asm.h>
14
cld /* set fill direction forward */
15
xorl %eax,%eax /* set fill data to 0 */
18
* if the string is too short, it's really not worth the overhead
19
* of aligning to word boundries, etc. So we jump to a plain
25
movl %edi,%ecx /* compute misalignment */
29
rep /* zero until word aligned */
32
movl %edx,%ecx /* zero by words */
38
L1: movl %edx,%ecx /* zero remainder by bytes */