]>
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 | ; CompareMem.Asm\r | |
20 | ;\r | |
21 | ; Abstract:\r | |
22 | ;\r | |
23 | ; CompareMem 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 | .686\r | |
36 | .model flat,C\r | |
37 | .code\r | |
38 | \r | |
39 | ;------------------------------------------------------------------------------\r | |
40 | ; INTN\r | |
41 | ; EFIAPI\r | |
42 | ; InternalMemCompareMem (\r | |
43 | ; IN CONST VOID *DestinationBuffer,\r | |
44 | ; IN CONST VOID *SourceBuffer,\r | |
45 | ; IN UINTN Length\r | |
46 | ; );\r | |
47 | ;------------------------------------------------------------------------------\r | |
48 | InternalMemCompareMem PROC USES esi edi\r | |
49 | mov esi, [esp + 12]\r | |
50 | mov edi, [esp + 16]\r | |
51 | mov ecx, [esp + 20]\r | |
52 | repe cmpsb\r | |
53 | movzx eax, byte ptr [esi - 1]\r | |
54 | movzx edx, byte ptr [edi - 1]\r | |
55 | sub eax, edx\r | |
56 | ret\r | |
57 | InternalMemCompareMem ENDP\r | |
58 | \r | |
59 | END\r |