From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=shenglei.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BD701211EC685 for ; Mon, 1 Apr 2019 01:30:39 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 01:30:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,295,1549958400"; d="scan'208";a="333855430" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by fmsmga005.fm.intel.com with ESMTP; 01 Apr 2019 01:30:38 -0700 From: Shenglei Zhang To: edk2-devel@lists.01.org Cc: Michael D Kinney , Liming Gao Date: Mon, 1 Apr 2019 16:29:39 +0800 Message-Id: <20190401082943.4152-11-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20190401082943.4152-1-shenglei.zhang@intel.com> References: <20190401082943.4152-1-shenglei.zhang@intel.com> Subject: [PATCH v3 10/14] MdePkg/BaseMemoryLibSse2: Remove .S files for IA32 and X64 arch X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2019 08:30:40 -0000 .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 --- .../BaseMemoryLibSse2/BaseMemoryLibSse2.inf | 22 ----- .../BaseMemoryLibSse2/Ia32/CompareMem.S | 55 ------------ .../Library/BaseMemoryLibSse2/Ia32/CopyMem.S | 85 ------------------- .../BaseMemoryLibSse2/Ia32/ScanMem16.S | 52 ------------ .../BaseMemoryLibSse2/Ia32/ScanMem32.S | 52 ------------ .../BaseMemoryLibSse2/Ia32/ScanMem64.S | 61 ------------- .../Library/BaseMemoryLibSse2/Ia32/ScanMem8.S | 52 ------------ .../Library/BaseMemoryLibSse2/Ia32/SetMem.S | 76 ----------------- .../Library/BaseMemoryLibSse2/Ia32/SetMem16.S | 69 --------------- .../Library/BaseMemoryLibSse2/Ia32/SetMem32.S | 68 --------------- .../Library/BaseMemoryLibSse2/Ia32/SetMem64.S | 58 ------------- .../Library/BaseMemoryLibSse2/Ia32/ZeroMem.S | 65 -------------- .../BaseMemoryLibSse2/X64/CompareMem.S | 59 ------------- .../Library/BaseMemoryLibSse2/X64/CopyMem.S | 83 ------------------ .../Library/BaseMemoryLibSse2/X64/ScanMem16.S | 56 ------------ .../Library/BaseMemoryLibSse2/X64/ScanMem32.S | 56 ------------ .../Library/BaseMemoryLibSse2/X64/ScanMem64.S | 56 ------------ .../Library/BaseMemoryLibSse2/X64/ScanMem8.S | 56 ------------ MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S | 72 ---------------- .../Library/BaseMemoryLibSse2/X64/SetMem16.S | 70 --------------- .../Library/BaseMemoryLibSse2/X64/SetMem32.S | 69 --------------- .../Library/BaseMemoryLibSse2/X64/SetMem64.S | 60 ------------- .../Library/BaseMemoryLibSse2/X64/ZeroMem.S | 65 -------------- 23 files changed, 1417 deletions(-) delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S diff --git a/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf b/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf index 771fddaa45..340ca15f06 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf +++ b/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf @@ -47,27 +47,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 @@ -94,27 +83,16 @@ X64/SetMem.nasm X64/CopyMem.nasm 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/IsZeroBuffer.nasm [Packages] diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S deleted file mode 100644 index b509586adb..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S deleted file mode 100644 index 17414abd72..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S +++ /dev/null @@ -1,85 +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 # Overlapped? - jae L_CopyBackward # Copy backward if overlapped -L0: - xorl %ecx, %ecx - subl %edi, %ecx - andl $15, %ecx # ecx + edi aligns on 16-byte boundary - jz L1 - cmpl %edx, %ecx - cmova %edx, %ecx - subl %ecx, %edx # edx <- remaining bytes to copy - rep - movsb -L1: - movl %edx, %ecx - andl $15, %edx - shrl $4, %ecx # ecx <- # of DQwords to copy - jz L_CopyBytes - addl $-16, %esp - movdqu %xmm0, (%esp) -L2: - movdqu (%esi), %xmm0 - movntdq %xmm0, (%edi) - addl $16, %esi - addl $16, %edi - loop L2 - mfence - movdqu (%esp),%xmm0 - addl $16, %esp # stack cleanup - jmp L_CopyBytes -L_CopyBackward: - movl %eax, %esi # esi <- Last byte in Source - leal -1(%edi,%edx,), %edi # edi <- Last byte in Destination - std -L_CopyBytes: - movl %edx, %ecx - rep - movsb - cld - movl 12(%esp), %eax # eax <- Destination as return value - pop %edi - pop %esi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S deleted file mode 100644 index e247d4ad09..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S +++ /dev/null @@ -1,52 +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: -# -# 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 - cmovnz %ecx, %eax - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S deleted file mode 100644 index 066fde42ce..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S +++ /dev/null @@ -1,52 +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: -# -# 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 - cmovnz %ecx, %eax - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S deleted file mode 100644 index b3435d7fc3..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S +++ /dev/null @@ -1,61 +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: -# -# 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 - cmovne %ecx, %eax - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S deleted file mode 100644 index 5e451fd7b9..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S +++ /dev/null @@ -1,52 +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: -# -# 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 - cmovnz %ecx, %eax - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S deleted file mode 100644 index 63e2a993e7..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S +++ /dev/null @@ -1,76 +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: -# -#------------------------------------------------------------------------------ - - - #.MODEL flat,C - .xmm: - .code: - -#------------------------------------------------------------------------------ -# VOID * -# _mem_SetMem ( -# IN VOID *Buffer, -# IN UINTN Count, -# IN UINT8 Value -# ); -#------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(InternalMemSetMem) -ASM_PFX(InternalMemSetMem): - push %edi - movl 12(%esp), %edx # edx <- Count - movl 8(%esp), %edi # edi <- Buffer - movb 16(%esp), %al # al <- Value - xorl %ecx, %ecx - subl %edi, %ecx - andl $15, %ecx # ecx + edi aligns on 16-byte boundary - jz L0 - cmpl %edx, %ecx - cmova %edx, %ecx - subl %ecx, %edx - rep - stosb -L0: - movl %edx, %ecx - andl $15, %edx - shrl $4, %ecx # ecx <- # of DQwords to set - jz L_SetBytes - movb %al, %ah # ax <- Value | (Value << 8) - addl $-16, %esp - movdqu %xmm0, (%esp) - movd %eax, %xmm0 - pshuflw $0, %xmm0, %xmm0 - movlhps %xmm0, %xmm0 -L1: - movntdq %xmm0, (%edi) - addl $16, %edi - loop L1 - mfence - movdqu (%esp), %xmm0 - addl $16, %esp # stack cleanup -L_SetBytes: - movl %edx, %ecx - rep - stosb - movl 8(%esp), %eax # eax <- Buffer as return value - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S deleted file mode 100644 index 9222a18b35..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S +++ /dev/null @@ -1,69 +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 * -# EFIAPI -# InternalMemSetMem16 ( -# IN VOID *Buffer, -# IN UINTN Count, -# IN UINT16 Value -# ) -#------------------------------------------------------------------------------ -ASM_PFX(InternalMemSetMem16): - push %edi - movl 12(%esp), %edx - movl 8(%esp), %edi - xorl %ecx, %ecx - subl %edi, %ecx - andl $15, %ecx # ecx + edi aligns on 16-byte boundary - movl 16(%esp), %eax - jz L0 - shrl %ecx - cmpl %edx, %ecx - cmova %edx, %ecx - subl %ecx, %edx - rep - stosw -L0: - movl %edx, %ecx - andl $7, %edx - shrl $3, %ecx - jz L_SetWords - movd %eax, %xmm0 - pshuflw $0, %xmm0, %xmm0 - movlhps %xmm0, %xmm0 -L1: - movntdq %xmm0, (%edi) - addl $16, %edi - loop L1 - mfence -L_SetWords: - movl %edx, %ecx - rep - stosw - movl 8(%esp), %eax - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S deleted file mode 100644 index 0edbaa2046..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S +++ /dev/null @@ -1,68 +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 * -# EFIAPI -# InternalMemSetMem32 ( -# IN VOID *Buffer, -# IN UINTN Count, -# IN UINT32 Value -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMemSetMem32): - push %edi - movl 12(%esp), %edx - movl 8(%esp), %edi - xorl %ecx, %ecx - subl %edi, %ecx - andl $15, %ecx # ecx + edi aligns on 16-byte boundary - movl 16(%esp), %eax - jz L0 - shrl $2, %ecx - cmpl %edx, %ecx - cmova %edx, %ecx - subl %ecx, %edx - rep - stosl -L0: - movl %edx, %ecx - andl $3, %edx - shrl $2, %ecx - jz L_SetDwords - movd %eax, %xmm0 - pshufd $0, %xmm0, %xmm0 -L1: - movntdq %xmm0, (%edi) - addl $16, %edi - loop L1 - mfence -L_SetDwords: - movl %edx, %ecx - rep - stosl - movl 8(%esp), %eax - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S deleted file mode 100644 index c9e6d63788..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S +++ /dev/null @@ -1,58 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMemSetMem64) - -#------------------------------------------------------------------------------ -# VOID * -# EFIAPI -# InternalMemSetMem64 ( -# IN VOID *Buffer, -# IN UINTN Count, -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMemSetMem64): - movl 4(%esp), %eax - movl 8(%esp), %ecx - testb $8, %al - movl %eax, %edx - movq 0xc(%esp), %xmm0 - jz L1 - movq %xmm0, (%edx) - addl $8, %edx - decl %ecx -L1: - shrl %ecx - jz L_SetQwords - movlhps %xmm0, %xmm0 -L2: - movntdq %xmm0, (%edx) - leal 16(%edx), %edx - loop L2 - mfence -L_SetQwords: - jnc L3 - movq %xmm0, (%edx) -L3: - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S deleted file mode 100644 index fc9f0596d3..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.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: -# -# ZeroMem.asm -# -# Abstract: -# -# ZeroMem function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMemZeroMem) - -#------------------------------------------------------------------------------ -# VOID * -# EFIAPI -# InternalMemZeroMem ( -# IN VOID *Buffer, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMemZeroMem): - push %edi - movl 8(%esp), %edi - movl 12(%esp), %edx - xorl %ecx, %ecx - subl %edi, %ecx - xorl %eax, %eax - andl $15, %ecx - jz L0 - cmpl %edx, %ecx - cmova %edx, %ecx - subl %ecx, %edx - rep - stosb -L0: - movl %edx, %ecx - andl $15, %edx - shrl $4, %ecx - jz L_ZeroBytes - pxor %xmm0, %xmm0 -L1: - movntdq %xmm0, (%edi) - addl $16, %edi - loop L1 - mfence -L_ZeroBytes: - movl %edx, %ecx - rep - stosb - movl 8(%esp), %eax - pop %edi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S deleted file mode 100644 index 26ed8dd866..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S deleted file mode 100644 index bbe433d360..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S +++ /dev/null @@ -1,83 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from CopyMem.asm -# -#------------------------------------------------------------------------------ -# -# 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: -# -# 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 - movdqa %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 diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S deleted file mode 100644 index 282dc3cd12..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S deleted file mode 100644 index eb91dafb85..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S deleted file mode 100644 index 20d20aa3c3..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S deleted file mode 100644 index b1715ea728..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/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/BaseMemoryLibSse2/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S deleted file mode 100644 index eb4ce80e1e..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S +++ /dev/null @@ -1,72 +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 %rcx, %rdi # rdi <- Buffer - movb %r8b, %al # al <- Value - movq %rdi, %r9 # r9 <- Buffer as return value - xorq %rcx, %rcx - subq %rdi, %rcx - andq $15, %rcx # rcx + rdi aligns on 16-byte boundary - jz L0 - cmpq %rdx, %rcx - cmova %rdx, %rcx - subq %rcx, %rdx - rep stosb -L0: - movq %rdx, %rcx - andq $15, %rdx - shrq $4, %rcx - jz L_SetBytes - movb %al, %ah # ax <- Value repeats twice - movdqa %xmm0, 0x10(%rsp) # save xmm0 - movd %eax, %xmm0 # xmm0[0..16] <- Value repeats twice - pshuflw $0, %xmm0, %xmm0 # xmm0[0..63] <- Value repeats 8 times - movlhps %xmm0, %xmm0 # xmm0 <- Value repeats 16 times -L1: - movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned - add $16, %rdi - loop L1 - mfence - movdqa 0x10(%rsp), %xmm0 # restore xmm0 -L_SetBytes: - movl %edx, %ecx # high 32 bits of rcx are always zero - rep stosb - movq %r9, %rax # rax <- Return value - popq %rdi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S deleted file mode 100644 index 74fef09255..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S +++ /dev/null @@ -1,70 +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 %rdi, %r9 - xorq %rcx, %rcx - subq %rdi, %rcx - andq $15, %rcx - movq %r8, %rax - jz L0 - shrq $1, %rcx - cmpq %rdx, %rcx - cmova %rdx, %rcx - subq %rcx, %rdx - rep stosw -L0: - movq %rdx, %rcx - andl $7, %edx - shrq $3, %rcx - jz L_SetWords - movd %eax, %xmm0 - pshuflw $0, %xmm0, %xmm0 - movlhps %xmm0, %xmm0 -L1: - movntdq %xmm0, (%rdi) - addq $16, %rdi - loop L1 - mfence -L_SetWords: - movl %edx, %ecx - rep stosw - movq %r9, %rax - popq %rdi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S deleted file mode 100644 index 24103cf509..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S +++ /dev/null @@ -1,69 +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 %rdi, %r9 - xorq %rcx, %rcx - subq %rdi, %rcx - andq $15, %rcx - movq %r8, %rax - jz L0 - shrq $2, %rcx - cmpq %rdx, %rcx - cmova %rdx, %rcx - subq %rcx, %rdx - rep stosl -L0: - movq %rdx, %rcx - andl $3, %edx - shrq $2, %rcx - jz L_SetDwords - movd %eax, %xmm0 - pshufd $0, %xmm0, %xmm0 -L1: - movntdq %xmm0, (%rdi) - addq $16, %rdi - loop L1 - mfence -L_SetDwords: - movl %edx, %ecx - rep stosl - movq %r9, %rax - popq %rdi - ret diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S deleted file mode 100644 index c44ec08ae6..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S +++ /dev/null @@ -1,60 +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): - movq %rcx, %rax # rax <- Buffer - xchgq %rdx, %rcx # rcx <- Count & rdx <- Buffer - testb $8, %dl - movd %r8, %xmm0 - jz L0 - movq %r8, (%rdx) - addq $8, %rdx - decq %rcx -L0: - shrq $1, %rcx - jz L_SetQwords - movlhps %xmm0, %xmm0 -L1: - movntdq %xmm0, (%rdx) - leaq 16(%rdx), %rdx - loop L1 - mfence -L_SetQwords: - jnc L2 - movq %r8, (%rdx) -L2: - ret - diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S deleted file mode 100644 index 3b00ce7309..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S +++ /dev/null @@ -1,65 +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 - movq %rcx, %rdi - xorq %rcx, %rcx - xorl %eax, %eax - subq %rdi, %rcx - andq $15, %rcx - movq %rdi, %r8 - jz L0 - cmpq %rdx, %rcx - cmova %rdx, %rcx - subq %rcx, %rdx - rep stosb -L0: - movq %rdx, %rcx - andl $15, %edx - shrq $4, %rcx - jz L_ZeroBytes - pxor %xmm0, %xmm0 -L1: - movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned - addq $16, %rdi - loop L1 - mfence -L_ZeroBytes: - movl %edx, %ecx - rep stosb - movq %r8, %rax - popq %rdi - ret -- 2.18.0.windows.1