From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.nasm | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 roms/edk2/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.nasm (limited to 'roms/edk2/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.nasm') diff --git a/roms/edk2/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.nasm b/roms/edk2/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.nasm new file mode 100644 index 000000000..2b06a0958 --- /dev/null +++ b/roms/edk2/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.nasm @@ -0,0 +1,43 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; +; Module Name: +; +; ZeroMem.Asm +; +; Abstract: +; +; ZeroMem function +; +; Notes: +; +;------------------------------------------------------------------------------ + + SECTION .text + +;------------------------------------------------------------------------------ +; VOID * +; InternalMemZeroMem ( +; IN VOID *Buffer, +; IN UINTN Count +; ); +;------------------------------------------------------------------------------ +global ASM_PFX(InternalMemZeroMem) +ASM_PFX(InternalMemZeroMem): + push edi + xor eax, eax + mov edi, [esp + 8] + mov ecx, [esp + 12] + mov edx, ecx + shr ecx, 2 + and edx, 3 + push edi + rep stosd + mov ecx, edx + rep stosb + pop eax + pop edi + ret + -- cgit 1.2.3-korg