X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseMemoryLibRepStr%2FIa32%2FCompareMem.S;fp=MdePkg%2FLibrary%2FBaseMemoryLibRepStr%2FIa32%2FCompareMem.S;h=6b3f17bff22be9cbedf090f1e8cfd81e3372008a;hb=b1ff428c96518b7f4810eff4688d60ac7c65fba5;hp=f0688f59cf163c3477ecc4408ee2fb7a6e3d3b9d;hpb=db835e01d3e5d2f09c12d73d749c37fcc7c20291;p=mirror_edk2.git diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S index f0688f59cf..6b3f17bff2 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S +++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S @@ -1,55 +1,55 @@ -#------------------------------------------------------------------------------ -# -# 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 -# -#------------------------------------------------------------------------------ - -.globl _InternalMemCompareMem - -#------------------------------------------------------------------------------ -# INTN -# EFIAPI -# InternalMemCompareMem ( -# IN CONST VOID *DestinationBuffer, -# IN CONST VOID *SourceBuffer, -# IN UINTN Length -# ); -#------------------------------------------------------------------------------ -_InternalMemCompareMem: - push %esi - push %edi - movl 12(%esp), %esi - movl 16(%esp), %edi - movl 20(%esp), %ecx - repe cmpsb - movzbl -1(%esi), %eax - movzbl -1(%edi), %edx - subl %edx, %eax - pop %edi - pop %esi - ret +#------------------------------------------------------------------------------ +# +# 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 +# +#------------------------------------------------------------------------------ + +.globl _InternalMemCompareMem + +#------------------------------------------------------------------------------ +# INTN +# EFIAPI +# InternalMemCompareMem ( +# IN CONST VOID *DestinationBuffer, +# IN CONST VOID *SourceBuffer, +# IN UINTN Length +# ); +#------------------------------------------------------------------------------ +_InternalMemCompareMem: + push %esi + push %edi + movl 12(%esp), %esi + movl 16(%esp), %edi + movl 20(%esp), %ecx + repe cmpsb + movzbl -1(%esi), %eax + movzbl -1(%edi), %edx + subl %edx, %eax + pop %edi + pop %esi + ret