diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2016-05-30 18:52:09 -0700 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2016-06-28 09:51:08 +0800 |
commit | 6c878ed3e87a7d5c49fede2b8f40ae1b321d619c (patch) | |
tree | 126b7d42d3a8755a10109f6ebe0304d0e9ce4bd3 /MdePkg | |
parent | 59824217e596380793b64d468b29e2687662ef36 (diff) | |
download | edk2-6c878ed3e87a7d5c49fede2b8f40ae1b321d619c.zip edk2-6c878ed3e87a7d5c49fede2b8f40ae1b321d619c.tar.gz edk2-6c878ed3e87a7d5c49fede2b8f40ae1b321d619c.tar.bz2 |
MdePkg BaseMemoryLibOptPei: Convert X64/ZeroMem.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/ZeroMem.asm to X64/ZeroMem.nasm
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf | 1 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.nasm | 49 |
2 files changed, 50 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf index 7f5bc24..1766b84 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf +++ b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf @@ -107,6 +107,7 @@ X64/CompareMem.nasm
X64/CompareMem.asm
X64/CompareMem.S
+ X64/ZeroMem.nasm
X64/ZeroMem.asm
X64/ZeroMem.S
X64/SetMem64.asm
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.nasm b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.nasm new file mode 100644 index 0000000..6613de8 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.nasm @@ -0,0 +1,49 @@ +;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+; This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php.
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+; Module Name:
+;
+; ZeroMem.Asm
+;
+; Abstract:
+;
+; ZeroMem function
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+ DEFAULT REL
+ SECTION .text
+
+;------------------------------------------------------------------------------
+; VOID *
+; InternalMemZeroMem (
+; IN VOID *Buffer,
+; IN UINTN Count
+; );
+;------------------------------------------------------------------------------
+global ASM_PFX(InternalMemZeroMem)
+ASM_PFX(InternalMemZeroMem):
+ push rdi
+ push rcx
+ xor rax, rax
+ mov rdi, rcx
+ mov rcx, rdx
+ shr rcx, 3
+ and rdx, 7
+ rep stosq
+ mov ecx, edx
+ rep stosb
+ pop rax
+ pop rdi
+ ret
+
|