Remove this copy of bzero().

This commit is contained in:
mycroft 1998-02-22 08:19:05 +00:00
parent 52541a2efb
commit 5a22434af5

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.187 1998/02/10 14:11:17 mrg Exp $ */
/* $NetBSD: locore.s,v 1.188 1998/02/22 08:19:05 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1997
@ -2325,75 +2325,3 @@ syscall1:
#include <i386/isa/vector.s>
#include <i386/isa/icu.s>
/*
* bzero (void *b, size_t len)
* write len zero bytes to the string b.
*/
ENTRY(bzero)
pushl %edi
movl 8(%esp),%edi
movl 12(%esp),%edx
cld /* set fill direction forward */
xorl %eax,%eax /* set fill data to 0 */
/*
* if the string is too short, it's really not worth the overhead
* of aligning to word boundries, etc. So we jump to a plain
* unaligned set.
*/
cmpl $16,%edx
jb 7f
movl %edi,%ecx /* compute misalignment */
negl %ecx
andl $3,%ecx
subl %ecx,%edx
rep /* zero until word aligned */
stosb
#if defined(I486_CPU)
#if defined(I386_CPU) || defined(I586_CPU) || defined(I686_CPU)
cmpl $CPUCLASS_486,_cpu_class
jne 8f
#endif
movl %edx,%ecx
shrl $6,%ecx
jz 8f
andl $63,%edx
1: movl %eax,(%edi)
movl %eax,4(%edi)
movl %eax,8(%edi)
movl %eax,12(%edi)
movl %eax,16(%edi)
movl %eax,20(%edi)
movl %eax,24(%edi)
movl %eax,28(%edi)
movl %eax,32(%edi)
movl %eax,36(%edi)
movl %eax,40(%edi)
movl %eax,44(%edi)
movl %eax,48(%edi)
movl %eax,52(%edi)
movl %eax,56(%edi)
movl %eax,60(%edi)
addl $64,%edi
decl %ecx
jnz 1b
#endif
8: movl %edx,%ecx /* zero by words */
shrl $2,%ecx
andl $3,%edx
rep
stosl
7: movl %edx,%ecx /* zero remainder bytes */
rep
stosb
popl %edi
ret