Separated math and memory functions into their own files to limit the amount of objec...
[reactos.git] / reactos / lib / rtl / i386 / fillmemory_ulong_asm.s
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: fillmemory_ulong_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)
9 */
10
11 .intel_syntax noprefix
12
13 /* GLOBALS ****************************************************************/
14
15 .globl _RtlFillMemoryUlong@12 // (no bug) (max optimze code)
16
17 /* FUNCTIONS ***************************************************************/
18
19 _RtlFillMemoryUlong@12:
20 mov ecx, dword [esp + 8 ] // Length
21 shr ecx,2// Length = Length / sizeof(ULONG)
22 jz 1f // if (Length==0) goto .zero
23
24 push edi
25 mov edi, dword [esp + (4 + 4)] // Destination
26 mov eax, dword [esp + (12 + 4)] // Fill
27 cld
28 rep stosd// while (Length>0) {Destination[Length-1]=Fill// Length = Length - 1}
29 pop edi
30 1:
31 ret 12