From 6c878ed3e87a7d5c49fede2b8f40ae1b321d619c Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 30 May 2016 18:52:09 -0700 Subject: 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 --- .../BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf | 1 + .../Library/BaseMemoryLibOptPei/X64/ZeroMem.nasm | 49 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.nasm (limited to 'MdePkg/Library') diff --git a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf index 7f5bc240bb..1766b84733 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 0000000000..6613de8a31 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.nasm @@ -0,0 +1,49 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation. All rights reserved.
+; 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 + -- cgit v1.2.3