]>
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 | ; ScanMem16.Asm\r | |
9 | ;\r | |
10 | ; Abstract:\r | |
11 | ;\r | |
12 | ; ScanMem16 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 | SECTION .text\r | |
27 | \r | |
28 | ;------------------------------------------------------------------------------\r | |
29 | ; CONST VOID *\r | |
30 | ; EFIAPI\r | |
31 | ; InternalMemScanMem16 (\r | |
32 | ; IN CONST VOID *Buffer,\r | |
33 | ; IN UINTN Length,\r | |
34 | ; IN UINT16 Value\r | |
35 | ; );\r | |
36 | ;------------------------------------------------------------------------------\r | |
37 | global ASM_PFX(InternalMemScanMem16)\r | |
38 | ASM_PFX(InternalMemScanMem16):\r | |
39 | push edi\r | |
40 | mov ecx, [esp + 12]\r | |
41 | mov edi, [esp + 8]\r | |
42 | mov eax, [esp + 16]\r | |
43 | repne scasw\r | |
44 | lea eax, [edi - 2]\r | |
45 | cmovnz eax, ecx\r | |
46 | pop edi\r | |
47 | ret\r | |
48 | \r |