2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Kernel
4 * FILE: ntoskrnl/rtl/i386/stack.s
5 * PURPOSE: Stack Support for RTL
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
9 /* INCLUDES ******************************************************************/
14 EXTERN _KePrefetchNTAGranularity:DWORD
16 /* FUNCTIONS *****************************************************************/
19 PUBLIC _RtlpGetStackLimits@8
20 _RtlpGetStackLimits@8:
22 /* Get the current thread */
23 mov eax, [fs:KPCR_CURRENT_THREAD]
25 /* Get the stack limits */
26 mov ecx, [eax+KTHREAD_STACK_LIMIT]
27 mov edx, [eax+KTHREAD_INITIAL_STACK]
28 sub edx, SIZEOF_FX_SAVE_AREA
41 PUBLIC @RtlPrefetchMemoryNonTemporal@8
42 @RtlPrefetchMemoryNonTemporal@8:
45 * Kernel will overwrite this to 'nop' during init
46 * if prefetchnta is available. Slight optimization
47 * as compared to checking KeI386XMMIPresent for every call.
52 mov eax, [_KePrefetchNTAGranularity]
54 /* Prefetch this line */
56 prefetchnta byte ptr [ecx]
58 /* Update address and count */
62 /* Keep looping for the next line, or return if done */