- Add ss2_pagezero() for zeroing pages using the movnti instruction. This
instruction is enabled with SSE2 but does not use SSE registers. It is a "non-temporal" move which bypasses the cache and does not dirty lines.
This commit is contained in:
parent
a93020d7a1
commit
977f9ab515
@ -350,6 +350,20 @@ intreg_i586_bzero:
|
||||
ret
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
ENTRY(sse2_pagezero)
|
||||
pushl %ebx
|
||||
movl 8(%esp),%ecx
|
||||
movl %ecx,%eax
|
||||
addl $4096,%eax
|
||||
xor %ebx,%ebx
|
||||
1:
|
||||
movnti %ebx,(%ecx)
|
||||
addl $4,%ecx
|
||||
cmpl %ecx,%eax
|
||||
jne 1b
|
||||
popl %ebx
|
||||
ret
|
||||
|
||||
ENTRY(i686_pagezero)
|
||||
pushl %edi
|
||||
pushl %ebx
|
||||
|
@ -93,6 +93,7 @@ void i586_bzero(void *buf, size_t len);
|
||||
int i586_copyin(const void *udaddr, void *kaddr, size_t len);
|
||||
int i586_copyout(const void *kaddr, void *udaddr, size_t len);
|
||||
void i686_pagezero(void *addr);
|
||||
void sse2_pagezero(void *addr);
|
||||
void init_AMD_Elan_sc520(void);
|
||||
int is_physical_memory(vm_offset_t addr);
|
||||
vm_paddr_t kvtop(void *addr);
|
||||
|
Loading…
Reference in New Issue
Block a user