diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2016-05-30 18:52:06 -0700 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2016-06-28 09:50:25 +0800 |
commit | 8dba24a6a882253473f6a2bf07b41f2e1df6c733 (patch) | |
tree | bd27e0aac6c370bf32c09ed6e44162c88addd87d /MdePkg/Library/BaseMemoryLibMmx | |
parent | bef0fef44f3546f4f8745498a9cd275cb73ade4d (diff) | |
download | edk2-8dba24a6a882253473f6a2bf07b41f2e1df6c733.tar.gz edk2-8dba24a6a882253473f6a2bf07b41f2e1df6c733.tar.bz2 edk2-8dba24a6a882253473f6a2bf07b41f2e1df6c733.zip |
MdePkg BaseMemoryLibMmx: Convert Ia32/ZeroMem.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/ZeroMem.asm to Ia32/ZeroMem.nasm
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibMmx')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.nasm | 54 |
2 files changed, 56 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf index a6a717165b..7eb8a31c3b 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf +++ b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf @@ -66,6 +66,7 @@ Ia32/SetMem32.S
Ia32/SetMem16.nasm
Ia32/SetMem16.S
+ Ia32/ZeroMem.nasm
Ia32/ZeroMem.S
Ia32/SetMem.S
Ia32/CopyMem.S
@@ -85,6 +86,7 @@ Ia32/SetMem32.asm
Ia32/SetMem16.nasm
Ia32/SetMem16.asm
+ Ia32/ZeroMem.nasm
Ia32/ZeroMem.asm
Ia32/SetMem.asm
Ia32/CopyMem.asm
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.nasm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.nasm new file mode 100644 index 0000000000..ad80dc324e --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.nasm @@ -0,0 +1,54 @@ +;------------------------------------------------------------------------------
+;
+; 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.nasm
+;
+; Abstract:
+;
+; ZeroMem function
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+ SECTION .text
+
+;------------------------------------------------------------------------------
+; VOID *
+; InternalMemZeroMem (
+; IN VOID *Buffer,
+; IN UINTN Count
+; );
+;------------------------------------------------------------------------------
+global ASM_PFX(InternalMemZeroMem)
+ASM_PFX(InternalMemZeroMem):
+ push edi
+ mov edi, [esp + 8]
+ mov ecx, [esp + 12]
+ mov edx, ecx
+ shr ecx, 3
+ jz @ZeroBytes
+ pxor mm0, mm0
+.0:
+ movq [edi], mm0
+ add edi, 8
+ loop .0
+@ZeroBytes:
+ and edx, 7
+ xor eax, eax
+ mov ecx, edx
+ rep stosb
+ mov eax, [esp + 8]
+ pop edi
+ ret
+
|