]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S
Make EdkGenericBdsLib compile.
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibSse2 / Ia32 / CompareMem.S
CommitLineData
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.globl _InternalMemCompareMem\r
36\r
37#------------------------------------------------------------------------------\r
38# INTN\r
39# EFIAPI\r
40# InternalMemCompareMem (\r
41# IN CONST VOID *DestinationBuffer,\r
42# IN CONST VOID *SourceBuffer,\r
43# IN UINTN Length\r
44# );\r
45#------------------------------------------------------------------------------\r
46_InternalMemCompareMem:\r
47 push %esi\r
48 push %edi\r
49 movl 12(%esp), %esi\r
50 movl 16(%esp), %edi\r
51 movl 20(%esp), %ecx\r
52 repe cmpsb\r
53 movzbl -1(%esi), %eax\r
54 movzbl -1(%edi), %edx\r
55 subl %edx, %eax\r
56 pop %edi\r
57 pop %esi\r
58 ret\r