From 42b7b15d2798ebd59bdd5192554ca636ed734122 Mon Sep 17 00:00:00 2001 From: Shenglei Zhang Date: Thu, 7 Mar 2019 09:08:43 +0800 Subject: 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 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang Reviewed-by: Liming Gao --- .../BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf | 22 -------- .../Library/BaseMemoryLibRepStr/Ia32/CompareMem.S | 55 ------------------ MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S | 65 --------------------- .../Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S | 54 ------------------ .../Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S | 54 ------------------ .../Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S | 63 --------------------- MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S | 54 ------------------ MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S | 46 --------------- MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S | 43 -------------- MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S | 43 -------------- MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S | 46 --------------- MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S | 49 ---------------- .../Library/BaseMemoryLibRepStr/X64/CompareMem.S | 59 ------------------- MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S | 66 ---------------------- MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S | 56 ------------------ MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S | 56 ------------------ MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S | 56 ------------------ MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S | 56 ------------------ MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S | 47 --------------- MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S | 47 --------------- MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S | 47 --------------- MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S | 46 --------------- MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S | 50 ---------------- 23 files changed, 1180 deletions(-) delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S diff --git a/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf b/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf index 049936deab..7b315b8302 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf +++ b/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf @@ -48,27 +48,16 @@ [Sources.Ia32] Ia32/ScanMem64.nasm - Ia32/ScanMem64.S Ia32/ScanMem32.nasm - Ia32/ScanMem32.S Ia32/ScanMem16.nasm - Ia32/ScanMem16.S Ia32/ScanMem8.nasm - Ia32/ScanMem8.S Ia32/CompareMem.nasm - Ia32/CompareMem.S Ia32/ZeroMem.nasm - Ia32/ZeroMem.S Ia32/SetMem64.nasm - Ia32/SetMem64.S Ia32/SetMem32.nasm - Ia32/SetMem32.S Ia32/SetMem16.nasm - Ia32/SetMem16.S Ia32/SetMem.nasm - Ia32/SetMem.S Ia32/CopyMem.nasm - Ia32/CopyMem.S Ia32/ScanMem64.nasm Ia32/ScanMem32.nasm Ia32/ScanMem16.nasm @@ -84,27 +73,16 @@ [Sources.X64] X64/ScanMem64.nasm - X64/ScanMem64.S X64/ScanMem32.nasm - X64/ScanMem32.S X64/ScanMem16.nasm - X64/ScanMem16.S X64/ScanMem8.nasm - X64/ScanMem8.S X64/CompareMem.nasm - X64/CompareMem.S X64/ZeroMem.nasm - X64/ZeroMem.S X64/SetMem64.nasm - X64/SetMem64.S X64/SetMem32.nasm - X64/SetMem32.S X64/SetMem16.nasm - X64/SetMem16.S X64/SetMem.nasm - X64/SetMem.S X64/CopyMem.nasm - X64/CopyMem.S X64/ScanMem64.nasm X64/ScanMem32.nasm X64/ScanMem16.nasm diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S deleted file mode 100644 index b509586adb..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S +++ /dev/null @@ -1,55 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. 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.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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S deleted file mode 100644 index 5aeef75a5d..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S +++ /dev/null @@ -1,65 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S deleted file mode 100644 index 1977be7938..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2018, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S deleted file mode 100644 index 9751b4a82b..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2018, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S deleted file mode 100644 index 3efc9b82d3..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S +++ /dev/null @@ -1,63 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2018, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S deleted file mode 100644 index f8d8b7a736..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2018, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S deleted file mode 100644 index 9b1f1cb60c..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S deleted file mode 100644 index e35774a8ac..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S deleted file mode 100644 index 0a8b1c3c64..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S deleted file mode 100644 index 2e4b7ced57..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S deleted file mode 100644 index 86ba2414a8..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S +++ /dev/null @@ -1,49 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. 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: -# -# 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 diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S deleted file mode 100644 index 3087aea0c2..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S +++ /dev/null @@ -1,59 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from CompareMem.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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 ( -# 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 - subq %rdx, %rax - popq %rdi - popq %rsi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S deleted file mode 100644 index 4d7a7d096f..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S +++ /dev/null @@ -1,66 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from CopyMem.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 <- End of Source - cmpq %rdi, %rsi - movq %rdi, %rax # rax <- Destination as return value - jae L0 - cmpq %rdi, %r9 - jae L_CopyBackward # Copy backward if overlapped -L0: - movq %r8, %rcx - andq $7, %r8 - shrq $3, %rcx - rep movsq # Copy as many Qwords as possible - jmp L_CopyBytes -L_CopyBackward: - movq %r9, %rsi # rsi <- End of Source - leaq -1(%rdi, %r8), %rdi # esi <- End of Destination - std # set direction flag -L_CopyBytes: - movq %r8, %rcx - rep movsb # Copy bytes backward - cld - popq %rdi - popq %rsi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S deleted file mode 100644 index 282dc3cd12..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S +++ /dev/null @@ -1,56 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from ScanMem16.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 %rdx, %rcx - movq %r8, %rax - repne scasw - leaq -2(%rdi), %rax - cmovnz %rcx, %rax # set rax to 0 if not found - popq %rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S deleted file mode 100644 index 70426e73be..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S +++ /dev/null @@ -1,56 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from ScanMem32.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 %rdx, %rcx - movq %r8, %rax - repne scasl - leaq -4(%rdi), %rax - cmovnz %rcx, %rax # set rax to 0 if not found - popq %rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S deleted file mode 100644 index eac15bc84e..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S +++ /dev/null @@ -1,56 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from ScanMem64.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 %rdx, %rcx - movq %r8, %rax - repne scasq - leaq -8(%rdi), %rax - cmovnz %rcx, %rax # set rax to 0 if not found - popq %rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S deleted file mode 100644 index cea3f56781..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S +++ /dev/null @@ -1,56 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from ScanMem8.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S deleted file mode 100644 index 2e7edfaeea..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S +++ /dev/null @@ -1,47 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from SetMem.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 - movq %r8, %rax # rax = Value - movq %rcx, %rdi # rdi = Buffer - xchgq %rdx, %rcx # rcx = Count, rdx = Buffer - rep stosb - movq %rdx, %rax # rax = Buffer - popq %rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S deleted file mode 100644 index 4c291e0b87..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S +++ /dev/null @@ -1,47 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from SetMem16.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 - xchgq %rdx, %rcx - rep stosw - movq %rdx, %rax - popq %rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S deleted file mode 100644 index 9b9a63d14f..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S +++ /dev/null @@ -1,47 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from SetMem32.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S deleted file mode 100644 index 6721693a20..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S +++ /dev/null @@ -1,46 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from SetMem64.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 - xchgq %rdx, %rcx - rep stosq - movq %rdx, %rax - popq %rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S deleted file mode 100644 index 83f3901e51..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S +++ /dev/null @@ -1,50 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from ZeroMem.asm -# -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. 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: -# -# 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 - rep stosq - movl %edx, %ecx - rep stosb - popq %rax - popq %rdi - ret - -- cgit v1.2.3