2 * Written by J.T. Conklin <jtc@NetBSD.org>.
4 * Adapted for NetBSD/x86_64 by Frank van der Linden <fvdl@wasabisystems.com>
7 #include <machine/asm.h>
11 RCSID("$NetBSD: memset.S,v 1.3 2004/02/26 20:50:06 drochner Exp $")
20 cld /* set fill direction forward */
23 * if the string is too short, it's really not worth the overhead
24 * of aligning to word boundries, etc. So we jump to a plain
30 movb %al,%ah /* copy char to all bytes in word */
39 movq %rdi,%rdx /* compute misalignment */
45 movq %rdx,%rcx /* set until word aligned */
50 shrq $3,%rcx /* set by words */
54 movq %r8,%rcx /* set remainder by bytes */
63 .section .note.GNU-stack,"",%progbits