2008-08-17 18:01:49 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Kernel
|
2015-10-04 11:54:25 +00:00
|
|
|
* FILE: ntoskrnl/rtl/i386/stack.S
|
2008-08-17 18:01:49 +00:00
|
|
|
* PURPOSE: Stack Support for RTL
|
|
|
|
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
#include <asm.inc>
|
|
|
|
#include <ks386.inc>
|
2008-08-17 18:01:49 +00:00
|
|
|
|
2015-09-01 19:51:52 +00:00
|
|
|
EXTERN _KePrefetchNTAGranularity:DWORD
|
|
|
|
|
2008-08-17 18:01:49 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
2010-11-27 22:12:15 +00:00
|
|
|
.code
|
2008-08-17 18:01:49 +00:00
|
|
|
|
2015-09-01 19:51:52 +00:00
|
|
|
PUBLIC @RtlPrefetchMemoryNonTemporal@8
|
|
|
|
@RtlPrefetchMemoryNonTemporal@8:
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Kernel will overwrite this to 'nop' during init
|
|
|
|
* if prefetchnta is available. Slight optimization
|
|
|
|
* as compared to checking KeI386XMMIPresent for every call.
|
|
|
|
*/
|
|
|
|
ret
|
|
|
|
|
|
|
|
/* Get granularity */
|
|
|
|
mov eax, [_KePrefetchNTAGranularity]
|
|
|
|
|
|
|
|
/* Prefetch this line */
|
|
|
|
FetchLine:
|
|
|
|
prefetchnta byte ptr [ecx]
|
|
|
|
|
|
|
|
/* Update address and count */
|
|
|
|
add ecx, eax
|
|
|
|
sub edx, eax
|
|
|
|
|
|
|
|
/* Keep looping for the next line, or return if done */
|
|
|
|
ja FetchLine
|
|
|
|
ret
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
END
|