]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | //\r |
2 | // Include common header file for this module.\r | |
3 | //\r | |
4 | #include "CommonHeader.h"\r | |
5 | \r | |
6 | #------------------------------------------------------------------------------\r | |
7 | #\r | |
8 | # Copyright (c) 2006, Intel Corporation\r | |
9 | # All rights reserved. This program and the accompanying materials\r | |
10 | # are licensed and made available under the terms and conditions of the BSD License\r | |
11 | # which accompanies this distribution. The full text of the license may be found at\r | |
12 | # http://opensource.org/licenses/bsd-license.php\r | |
13 | #\r | |
14 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | #\r | |
17 | # Module Name:\r | |
18 | #\r | |
19 | # ScanMem16.Asm\r | |
20 | #\r | |
21 | # Abstract:\r | |
22 | #\r | |
23 | # ScanMem16 function\r | |
24 | #\r | |
25 | # Notes:\r | |
26 | #\r | |
27 | # The following BaseMemoryLib instances share the same version of this file:\r | |
28 | #\r | |
29 | # BaseMemoryLibRepStr\r | |
30 | # BaseMemoryLibMmx\r | |
31 | # BaseMemoryLibSse2\r | |
32 | #\r | |
33 | #------------------------------------------------------------------------------\r | |
34 | \r | |
35 | .globl _InternalMemScanMem16\r | |
36 | \r | |
37 | #------------------------------------------------------------------------------\r | |
38 | # CONST VOID *\r | |
39 | # EFIAPI\r | |
40 | # InternalMemScanMem16 (\r | |
41 | # IN CONST VOID *Buffer,\r | |
42 | # IN UINTN Length,\r | |
43 | # IN UINT16 Value\r | |
44 | # );\r | |
45 | #------------------------------------------------------------------------------\r | |
46 | _InternalMemScanMem16:\r | |
47 | push %edi\r | |
48 | movl 12(%esp), %ecx\r | |
49 | movl 8(%esp), %edi\r | |
50 | movl 16(%esp), %eax\r | |
51 | repne scasw\r | |
52 | leal -2(%edi), %eax\r | |
53 | cmovnz %ecx, %eax\r | |
54 | pop %edi\r | |
55 | ret\r |