]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibOptPei / Ia32 / ScanMem32.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; ScanMem32.Asm
9 ;
10 ; Abstract:
11 ;
12 ; ScanMem32 function
13 ;
14 ; Notes:
15 ;
16 ; The following BaseMemoryLib instances contain the same copy of this file:
17 ;
18 ; BaseMemoryLibRepStr
19 ; BaseMemoryLibMmx
20 ; BaseMemoryLibSse2
21 ; BaseMemoryLibOptDxe
22 ; BaseMemoryLibOptPei
23 ;
24 ;------------------------------------------------------------------------------
25
26 SECTION .text
27
28 ;------------------------------------------------------------------------------
29 ; CONST VOID *
30 ; EFIAPI
31 ; InternalMemScanMem32 (
32 ; IN CONST VOID *Buffer,
33 ; IN UINTN Length,
34 ; IN UINT32 Value
35 ; );
36 ;------------------------------------------------------------------------------
37 global ASM_PFX(InternalMemScanMem32)
38 ASM_PFX(InternalMemScanMem32):
39 push edi
40 mov ecx, [esp + 12]
41 mov edi, [esp + 8]
42 mov eax, [esp + 16]
43 repne scasd
44 lea eax, [edi - 4]
45 cmovnz eax, ecx
46 pop edi
47 ret
48