X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseMemoryLibMmx%2FX64%2FCompareMem.S;h=590240591bae90e06ac833ede26f433048766b25;hp=2dc71b2b9a7bc2a44b148b41a57dbf4be7b0207d;hb=2fc59a003ed9104f9feebe0e418f2a04a50f3284;hpb=2bfb60098f608dc32ff5d22b0fd087c1636b0881 diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S index 2dc71b2b9a..590240591b 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S +++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S @@ -1,54 +1,59 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# CompareMem.Asm -# -# Abstract: -# -# CompareMem function -# -# Notes: -# -# The following BaseMemoryLib instances contain the same copy of this file: -# -# BaseMemoryLibRepStr -# BaseMemoryLibMmx -# BaseMemoryLibSse2 -# BaseMemoryLibOptDxe -# BaseMemoryLibOptPei -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# INTN -# EFIAPI -# InternalMemCompareMem ( -# IN CONST VOID *DestinationBuffer, -# IN CONST VOID *SourceBuffer, -# IN UINTN Length -# ); -#------------------------------------------------------------------------------ -.global _InternalMemCompareMem; -_InternalMemCompareMem: - push %rsi - push %rdi - mov %rcx, %rsi - mov %rdx, %rdi - mov %r8, %rcx - repe cmpsb - movzbq -1(%rsi), %rax - movzbq -1(%rdi), %rdx - sub %rdx, %rax - pop %rdi - pop %rsi - ret +# +# ConvertAsm.py: Automatically generated from CompareMem.asm +# +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# CompareMem.S +# +# Abstract: +# +# CompareMem function +# +# Notes: +# +# The following BaseMemoryLib instances contain the same copy of this file: +# +# BaseMemoryLibRepStr +# BaseMemoryLibMmx +# BaseMemoryLibSse2 +# BaseMemoryLibOptDxe +# BaseMemoryLibOptPei +# +#------------------------------------------------------------------------------ + + +#------------------------------------------------------------------------------ +# INTN +# EFIAPI +# InternalMemCompareMem ( +# IN CONST VOID *DestinationBuffer, +# IN CONST VOID *SourceBuffer, +# IN UINTN Length +# ); +#------------------------------------------------------------------------------ +ASM_GLOBAL ASM_PFX(InternalMemCompareMem) +ASM_PFX(InternalMemCompareMem): + pushq %rsi + pushq %rdi + movq %rcx, %rsi + movq %rdx, %rdi + movq %r8, %rcx + repe cmpsb + movzbq -1(%rsi), %rax + movzbq -1(%rdi), %rdx + subq %rdx, %rax + popq %rdi + popq %rsi + ret +