Use stosl in memset; makes boot time bearable
This commit is contained in:
parent
e25b74ca80
commit
d0f3efca65
4
string.c
4
string.c
|
@ -4,6 +4,10 @@
|
|||
void*
|
||||
memset(void *dst, int c, uint n)
|
||||
{
|
||||
if ((int)dst%4 == 0 && n%4 == 0){
|
||||
c &= 0xFF;
|
||||
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
|
||||
} else
|
||||
stosb(dst, c, n);
|
||||
return dst;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue