movq %r8 ,%rax /* returns its first argument */
ret
+/*
+ * void *memset_word(void * addr, int pattern, size_t length)
+ */
+
+ENTRY(memset_word)
+ movq %rdi, %r8
+ movq %rsi, %rax /* move pattern (arg2) to rax */
+ mov %eax, %ecx
+ shlq $32,%rax
+ orq %rcx, %rax
+ cld /* reset direction flag */
+ movq %rdx, %rcx /* mov quads first */
+ shrq $1, %rcx
+ rep
+ stosq
+ movq %rdx,%rcx /* if necessary, mov 32 bit word */
+ andq $1,%rcx
+ rep
+ stosl
+ movq %r8 ,%rax /* returns its first argument */
+ ret
+
/*
* void bzero(char * addr, size_t length)
*/
Entry(blkclr)
-ENTRY(bzero)
+ENTRY2(bzero,__bzero)
movq %rsi,%rcx
xorq %rax,%rax
shrq $3,%rcx