2008-11-03 10:25:10 +01:00
|
|
|
#
|
|
|
|
# ConvertAsm.py: Automatically generated from CompareMem.asm
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
#
|
2009-08-11 17:32:16 +02:00
|
|
|
# Copyright (c) 2006 - 2009, Intel Corporation
|
2008-11-03 10:25:10 +01:00
|
|
|
# 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 (
|
2009-08-11 17:32:16 +02:00
|
|
|
# IN CONST VOID *DestinationBuffer,
|
|
|
|
# IN CONST VOID *SourceBuffer,
|
2008-11-03 10:25:10 +01:00
|
|
|
# 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
|
|
|
|
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
|
|
|
|
subq %rdx, %rax
|
|
|
|
popq %rdi
|
|
|
|
popq %rsi
|
2008-11-03 10:25:10 +01:00
|
|
|
ret
|
|
|
|
|