add corresponding .S files for BaseMemoryLibXXX X64 arch. Note that we use ".intel_syntax noprefix" directive to simplify the .S implementation.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6184 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian
2008-10-22 08:36:39 +00:00
parent 710a5b3584
commit 4df876adfb
36 changed files with 1362 additions and 139 deletions

View File

@@ -1,3 +1,6 @@
#
# ConvertAsm.py: Automatically generated from CompareMem.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006, Intel Corporation
@@ -11,7 +14,7 @@
#
# Module Name:
#
# CompareMem.Asm
# CompareMem.S
#
# Abstract:
#
@@ -29,6 +32,7 @@
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# INTN
# EFIAPI
@@ -38,17 +42,19 @@
# IN UINTN Length
# );
#------------------------------------------------------------------------------
.global _InternalMemCompareMem;
_InternalMemCompareMem:
push %rsi
push %rdi
mov %rcx, %rsi
mov %rdx, %rdi
mov %r8, %rcx
.intel_syntax noprefix
.globl ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
push rsi
push rdi
mov rsi, rcx
mov rdi, rdx
mov rcx, r8
repe cmpsb
movzbq -1(%rsi), %rax
movzbq -1(%rdi), %rdx
sub %rdx, %rax
pop %rdi
pop %rsi
movzx rax, byte ptr [rsi - 1]
movzx rdx, byte ptr [rdi - 1]
sub rax, rdx
pop rdi
pop rsi
ret