]>
Commit | Line | Data |
---|---|---|
1 | ;------------------------------------------------------------------------------\r | |
2 | ;\r | |
3 | ; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r | |
4 | ; SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
5 | ;\r | |
6 | ; Module Name:\r | |
7 | ;\r | |
8 | ; ScanMem32.Asm\r | |
9 | ;\r | |
10 | ; Abstract:\r | |
11 | ;\r | |
12 | ; ScanMem32 function\r | |
13 | ;\r | |
14 | ; Notes:\r | |
15 | ;\r | |
16 | ; The following BaseMemoryLib instances contain the same copy of this file:\r | |
17 | ;\r | |
18 | ; BaseMemoryLibRepStr\r | |
19 | ; BaseMemoryLibMmx\r | |
20 | ; BaseMemoryLibSse2\r | |
21 | ; BaseMemoryLibOptDxe\r | |
22 | ; BaseMemoryLibOptPei\r | |
23 | ;\r | |
24 | ;------------------------------------------------------------------------------\r | |
25 | \r | |
26 | DEFAULT REL\r | |
27 | SECTION .text\r | |
28 | \r | |
29 | ;------------------------------------------------------------------------------\r | |
30 | ; CONST VOID *\r | |
31 | ; EFIAPI\r | |
32 | ; InternalMemScanMem32 (\r | |
33 | ; IN CONST VOID *Buffer,\r | |
34 | ; IN UINTN Length,\r | |
35 | ; IN UINT32 Value\r | |
36 | ; );\r | |
37 | ;------------------------------------------------------------------------------\r | |
38 | global ASM_PFX(InternalMemScanMem32)\r | |
39 | ASM_PFX(InternalMemScanMem32):\r | |
40 | push rdi\r | |
41 | mov rdi, rcx\r | |
42 | mov rax, r8\r | |
43 | mov rcx, rdx\r | |
44 | repne scasd\r | |
45 | lea rax, [rdi - 4]\r | |
46 | cmovnz rax, rcx\r | |
47 | pop rdi\r | |
48 | ret\r | |
49 | \r |