MdePkg/BaseMemoryLibRepStr: Remove .S files for IA32 and X64 arch
.nasm file has been added for X86 arch. .S assembly code is not required any more. https://bugzilla.tianocore.org/show_bug.cgi?id=1594 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
committed by
Liming Gao
parent
ef008cd706
commit
42b7b15d27
@@ -1,55 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# INTN
|
||||
# EFIAPI
|
||||
# InternalMemCompareMem (
|
||||
# IN CONST VOID *DestinationBuffer,
|
||||
# IN CONST VOID *SourceBuffer,
|
||||
# IN UINTN Length
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(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
|
@@ -1,65 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# CopyMem.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# CopyMem function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
# EFIAPI
|
||||
# InternalMemCopyMem (
|
||||
# IN VOID *Destination,
|
||||
# IN VOID *Source,
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemCopyMem):
|
||||
push %esi
|
||||
push %edi
|
||||
movl 16(%esp), %esi # esi <- Source
|
||||
movl 12(%esp), %edi # edi <- Destination
|
||||
movl 20(%esp), %edx # edx <- Count
|
||||
leal -1(%esi, %edx), %eax # eax <- End of Source
|
||||
cmpl %edi, %esi
|
||||
jae L0
|
||||
cmpl %edi, %eax
|
||||
jae L_CopyBackward # Copy backward if overlapped
|
||||
L0:
|
||||
movl %edx, %ecx
|
||||
andl $3, %edx
|
||||
shrl $2, %ecx
|
||||
rep
|
||||
movsl # Copy as many Dwords as possible
|
||||
jmp L_CopyBytes
|
||||
L_CopyBackward:
|
||||
movl %eax, %esi # esi <- End of Source
|
||||
leal -1(%edi, %edx), %edi # edi <- End of Destination
|
||||
std
|
||||
L_CopyBytes:
|
||||
movl %edx, %ecx
|
||||
rep
|
||||
movsb # Copy bytes backward
|
||||
cld
|
||||
movl 12(%esp), %eax # eax <- Destination as return value
|
||||
pop %edi
|
||||
pop %esi
|
||||
ret
|
@@ -1,54 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# ScanMem16.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# ScanMem16 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# The following BaseMemoryLib instances contain the same copy of this file:
|
||||
#
|
||||
# BaseMemoryLibRepStr
|
||||
# BaseMemoryLibMmx
|
||||
# BaseMemoryLibSse2
|
||||
# BaseMemoryLibOptDxe
|
||||
# BaseMemoryLibOptPei
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
# EFIAPI
|
||||
# InternalMemScanMem16 (
|
||||
# IN CONST VOID *Buffer,
|
||||
# IN UINTN Length,
|
||||
# IN UINT16 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemScanMem16):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 8(%esp), %edi
|
||||
movl 16(%esp), %eax
|
||||
repne scasw
|
||||
leal -2(%edi), %eax
|
||||
jz L0
|
||||
movl %ecx, %eax
|
||||
L0:
|
||||
pop %edi
|
||||
ret
|
@@ -1,54 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# ScanMem32.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# ScanMem32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# The following BaseMemoryLib instances contain the same copy of this file:
|
||||
#
|
||||
# BaseMemoryLibRepStr
|
||||
# BaseMemoryLibMmx
|
||||
# BaseMemoryLibSse2
|
||||
# BaseMemoryLibOptDxe
|
||||
# BaseMemoryLibOptPei
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
# EFIAPI
|
||||
# InternalMemScanMem32 (
|
||||
# IN CONST VOID *Buffer,
|
||||
# IN UINTN Length,
|
||||
# IN UINT32 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemScanMem32):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 8(%esp), %edi
|
||||
movl 16(%esp), %eax
|
||||
repne scasl
|
||||
leal -4(%edi), %eax
|
||||
jz L0
|
||||
movl %ecx, %eax
|
||||
L0:
|
||||
pop %edi
|
||||
ret
|
@@ -1,63 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# ScanMem64.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# ScanMem64 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# The following BaseMemoryLib instances contain the same copy of this file:
|
||||
#
|
||||
# BaseMemoryLibRepStr
|
||||
# BaseMemoryLibMmx
|
||||
# BaseMemoryLibSse2
|
||||
# BaseMemoryLibOptDxe
|
||||
# BaseMemoryLibOptPei
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
# EFIAPI
|
||||
# InternalMemScanMem64 (
|
||||
# IN CONST VOID *Buffer,
|
||||
# IN UINTN Length,
|
||||
# IN UINT64 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemScanMem64):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 16(%esp), %eax
|
||||
movl 20(%esp), %edx
|
||||
movl 8(%esp), %edi
|
||||
L0:
|
||||
cmpl (%edi), %eax
|
||||
leal 8(%edi), %edi
|
||||
loopne L0
|
||||
jne L1
|
||||
cmpl -4(%edi), %edx
|
||||
jecxz L1
|
||||
jne L0
|
||||
L1:
|
||||
leal -8(%edi), %eax
|
||||
jz L2
|
||||
movl %ecx, %eax
|
||||
L2:
|
||||
pop %edi
|
||||
ret
|
@@ -1,54 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# ScanMem8.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# ScanMem8 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# The following BaseMemoryLib instances contain the same copy of this file:
|
||||
#
|
||||
# BaseMemoryLibRepStr
|
||||
# BaseMemoryLibMmx
|
||||
# BaseMemoryLibSse2
|
||||
# BaseMemoryLibOptDxe
|
||||
# BaseMemoryLibOptPei
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
# EFIAPI
|
||||
# InternalMemScanMem8 (
|
||||
# IN CONST VOID *Buffer,
|
||||
# IN UINTN Length,
|
||||
# IN UINT8 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemScanMem8):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 8(%esp), %edi
|
||||
movb 16(%esp), %al
|
||||
repne scasb
|
||||
leal -1(%edi), %eax
|
||||
jz L0
|
||||
movl %ecx, %eax
|
||||
L0:
|
||||
pop %edi
|
||||
ret
|
@@ -1,46 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# SetMem.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# SetMem function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
.code:
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemSetMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
# InternalMemSetMem (
|
||||
# IN VOID *Buffer,
|
||||
# IN UINTN Count,
|
||||
# IN UINT8 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemSetMem):
|
||||
push %edi
|
||||
movl 16(%esp),%eax
|
||||
movl 8(%esp),%edi
|
||||
movl 12(%esp),%ecx
|
||||
rep
|
||||
stosb
|
||||
movl 8(%esp),%eax
|
||||
pop %edi
|
||||
ret
|
@@ -1,43 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# SetMem16.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# SetMem16 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
# InternalMemSetMem16 (
|
||||
# IN VOID *Buffer,
|
||||
# IN UINTN Count,
|
||||
# IN UINT16 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemSetMem16):
|
||||
push %edi
|
||||
movl 16(%esp), %eax
|
||||
movl 8(%esp), %edi
|
||||
movl 12(%esp), %ecx
|
||||
rep
|
||||
stosw
|
||||
movl 8(%esp), %eax
|
||||
pop %edi
|
||||
ret
|
@@ -1,43 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# SetMem32.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# SetMem32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
# InternalMemSetMem32 (
|
||||
# IN VOID *Buffer,
|
||||
# IN UINTN Count,
|
||||
# IN UINT32 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemSetMem32):
|
||||
push %edi
|
||||
movl 16(%esp),%eax
|
||||
movl 8(%esp),%edi
|
||||
movl 12(%esp),%ecx
|
||||
rep
|
||||
stosl
|
||||
movl 8(%esp),%eax
|
||||
pop %edi
|
||||
ret
|
@@ -1,46 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# SetMem64.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# SetMem64 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
# InternalMemSetMem64 (
|
||||
# IN VOID *Buffer,
|
||||
# IN UINTN Count,
|
||||
# IN UINT64 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemSetMem64):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 16(%esp), %eax
|
||||
movl 20(%esp), %edx
|
||||
movl 8(%esp), %edi
|
||||
L0:
|
||||
mov %eax, -8(%edi, %ecx, 8)
|
||||
mov %edx, -4(%edi, %ecx, 8)
|
||||
loop L0
|
||||
movl %edi, %eax
|
||||
pop %edi
|
||||
ret
|
@@ -1,49 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# 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:
|
||||
#
|
||||
# ZeroMem.Asm
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# ZeroMem function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
# InternalMemZeroMem (
|
||||
# IN VOID *Buffer,
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMemZeroMem):
|
||||
push %edi
|
||||
xorl %eax,%eax
|
||||
movl 8(%esp),%edi
|
||||
movl 12(%esp),%ecx
|
||||
movl %ecx,%edx
|
||||
shrl $2,%ecx
|
||||
andl $3,%edx
|
||||
pushl %edi
|
||||
rep
|
||||
stosl
|
||||
movl %edx,%ecx
|
||||
rep
|
||||
stosb
|
||||
popl %eax
|
||||
pop %edi
|
||||
ret
|
Reference in New Issue
Block a user