]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S
Make EdkGenericBdsLib compile.
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibRepStr / Ia32 / ZeroMem.S
CommitLineData
e1f414b6 1//\r
2// Include common header file for this module.\r
3//\r
4#include "CommonHeader.h"\r
5\r
6#------------------------------------------------------------------------------\r
7#\r
8# Copyright (c) 2006, Intel Corporation\r
9# All rights reserved. This program and the accompanying materials\r
10# are licensed and made available under the terms and conditions of the BSD License\r
11# which accompanies this distribution. The full text of the license may be found at\r
12# http://opensource.org/licenses/bsd-license.php\r
13#\r
14# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16#\r
17# Module Name:\r
18#\r
19# ZeroMem.Asm\r
20#\r
21# Abstract:\r
22#\r
23# ZeroMem function\r
24#\r
25# Notes:\r
26#\r
27#------------------------------------------------------------------------------\r
28\r
29.globl _InternalMemZeroMem\r
30\r
31#------------------------------------------------------------------------------\r
32# VOID *\r
33# InternalMemZeroMem (\r
34# IN VOID *Buffer,\r
35# IN UINTN Count\r
36# );\r
37#------------------------------------------------------------------------------\r
38_InternalMemZeroMem:\r
39 push %edi\r
40 xorl %eax,%eax\r
41 movl 8(%esp),%edi\r
42 movl 12(%esp),%ecx\r
43 movl %ecx,%edx\r
44 shrl $2,%ecx\r
45 andl $3,%edx\r
46 pushl %edi\r
47 rep\r
48 stosl\r
49 movl %edx,%ecx\r
50 rep\r
51 stosb\r
52 popl %eax\r
53 pop %edi\r
54 ret\r