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:04 +0800 |
commit | 520ed83743fd6206fd0947eaab790676b5d68591 (patch) | |
tree | 840bccecbed24dcc04d362d23f17a15ef751874e /MdePkg/Library/BaseMemoryLibOptPei | |
parent | 94774b826fdce0a5d96a683f2cedd5c9d85a61a4 (diff) | |
download | edk2-520ed83743fd6206fd0947eaab790676b5d68591.tar.gz edk2-520ed83743fd6206fd0947eaab790676b5d68591.tar.bz2 edk2-520ed83743fd6206fd0947eaab790676b5d68591.zip |
MdePkg BaseMemoryLibOptPei: Convert X64/ScanMem64.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/ScanMem64.asm to X64/ScanMem64.nasm
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibOptPei')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf | 1 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.nasm | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf index 221dab9d20..f08f3600af 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf +++ b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf @@ -92,6 +92,7 @@ MemLibGuid.c
[Sources.X64]
+ X64/ScanMem64.nasm
X64/ScanMem64.asm
X64/ScanMem64.S
X64/ScanMem32.asm
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.nasm b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.nasm new file mode 100644 index 0000000000..7efcf6a7bd --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.nasm @@ -0,0 +1,55 @@ +;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006 - 2008, 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:
+;
+; ScanMem64.Asm
+;
+; Abstract:
+;
+; ScanMem64 function
+;
+; Notes:
+;
+; The following BaseMemoryLib instances contain the same copy of this file:
+;
+; BaseMemoryLibRepStr
+; BaseMemoryLibMmx
+; BaseMemoryLibSse2
+; BaseMemoryLibOptDxe
+; BaseMemoryLibOptPei
+;
+;------------------------------------------------------------------------------
+
+ DEFAULT REL
+ SECTION .text
+
+;------------------------------------------------------------------------------
+; CONST VOID *
+; EFIAPI
+; InternalMemScanMem64 (
+; IN CONST VOID *Buffer,
+; IN UINTN Length,
+; IN UINT64 Value
+; );
+;------------------------------------------------------------------------------
+global ASM_PFX(InternalMemScanMem64)
+ASM_PFX(InternalMemScanMem64):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repne scasq
+ lea rax, [rdi - 8]
+ cmovnz rax, rcx
+ pop rdi
+ ret
+
|