]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMemRep4.asm
Maintainers.txt: Remove EdkCompatibilityPkg information
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / Ia32 / EfiZeroMemRep4.asm
CommitLineData
c1ea912c 1;/*++\r
2;\r
4ea9375a
HT
3;Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
4;This program and the accompanying materials \r
c1ea912c 5;are licensed and made available under the terms and conditions of the BSD License \r
6;which accompanies this distribution. The full text of the license may be found at \r
7;http://opensource.org/licenses/bsd-license.php \r
8; \r
9;THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10;WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11;\r
12;Module Name:\r
13;\r
14 ;EfiZeroMemRep4.asm\r
15;\r
16;Abstract:\r
17;\r
18 ;This is the code that uses rep stosd ZeroMem service\r
19;\r
20;--*/\r
21;\r
22;---------------------------------------------------------------------------\r
23 .686\r
24 .model flat,C\r
25 .code\r
26\r
27;---------------------------------------------------------------------------\r
28;#include "Tiano.h"\r
29;\r
30;VOID\r
31;EfiCommonLibZeroMem (\r
32 ;IN VOID *Buffer,\r
33 ;IN UINTN Count\r
34 ;)\r
35;/*++\r
36;\r
37;Input: VOID *Buffer - Pointer to buffer to clear\r
38 ;UINTN Count - Number of bytes to clear\r
39;\r
40;Output: None.\r
41;\r
42;Saves:\r
43;\r
44;Modifies:\r
45;\r
46;Description: This function uses rep stosd to zero memory.\r
47;\r
48;--*/\r
49EfiCommonLibZeroMem PROC\r
50 push ebp\r
51 mov ebp,esp\r
52 push edi\r
53 mov ecx,dword ptr [ebp+0Ch]\r
54 test ecx, ecx\r
55 je Exit\r
56 xor eax, eax\r
57 mov edi,dword ptr [ebp+8]\r
58 mov edx, ecx\r
59 shr ecx, 2\r
60 and edx, 3\r
61 rep stosd\r
62 mov ecx, edx\r
63 rep stosb\r
64Exit:\r
65 pop edi\r
66 pop ebp\r
67 ret\r
68\r
69EfiCommonLibZeroMem ENDP \r
70 END\r