]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibOptPei / Ia32 / SetMem.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; SetMem.Asm
9 ;
10 ; Abstract:
11 ;
12 ; SetMem function
13 ;
14 ; Notes:
15 ;
16 ;------------------------------------------------------------------------------
17
18 SECTION .text
19
20 ;------------------------------------------------------------------------------
21 ; VOID *
22 ; InternalMemSetMem (
23 ; IN VOID *Buffer,
24 ; IN UINTN Count,
25 ; IN UINT8 Value
26 ; )
27 ;------------------------------------------------------------------------------
28 global ASM_PFX(InternalMemSetMem)
29 ASM_PFX(InternalMemSetMem):
30 push edi
31 mov ecx, [esp + 12]
32 mov al, [esp + 16]
33 mov ah, al
34 shrd edx, eax, 16
35 shld eax, edx, 16
36 mov edx, ecx
37 mov edi, [esp + 8]
38 shr ecx, 2
39 rep stosd
40 mov ecx, edx
41 and ecx, 3
42 rep stosb
43 mov eax, [esp + 8]
44 pop edi
45 ret
46