MdePkg/BaseMemoryLibOptDxe: 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:
Shenglei Zhang
2019-03-07 09:04:16 +08:00
committed by Liming Gao
parent f578386cc4
commit fbce3e064c
23 changed files with 0 additions and 1222 deletions

View File

@@ -1,59 +0,0 @@
#
# ConvertAsm.py: Automatically generated from CompareMem.asm
#
#------------------------------------------------------------------------------
#
# 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:
#
# 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
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
pushq %rsi
pushq %rdi
movq %rcx, %rsi
movq %rdx, %rdi
movq %r8, %rcx
repe cmpsb
movzbq -1(%rsi) , %rax
movzbq -1(%rdi) , %rdx
sub %dl, %al
popq %rdi
popq %rsi
ret

View File

@@ -1,82 +0,0 @@
#
# ConvertAsm.py: Automatically generated from CopyMem.asm
#
#------------------------------------------------------------------------------
#
# 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:
#
# CopyMem.S
#
# Abstract:
#
# CopyMem function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# InternalMemCopyMem (
# IN VOID *Destination,
# IN VOID *Source,
# IN UINTN Count
# )
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
pushq %rsi
pushq %rdi
movq %rdx, %rsi # rsi <- Source
movq %rcx, %rdi # rdi <- Destination
leaq -1(%rsi,%r8,), %r9 # r9 <- Last byte of Source
cmpq %rdi, %rsi
movq %rdi, %rax # rax <- Destination as return value
jae L0 # Copy forward if Source > Destination
cmpq %rdi, %r9 # Overlapped?
jae L_CopyBackward # Copy backward if overlapped
L0:
xorq %rcx, %rcx
subq %rdi, %rcx # rcx <- -rdi
andq $15, %rcx # rcx + rsi should be 16 bytes aligned
jz L1 # skip if rcx == 0
cmpq %r8, %rcx
cmova %r8, %rcx
subq %rcx, %r8
rep movsb
L1:
movq %r8, %rcx
andq $15, %r8
shrq $4, %rcx # rcx <- # of DQwords to copy
jz L_CopyBytes
movdqu %xmm0, 0x18(%rsp) # save xmm0 on stack
L2:
movdqu (%rsi), %xmm0 # rsi may not be 16-byte aligned
movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned
addq $16, %rsi
addq $16, %rdi
loop L2
mfence
movdqa 0x18(%rsp), %xmm0 # restore xmm0
jmp L_CopyBytes # copy remaining bytes
L_CopyBackward:
movq %r9, %rsi # rsi <- Last byte of Source
leaq -1(%rdi, %r8,), %rdi # rdi <- Last byte of Destination
std
L_CopyBytes:
movq %r8, %rcx
rep movsb
cld
popq %rdi
popq %rsi
ret

View File

@@ -1,56 +0,0 @@
#
# ConvertAsm.py: Automatically generated from ScanMem16.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# ScanMem16 function
#
# Notes:
#
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# CONST VOID *
# EFIAPI
# InternalMemScanMem16 (
# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT16 Value
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
pushq %rdi
movq %rcx, %rdi
movq %r8, %rax
movq %rdx, %rcx
repne scasw
leaq -2(%rdi), %rax
cmovnz %rcx, %rax
popq %rdi
ret

View File

@@ -1,56 +0,0 @@
#
# ConvertAsm.py: Automatically generated from ScanMem32.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# ScanMem32 function
#
# Notes:
#
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# CONST VOID *
# EFIAPI
# InternalMemScanMem32 (
# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
pushq %rdi
movq %rcx, %rdi
movq %r8, %rax
movq %rdx, %rcx
repne scasl
leaq -4(%rdi), %rax
cmovnz %rcx, %rax
popq %rdi
ret

View File

@@ -1,55 +0,0 @@
#
# ConvertAsm.py: Automatically generated from ScanMem64.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# ScanMem64 function
#
# Notes:
#
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# CONST VOID *
# EFIAPI
# InternalMemScanMem64 (
# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
pushq %rdi
movq %rcx, %rdi
movq %r8, %rax
movq %rdx, %rcx
repne scasq
leaq -8(%rdi), %rax
cmovnz %rcx, %rax
popq %rdi
ret

View File

@@ -1,56 +0,0 @@
#
# ConvertAsm.py: Automatically generated from ScanMem8.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# ScanMem8 function
#
# Notes:
#
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# CONST VOID *
# EFIAPI
# InternalMemScanMem8 (
# IN CONST VOID *Buffer,
# IN UINTN Length,
# IN UINT8 Value
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
pushq %rdi
movq %rcx, %rdi
movq %rdx, %rcx
movq %r8, %rax
repne scasb
leaq -1(%rdi), %rax
cmovnz %rcx, %rax # set rax to 0 if not found
popq %rdi
ret

View File

@@ -1,57 +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:
#
# SetMem.S
#
# Abstract:
#
# SetMem function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# InternalMemSetMem (
# IN VOID *Buffer,
# IN UINTN Count,
# IN UINT8 Value
# )
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
pushq %rdi
pushq %rbx
pushq %rcx # push Buffer
movq %r8, %rax # rax = Value
andq $0xff, %rax # rax = lower 8 bits of r8, upper 56 bits are 0
movb %al, %ah # ah = al
movw %ax, %bx # bx = ax
shlq $0x10, %rax # rax = ax << 16
movw %bx, %ax # ax = bx
movq %rax, %rbx # ebx = eax
shlq $0x20, %rax # rax = rax << 32
orq %rbx, %rax # eax = ebx
movq %rcx, %rdi # rdi = Buffer
movq %rdx, %rcx # rcx = Count
shrq $3, %rcx # rcx = rcx / 8
cld
rep stosq
movq %rdx, %rcx # rcx = rdx
andq $7, %rcx # rcx = rcx & 7
rep stosb
popq %rax # rax = Buffer
popq %rbx
popq %rdi
ret

View File

@@ -1,47 +0,0 @@
#
# ConvertAsm.py: Automatically generated from SetMem16.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# SetMem16 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# InternalMemSetMem16 (
# IN VOID *Buffer,
# IN UINTN Count,
# IN UINT16 Value
# )
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
pushq %rdi
movq %rcx, %rdi
movq %r8, %rax
xchg %rdx, %rcx
rep stosw
movq %rdx, %rax
popq %rdi
ret

View File

@@ -1,47 +0,0 @@
#
# ConvertAsm.py: Automatically generated from SetMem32.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# SetMem32 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# EFIAPI
# InternalMemSetMem32 (
# IN VOID *Buffer,
# IN UINTN Count,
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
pushq %rdi
movq %rcx, %rdi
movq %r8, %rax
xchgq %rdx, %rcx
rep stosl
movq %rdx, %rax
popq %rdi
ret

View File

@@ -1,46 +0,0 @@
#
# ConvertAsm.py: Automatically generated from SetMem64.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# SetMem64 function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# InternalMemSetMem64 (
# IN VOID *Buffer,
# IN UINTN Count,
# IN UINT64 Value
# )
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
pushq %rdi
movq %rcx, %rdi
movq %r8, %rax
xchg %rdx, %rcx
rep stosq
movq %rdx, %rax
popq %rdi
ret

View File

@@ -1,51 +0,0 @@
#
# ConvertAsm.py: Automatically generated from ZeroMem.asm
#
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, 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.S
#
# Abstract:
#
# ZeroMem function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# VOID *
# InternalMemZeroMem (
# IN VOID *Buffer,
# IN UINTN Count
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
pushq %rdi
pushq %rcx
xorq %rax, %rax
movq %rcx, %rdi
movq %rdx, %rcx
shrq $3, %rcx
andq $7, %rdx
cld
rep stosq
movq %rdx, %rcx
rep stosb
popq %rax
popq %rdi
ret