]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S
Renamed remotely
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / X64 / EfiZeroMemRep4.S
1 #------------------------------------------------------------------------------
2 #
3 # Copyright (c) 2008, Intel Corporation
4 # All rights reserved. This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
8 #
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 #
12 # Module Name:
13 #
14 # EfiZeroMemRep4.S
15 #
16 # Abstract:
17 #
18 # ZeroMem function
19 #
20 # Notes:
21 #
22 #------------------------------------------------------------------------------
23 #include <EfiBind.h>
24
25 .code:
26
27 .global ASM_PFX(EfiCommonLibZeroMem)
28 #------------------------------------------------------------------------------
29 # VOID
30 # EfiCommonLibZeroMem (
31 # IN VOID *Buffer,
32 # IN UINTN Size
33 # );
34 #------------------------------------------------------------------------------
35 ASM_PFX(EfiCommonLibZeroMem):
36 push %rdi
37 xor %rax,%rax
38 mov %rcx,%rdi
39 mov %rdx,%rcx
40 shr $0x2,%rcx
41 and $0x3,%rdx
42 rep stos %eax,%es:(%rdi)
43 mov %rdx,%rcx
44 rep stos %al,%es:(%rdi)
45 pop %rdi
46 retq