2008-11-03 10:25:10 +01:00
|
|
|
#
|
|
|
|
# ConvertAsm.py: Automatically generated from CompareMem.asm
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
#
|
2018-06-27 15:11:33 +02:00
|
|
|
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
2010-04-23 18:08:36 +02:00
|
|
|
# This program and the accompanying materials
|
2008-11-03 10:25:10 +01:00
|
|
|
# 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
|
2010-06-25 23:56:02 +02:00
|
|
|
# http://opensource.org/licenses/bsd-license.php.
|
2008-11-03 10:25:10 +01:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# );
|
|
|
|
#------------------------------------------------------------------------------
|
2009-05-20 12:22:09 +02:00
|
|
|
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
|
2008-11-03 10:25:10 +01:00
|
|
|
ASM_PFX(InternalMemCompareMem):
|
2009-08-11 17:32:16 +02:00
|
|
|
pushq %rsi
|
|
|
|
pushq %rdi
|
2018-06-27 15:11:33 +02:00
|
|
|
movq %rcx, %rsi
|
|
|
|
movq %rdx, %rdi
|
|
|
|
movq %r8, %rcx
|
2008-11-03 10:25:10 +01:00
|
|
|
repe cmpsb
|
2009-08-11 17:32:16 +02:00
|
|
|
movzbq -1(%rsi), %rax
|
|
|
|
movzbq -1(%rdi), %rdx
|
2018-06-27 15:11:33 +02:00
|
|
|
subq %rdx, %rax
|
2009-08-11 17:32:16 +02:00
|
|
|
popq %rdi
|
|
|
|
popq %rsi
|
2008-11-03 10:25:10 +01:00
|
|
|
ret
|
|
|
|
|