2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: prefetchmemory_asm.S
5 * PURPOSE: Memory functions
6 * PROGRAMMERS: Patrick Baggett (baggett.patrick@gmail.com)
7 * Alex Ionescu (alex@relsoft.net)
8 * Magnus Olsen (magnusolsen@greatlord.com)
11 .intel_syntax noprefix
13 /* GLOBALS ****************************************************************/
15 .globl @RtlPrefetchMemoryNonTemporal@8
17 /* FUNCTIONS ***************************************************************/
19 @RtlPrefetchMemoryNonTemporal@8:
20 ret /* Overwritten by ntoskrnl/ke/i386/kernel.c if SSE is supported (see Ki386SetProcessorFeatures() ) */
22 mov eax, [_Ke386CacheAlignment] // Get cache line size
24 // This is fastcall, so ecx = address, edx = size
26 prefetchnta byte ptr [ecx] // prefechnta(address)
27 add ecx, eax // address = address + cache_line_size
28 sub edx, eax // count = count - cache_line_size
29 ja fetch_next_line // goto fetch_next_line