public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Shenglei Zhang <shenglei.zhang@intel.com>
To: edk2-devel@lists.01.org
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: [PATCH v3 06/14] MdePkg/BaseMemoryLibMmx: Remove .S files for IA32 and X64 arch
Date: Mon,  1 Apr 2019 16:29:35 +0800	[thread overview]
Message-ID: <20190401082943.4152-7-shenglei.zhang@intel.com> (raw)
In-Reply-To: <20190401082943.4152-1-shenglei.zhang@intel.com>

.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>
---
 .../BaseMemoryLibMmx/BaseMemoryLibMmx.inf     | 22 -----
 .../BaseMemoryLibMmx/Ia32/CompareMem.S        | 55 ------------
 .../Library/BaseMemoryLibMmx/Ia32/CopyMem.S   | 86 -------------------
 .../Library/BaseMemoryLibMmx/Ia32/ScanMem16.S | 52 -----------
 .../Library/BaseMemoryLibMmx/Ia32/ScanMem32.S | 52 -----------
 .../Library/BaseMemoryLibMmx/Ia32/ScanMem64.S | 61 -------------
 .../Library/BaseMemoryLibMmx/Ia32/ScanMem8.S  | 52 -----------
 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S | 66 --------------
 .../Library/BaseMemoryLibMmx/Ia32/SetMem16.S  | 59 -------------
 .../Library/BaseMemoryLibMmx/Ia32/SetMem32.S  | 52 -----------
 .../Library/BaseMemoryLibMmx/Ia32/SetMem64.S  | 43 ----------
 .../Library/BaseMemoryLibMmx/Ia32/ZeroMem.S   | 54 ------------
 .../Library/BaseMemoryLibMmx/X64/CompareMem.S | 59 -------------
 MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S | 74 ----------------
 .../Library/BaseMemoryLibMmx/X64/ScanMem16.S  | 56 ------------
 .../Library/BaseMemoryLibMmx/X64/ScanMem32.S  | 56 ------------
 .../Library/BaseMemoryLibMmx/X64/ScanMem64.S  | 55 ------------
 .../Library/BaseMemoryLibMmx/X64/ScanMem8.S   | 56 ------------
 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S  | 61 -------------
 .../Library/BaseMemoryLibMmx/X64/SetMem16.S   | 60 -------------
 .../Library/BaseMemoryLibMmx/X64/SetMem32.S   | 55 ------------
 .../Library/BaseMemoryLibMmx/X64/SetMem64.S   | 47 ----------
 MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S | 57 ------------
 23 files changed, 1290 deletions(-)
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
 delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S

diff --git a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf
index d17fcf24b6..9a073d1cd9 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf
+++ b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf
@@ -52,27 +52,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/SetMem64.nasm
-  Ia32/SetMem64.S
   Ia32/SetMem32.nasm
-  Ia32/SetMem32.S
   Ia32/SetMem16.nasm
-  Ia32/SetMem16.S
   Ia32/ZeroMem.nasm
-  Ia32/ZeroMem.S
   Ia32/SetMem.nasm
-  Ia32/SetMem.S
   Ia32/CopyMem.nasm
-  Ia32/CopyMem.S
   Ia32/ScanMem64.nasm
   Ia32/ScanMem32.nasm
   Ia32/ScanMem16.nasm
@@ -99,27 +88,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/SetMem64.nasm
-  X64/SetMem64.S
   X64/SetMem32.nasm
-  X64/SetMem32.S
   X64/SetMem16.nasm
-  X64/SetMem16.S
   X64/ZeroMem.nasm
-  X64/ZeroMem.S
   X64/SetMem.nasm
-  X64/SetMem.S
   X64/CopyMem.nasm
-  X64/CopyMem.S
   X64/IsZeroBuffer.nasm
 
 
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S
deleted file mode 100644
index b509586adb..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S
+++ /dev/null
@@ -1,55 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   CompareMem.Asm
-#
-# Abstract:
-#
-#   CompareMem function
-#
-# Notes:
-#
-#   The following BaseMemoryLib instances contain the same copy of this file:
-#
-#       BaseMemoryLibRepStr
-#       BaseMemoryLibMmx
-#       BaseMemoryLibSse2
-#       BaseMemoryLibOptDxe
-#       BaseMemoryLibOptPei
-#
-#------------------------------------------------------------------------------
-
-ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
-
-#------------------------------------------------------------------------------
-# INTN
-# EFIAPI
-# InternalMemCompareMem (
-#   IN      CONST VOID                *DestinationBuffer,
-#   IN      CONST VOID                *SourceBuffer,
-#   IN      UINTN                     Length
-#   );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemCompareMem):
-    push    %esi
-    push    %edi
-    movl    12(%esp), %esi
-    movl    16(%esp), %edi
-    movl    20(%esp), %ecx
-    repe    cmpsb
-    movzbl  -1(%esi), %eax
-    movzbl  -1(%edi), %edx
-    subl    %edx, %eax
-    pop     %edi
-    pop     %esi
-    ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S
deleted file mode 100644
index b934ff5ae2..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S
+++ /dev/null
@@ -1,86 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   CopyMem.asm
-#
-# Abstract:
-#
-#   CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
-
-#------------------------------------------------------------------------------
-#  VOID *
-#  EFIAPI
-#  InternalMemCopyMem (
-#    IN VOID   *Destination,
-#    IN VOID   *Source,
-#    IN UINTN  Count
-#    );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemCopyMem):
-    push    %esi
-    push    %edi
-    movl    16(%esp), %esi              # esi <- Source
-    movl    12(%esp), %edi              # edi <- Destination
-    movl    20(%esp), %edx              # edx <- Count
-    leal    -1(%esi,%edx,), %eax        # eax <- End of Source
-    cmpl    %edi, %esi
-    jae     L0
-    cmpl    %edi, %eax                  # Overlapped?
-    jae     L_CopyBackward              # Copy backward if overlapped
-L0:
-    xorl    %ecx, %ecx
-    subl    %esi, %ecx
-    andl    $7, %ecx                    # ecx + esi aligns on 8-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    $7, %edx
-    shrl    $3, %ecx                    # ecx <- # of Qwords to copy
-    jz      L_CopyBytes
-    pushl   %eax
-    pushl   %eax
-    movq    %mm0, (%esp)                # save mm0
-L2:
-    movq    (%esi), %mm0
-    movq    %mm0, (%edi)
-    addl    $8, %esi
-    addl    $8, %edi
-    loop    L2
-    movq    (%esp), %mm0                # restore mm0
-    popl    %ecx                        # stack cleanup
-    popl    %ecx                        # 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
-    pop     %edi
-    pop     %esi
-    ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S
deleted file mode 100644
index e247d4ad09..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S
+++ /dev/null
@@ -1,52 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   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/BaseMemoryLibMmx/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S
deleted file mode 100644
index 066fde42ce..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S
+++ /dev/null
@@ -1,52 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   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/BaseMemoryLibMmx/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S
deleted file mode 100644
index b3435d7fc3..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S
+++ /dev/null
@@ -1,61 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   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/BaseMemoryLibMmx/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S
deleted file mode 100644
index 5e451fd7b9..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S
+++ /dev/null
@@ -1,52 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   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/BaseMemoryLibMmx/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S
deleted file mode 100644
index 7329d6818d..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S
+++ /dev/null
@@ -1,66 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   SetMem.asm
-#
-# Abstract:
-#
-#   SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-ASM_GLOBAL ASM_PFX(InternalMemSetMem)
-
-#------------------------------------------------------------------------------
-#  VOID *
-#  InternalMemSetMem (
-#    IN VOID   *Buffer,
-#    IN UINTN  Count,
-#    IN UINT8  Value
-#    )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem):
-    push    %edi
-    movb    16(%esp), %al
-    movb    %al, %ah
-    shrdl   $16, %eax, %edx
-    shldl   $16, %edx, %eax
-    movl    12(%esp), %ecx              # ecx <- Count
-    movl    8(%esp), %edi               # edi <- Buffer
-    movl    %ecx, %edx
-    andl    $7, %edx
-    shrl    $3, %ecx                    # # of Qwords to set
-    jz      L1
-    addl    $-16, %esp
-    movq    %mm0, (%esp)                # save mm0
-    movq    %mm1, 8(%esp)               # save mm1
-    movd    %eax, %mm0
-    movd    %eax, %mm1
-    psllq   $32, %mm0
-    por     %mm1, %mm0                  # fill mm0 with 8 Value's
-L0:
-    movq    %mm0, (%edi)
-    addl    $8, %edi
-    loop    L0
-    movq    (%esp), %mm0                # restore mm0
-    movq    8(%esp), %mm1               # restore mm1
-    addl    $0x10, %esp                 # stack cleanup
-L1:
-    movl    %edx, %ecx
-    rep
-    stosb
-    movl    8(%esp), %eax               # eax <- Buffer as return value
-    pop     %edi
-    ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S
deleted file mode 100644
index 4d84bebba9..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S
+++ /dev/null
@@ -1,59 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   SetMem16.asm
-#
-# Abstract:
-#
-#   SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
-
-#------------------------------------------------------------------------------
-#  VOID *
-#  InternalMemSetMem16 (
-#    IN VOID   *Buffer,
-#    IN UINTN  Count,
-#    IN UINT16 Value
-#    )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem16):
-    push    %edi
-    movl    16(%esp), %eax
-    shrdl   $16, %eax, %edx
-    shldl   $16, %edx, %eax
-    movl    12(%esp), %edx
-    movl    8(%esp), %edi
-    movl    %edx, %ecx
-    andl    $3, %edx
-    shrl    $2, %ecx
-    jz      L1
-    movd    %eax, %mm0
-    movd    %eax, %mm1
-    psllq   $32, %mm0
-    por     %mm1, %mm0
-L0:
-    movq    %mm0, (%edi)
-    addl    $8, %edi
-    loop    L0
-L1:
-    movl    %edx, %ecx
-    rep
-    stosw
-    movl    8(%esp), %eax
-    pop     %edi
-    ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S
deleted file mode 100644
index fb0d0788f9..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S
+++ /dev/null
@@ -1,52 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   SetMem32.asm
-#
-# Abstract:
-#
-#   SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
-
-#------------------------------------------------------------------------------
-#  VOID *
-#  InternalMemSetMem32 (
-#    IN VOID   *Buffer,
-#    IN UINTN  Count,
-#    IN UINT32 Value
-#    )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem32):
-    movl    4(%esp), %eax
-    movl    8(%esp), %ecx
-    movd    12(%esp), %mm0
-    shrl    %ecx
-    movl    %eax, %edx
-    jz      L1
-    movq    %mm0, %mm1
-    psllq   $32, %mm1
-    por     %mm1, %mm0
-L0:
-    movq    %mm0, (%edx)
-    lea     8(%edx), %edx
-    loop    L0
-L1:
-    jnc     L2
-    movd    %mm0, (%edx)
-L2:
-    ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S
deleted file mode 100644
index 53379ad0ef..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S
+++ /dev/null
@@ -1,43 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   SetMem64.asm
-#
-# Abstract:
-#
-#   SetMem64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
-
-#------------------------------------------------------------------------------
-#  VOID *
-#  InternalMemSetMem64 (
-#    IN VOID   *Buffer,
-#    IN UINTN  Count,
-#    IN UINT64 Value
-#    )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem64):
-    movl    4(%esp), %eax
-    movl    8(%esp), %ecx
-    movq    12(%esp), %mm0
-    movl    %eax, %edx
-L0:
-    movq    %mm0, (%edx)
-    lea     8(%edx), %edx
-    loop    L0
-    ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S
deleted file mode 100644
index d6452713ca..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S
+++ /dev/null
@@ -1,54 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   ZeroMem.asm
-#
-# Abstract:
-#
-#   ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
-
-#------------------------------------------------------------------------------
-#  VOID *
-#  EFIAPI
-#  InternalMemZeroMem (
-#    IN VOID   *Buffer,
-#    IN UINTN  Count
-#    );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemZeroMem):
-    push    %edi
-    movl    8(%esp), %edi
-    movl    12(%esp), %ecx
-    movl    %ecx, %edx
-    shrl    $3, %ecx
-    jz      L_ZeroBytes
-    pxor    %mm0, %mm0
-L0:
-    movq    %mm0, (%edi)
-    addl    $8, %edi
-    loop    L0
-L_ZeroBytes:
-    andl    $7, %edx
-    xorl    %eax, %eax
-    movl    %edx, %ecx
-    rep
-    stosb
-    movl    8(%esp), %eax
-    pop     %edi
-    ret
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
deleted file mode 100644
index ee6bbe2715..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
+++ /dev/null
@@ -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
-    subq    %rdx, %rax
-    popq    %rdi
-    popq    %rsi
-    ret
-
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
deleted file mode 100644
index 42a1e28df9..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
+++ /dev/null
@@ -1,74 +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 <- 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                    # rcx <- # of Qwords to copy
-    jz      L_CopyBytes
-    movd    %mm0, %r10                  # (Save mm0 in r10)
-L1:
-    movq    (%rsi), %mm0
-    movntq  %mm0, (%rdi)
-    addq    $8, %rsi
-    addq    $8, %rdi
-    loop    L1
-    mfence
-    movd    %r10, %mm0                  # (Restore mm0)
-    jmp     L_CopyBytes
-L_CopyBackward:
-    movq    %r9, %rsi                   # rsi <- End of Source
-    leaq    -1(%rdi, %r8,), %rdi        # rdi <- 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/BaseMemoryLibMmx/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
deleted file mode 100644
index 358651419a..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem16.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:
-#
-#   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
-
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
deleted file mode 100644
index 93e6cc2f13..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem32.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:
-#
-#   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
-
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
deleted file mode 100644
index 2e59c8dd52..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem64.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:
-#
-#   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
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
deleted file mode 100644
index 4bdacf7e01..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem8.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:
-#
-#   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/BaseMemoryLibMmx/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
deleted file mode 100644
index 16ccb3fc1d..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem.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:
-#
-#   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):
-    push    %rdi
-    movq    %r8, %rax
-    movb    %al, %ah
-    movd    %rax, %mm0
-    movq    %rcx, %r8
-    movq    %r8, %rdi                     # rdi <- Buffer
-    movq    %rdx, %rcx
-    andq    $7, %rdx
-    shrq    $3, %rcx
-    jz      L_SetBytes
-    .byte   0x0f, 0x70, 0x0C0, 0x00
-L0:
-    movntq  %mm0, (%rdi)
-    addq    $8, %rdi
-    loop    L0
-    mfence
-L_SetBytes:
-    movl    %edx, %ecx
-    rep       stosb
-    movq    %r8, %rax
-    pop     %rdi
-    ret
-
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
deleted file mode 100644
index 4f77bacf14..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem16.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:
-#
-#   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     %r8, %rax
-    movd     %rax, %mm0
-    movq     %rcx, %r8
-    movq     %r8, %rdi
-    movq     %rdx, %rcx
-    andl     $3, %edx
-    shrq     $2, %rcx
-    jz       L_SetWords
-    .byte    0x0f, 0x70, 0x0C0, 0x00
-L0:
-    movntq   %mm0, (%rdi)
-    addq     $8, %rdi
-    loop     L0
-    mfence
-L_SetWords:
-    movl    %edx, %ecx
-    rep     stosw
-    movq    %r8, %rax
-    popq    %rdi
-    ret
-
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
deleted file mode 100644
index 82c7cbf4d6..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem32.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:
-#
-#   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):
-    movd    %r8, %mm0                   # mm0 <- Value
-    movq    %rcx, %rax                  # rax <- Buffer
-    xchgq   %rdx, %rcx                  # rcx <- Count  rdx <- Buffer
-    shrq    $1, % rcx                   # rcx <- # of qwords to set
-    jz      L_SetDwords
-   .byte    0x0f, 0x70, 0x0C0, 0x44
-L0:
-    movntq  %mm0, (%rdx)
-    leaq    8(%rdx), %rdx               # use "lea" to avoid flag changes
-    loop    L0
-    mfence
-L_SetDwords:
-    jnc     L1
-    movd    %mm0, (%rdx)
-L1:
-    ret
-
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
deleted file mode 100644
index 110c6f2d9c..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem64.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:
-#
-#   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):
-    movd      %r8, %mm0                 #Value
-    movq      %rcx, %rax                #rax <- Buffer
-    xchg      %rdx, %rcx                #rcx <- Count
-L0:
-    movntq  %mm0, (%rdx)
-    addq    $8, %rdx
-    loop    L0
-    mfence
-    ret
-
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
deleted file mode 100644
index 79f0b3d501..0000000000
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
+++ /dev/null
@@ -1,57 +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
-    movq    %rcx, %rdi
-    movq    %rdx, %rcx
-    movq    %rdi, %r8
-    andq    $7, %rdx
-    shrq    $3, %rcx
-    jz      L_ZeroBytes
-    pxor    %mm0, %mm0
-L0:
-    movntq  %mm0, (%rdi)
-    addq    $8, %rdi
-    loop    L0
-    mfence
-L_ZeroBytes:
-    xorl    %eax, %eax
-    movl    %edx, %ecx
-    rep     stosb
-    movq    %r8, %rax
-    popq    %rdi
-    ret
-
-- 
2.18.0.windows.1



  parent reply	other threads:[~2019-04-01  8:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01  8:29 [PATCH v4 00/14] Remove .S files for IA32 and X64 arch in MdePkg and UefiCpuPkg Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 01/14] UefiCpuPkg/SmmCpuFeaturesLib: Remove .S files for IA32 and X64 arch Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 02/14] UefiCpuPkg/BaseUefiCpuLib: " Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 03/14] UefiCpuPkg/CpuExceptionHandlerLib:Remove.S " Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 04/14] MdePkg/BaseCpuLib: Remove .S " Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 05/14] MdePkg/BaseLib: " Shenglei Zhang
2019-04-01  8:29 ` Shenglei Zhang [this message]
2019-04-01  8:29 ` [PATCH v3 07/14] MdePkg/BaseMemoryLibOptDxe: " Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 08/14] MdePkg/BaseMemoryLibOptPei: " Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 09/14] MdePkg/BaseMemoryLibRepStr: " Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 10/14] MdePkg/BaseMemoryLibSse2: " Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 11/14] CryptoPkg/IntrinsicLib: Remove .S files for IA32 arch Shenglei Zhang
2019-04-01  8:29 ` [PATCH v3 12/14] SourceLevelDebugPkg/DebugAgentCommon: Remove .S files Shenglei Zhang
2019-04-02  1:31   ` Wu, Hao A
2019-04-01  8:29 ` [PATCH v4 13/14] SourceLevelDebugPkg/PeCoffExtraActionLibDebug: " Shenglei Zhang
2019-04-02  1:33   ` Wu, Hao A
2019-04-01  8:29 ` [PATCH v4 14/14] CorebootModulePkg/SecCore: Remove .S files for IA32 arch Shenglei Zhang
2019-04-02  3:25   ` Ma, Maurice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190401082943.4152-7-shenglei.zhang@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox