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