]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibOptDxe / X64 / CompareMem.S
CommitLineData
b1ff428c 1#\r
2# ConvertAsm.py: Automatically generated from CompareMem.asm\r
3#\r
4#------------------------------------------------------------------------------\r
5#\r
9095d37b 6# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
adc29a97 7# This program and the accompanying materials\r
b1ff428c 8# are licensed and made available under the terms and conditions of the BSD License\r
9# which accompanies this distribution. The full text of the license may be found at\r
2fc59a00 10# http://opensource.org/licenses/bsd-license.php.\r
b1ff428c 11#\r
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14#\r
15# Module Name:\r
16#\r
17# CompareMem.S\r
18#\r
19# Abstract:\r
20#\r
21# CompareMem function\r
22#\r
23# Notes:\r
24#\r
25# The following BaseMemoryLib instances contain the same copy of this file:\r
26#\r
27# BaseMemoryLibRepStr\r
28# BaseMemoryLibMmx\r
29# BaseMemoryLibSse2\r
30# BaseMemoryLibOptDxe\r
31# BaseMemoryLibOptPei\r
32#\r
33#------------------------------------------------------------------------------\r
34\r
35\r
36#------------------------------------------------------------------------------\r
37# INTN\r
38# EFIAPI\r
39# InternalMemCompareMem (\r
40# IN CONST VOID *DestinationBuffer,\r
41# IN CONST VOID *SourceBuffer,\r
42# IN UINTN Length\r
43# );\r
9095d37b 44#------------------------------------------------------------------------------\r
132f41f0 45ASM_GLOBAL ASM_PFX(InternalMemCompareMem)\r
b1ff428c 46ASM_PFX(InternalMemCompareMem):\r
1fef058f 47 pushq %rsi\r
48 pushq %rdi\r
49 movq %rcx, %rsi\r
50 movq %rdx, %rdi\r
51 movq %r8, %rcx\r
b1ff428c 52 repe cmpsb\r
1fef058f 53 movzbq -1(%rsi) , %rax\r
54 movzbq -1(%rdi) , %rdx\r
55 sub %dl, %al\r
56 popq %rdi\r
57 popq %rsi\r
b1ff428c 58 ret\r
59\r