summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibOptDxe
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibOptDxe')
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S110
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S170
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S104
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S104
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S122
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S104
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S110
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S86
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S86
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S92
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S98
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S120
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S68
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S114
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S114
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S112
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S114
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S96
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S96
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S94
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S102
21 files changed, 1108 insertions, 1108 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S
index d7ea0d1616..5d622f8708 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S
@@ -1,55 +1,55 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CompareMem.S
-#
-# Abstract:
-#
-# CompareMem function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances contain the same copy of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-# BaseMemoryLibOptDxe
-# BaseMemoryLibOptPei
-#
-#------------------------------------------------------------------------------
-
-.globl 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
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CompareMem.S
+#
+# Abstract:
+#
+# CompareMem function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances contain the same copy of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+# BaseMemoryLibOptDxe
+# BaseMemoryLibOptPei
+#
+#------------------------------------------------------------------------------
+
+.globl 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/BaseMemoryLibOptDxe/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S
index 3355829560..a63b4ca9cc 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S
@@ -1,85 +1,85 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CopyMem.S
-#
-# Abstract:
-#
-# CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl 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
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CopyMem.S
+#
+# Abstract:
+#
+# CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+.globl 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/BaseMemoryLibOptDxe/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S
index db66ade1e1..a72151376d 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S
@@ -1,52 +1,52 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem16.Asm
-#
-# Abstract:
-#
-# ScanMem16 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances contain the same copy of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-# BaseMemoryLibOptDxe
-# BaseMemoryLibOptPei
-#
-#------------------------------------------------------------------------------
-
-.globl 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
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem16.Asm
+#
+# Abstract:
+#
+# ScanMem16 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances contain the same copy of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+# BaseMemoryLibOptDxe
+# BaseMemoryLibOptPei
+#
+#------------------------------------------------------------------------------
+
+.globl 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/BaseMemoryLibOptDxe/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S
index 30f5066486..df6f7c03e0 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S
@@ -1,52 +1,52 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem32.S
-#
-# Abstract:
-#
-# ScanMem32 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances contain the same copy of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-# BaseMemoryLibOptDxe
-# BaseMemoryLibOptPei
-#
-#------------------------------------------------------------------------------
-
-.globl 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
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem32.S
+#
+# Abstract:
+#
+# ScanMem32 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances contain the same copy of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+# BaseMemoryLibOptDxe
+# BaseMemoryLibOptPei
+#
+#------------------------------------------------------------------------------
+
+.globl 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/BaseMemoryLibOptDxe/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S
index 5d58c0a56a..158f20973a 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S
@@ -1,61 +1,61 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem64.S
-#
-# Abstract:
-#
-# ScanMem64 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances contain the same copy of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-# BaseMemoryLibOptDxe
-# BaseMemoryLibOptPei
-#
-#------------------------------------------------------------------------------
-
-.globl 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
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem64.S
+#
+# Abstract:
+#
+# ScanMem64 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances contain the same copy of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+# BaseMemoryLibOptDxe
+# BaseMemoryLibOptPei
+#
+#------------------------------------------------------------------------------
+
+.globl 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/BaseMemoryLibOptDxe/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S
index 210292e105..34d8b12fab 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S
@@ -1,52 +1,52 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem8.S
-#
-# Abstract:
-#
-# ScanMem8 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances contain the same copy of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-# BaseMemoryLibOptDxe
-# BaseMemoryLibOptPei
-#
-#------------------------------------------------------------------------------
-
-.globl 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
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem8.S
+#
+# Abstract:
+#
+# ScanMem8 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances contain the same copy of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+# BaseMemoryLibOptDxe
+# BaseMemoryLibOptPei
+#
+#------------------------------------------------------------------------------
+
+.globl 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/BaseMemoryLibOptDxe/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
index b8a60039bb..02c4b5719b 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
@@ -1,55 +1,55 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem.S
-#
-# Abstract:
-#
-# SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .386:
- .code:
-
-.globl ASM_PFX(InternalMemSetMem)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT8 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem):
- push %edi
- movl 12(%esp),%ecx
- movb 16(%esp),%al
- movb %ah, %al
- shrd $16, %eax, %edx
- shld $16, %edx, %eax
- movl %edx, %ecx
- movl 8(%esp),%edi
- shrd $2, %ecx, %ecx
- rep
- stosl
- movl %ecx, %edx
- andl $3, %ecx
- rep
- stosb
- movl 8(%esp),%eax
- pop %edi
- ret
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem.S
+#
+# Abstract:
+#
+# SetMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.globl ASM_PFX(InternalMemSetMem)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT8 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem):
+ push %edi
+ movl 12(%esp),%ecx
+ movb 16(%esp),%al
+ movb %ah, %al
+ shrd $16, %eax, %edx
+ shld $16, %edx, %eax
+ movl %edx, %ecx
+ movl 8(%esp),%edi
+ shrd $2, %ecx, %ecx
+ rep
+ stosl
+ movl %ecx, %edx
+ andl $3, %ecx
+ rep
+ stosb
+ movl 8(%esp),%eax
+ pop %edi
+ ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S
index 99b13261d4..6b4ab69a75 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem16.S
-#
-# Abstract:
-#
-# SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalMemSetMem16)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem16 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT16 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem16):
- push %edi
- movl 16(%esp), %eax
- movl 8(%esp), %edi
- movl 12(%esp), %ecx
- rep
- stosw
- movl 8(%esp), %eax
- pop %edi
- ret
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem16.S
+#
+# Abstract:
+#
+# SetMem16 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalMemSetMem16)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem16 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT16 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem16):
+ push %edi
+ movl 16(%esp), %eax
+ movl 8(%esp), %edi
+ movl 12(%esp), %ecx
+ rep
+ stosw
+ movl 8(%esp), %eax
+ pop %edi
+ ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S
index 8b2721573d..9f9b3c8082 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem32.S
-#
-# Abstract:
-#
-# SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalMemSetMem32)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem32 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT32 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem32):
- push %edi
- movl 16(%esp),%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- rep
- stosl
- movl 8(%esp),%eax
- pop %edi
- ret
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem32.S
+#
+# Abstract:
+#
+# SetMem32 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalMemSetMem32)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem32 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT32 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem32):
+ push %edi
+ movl 16(%esp),%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ rep
+ stosl
+ movl 8(%esp),%eax
+ pop %edi
+ ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S
index e8deeb0fff..d6ab8cf9a2 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S
@@ -1,46 +1,46 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalMemSetMem64)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem64 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT64 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem64):
- push %edi
- movl 12(%esp), %ecx
- movl 16(%esp), %eax
- movl 20(%esp), %edx
- movl 8(%esp), %edi
-L0:
- mov %eax, -8(%edi, %ecx, 8)
- mov %edx, -4(%edi, %ecx, 8)
- loop L0
- movl %edi, %eax
- pop %edi
- ret
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalMemSetMem64)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem64 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT64 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem64):
+ push %edi
+ movl 12(%esp), %ecx
+ movl 16(%esp), %eax
+ movl 20(%esp), %edx
+ movl 8(%esp), %edi
+L0:
+ mov %eax, -8(%edi, %ecx, 8)
+ mov %edx, -4(%edi, %ecx, 8)
+ loop L0
+ movl %edi, %eax
+ pop %edi
+ ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S
index 500a5524f5..25c625b41b 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S
@@ -1,49 +1,49 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ZeroMem.S
-#
-# Abstract:
-#
-# ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalMemZeroMem)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemZeroMem (
-# IN VOID *Buffer,
-# IN UINTN Count
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemZeroMem):
- push %edi
- xorl %eax,%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- movl %ecx,%edx
- shrl $2,%ecx
- andl $3,%edx
- pushl %edi
- rep
- stosl
- movl %edx,%ecx
- rep
- stosb
- popl %eax
- pop %edi
- ret
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ZeroMem.S
+#
+# Abstract:
+#
+# ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalMemZeroMem)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemZeroMem):
+ push %edi
+ xorl %eax,%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ movl %ecx,%edx
+ shrl $2,%ecx
+ andl $3,%edx
+ pushl %edi
+ rep
+ stosl
+ movl %edx,%ecx
+ rep
+ stosb
+ popl %eax
+ pop %edi
+ ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
index 5580d6237a..61343d307d 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
@@ -1,60 +1,60 @@
-#
-# ConvertAsm.py: Automatically generated from CompareMem.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# 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
-# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCompareMem)
-ASM_PFX(InternalMemCompareMem):
- push rsi
- push rdi
- mov rsi, rcx
- mov rdi, rdx
- mov rcx, r8
- repe cmpsb
- movzx rax, byte ptr [rsi - 1]
- movzx rdx, byte ptr [rdi - 1]
- sub rax, rdx
- pop rdi
- pop rsi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from CompareMem.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# 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
+# );
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemCompareMem)
+ASM_PFX(InternalMemCompareMem):
+ push rsi
+ push rdi
+ mov rsi, rcx
+ mov rdi, rdx
+ mov rcx, r8
+ repe cmpsb
+ movzx rax, byte ptr [rsi - 1]
+ movzx rdx, byte ptr [rdi - 1]
+ sub rax, rdx
+ pop rdi
+ pop rsi
+ ret
+
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
index 8fbc90f0e4..273cd5adb4 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
@@ -1,37 +1,37 @@
-#
-# ConvertAsm.py: Automatically generated from CopyMem.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CopyMem.S
-#
-# Abstract:
-#
-# CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemCopyMem (
-# IN VOID *Destination,
-# IN VOID *Source,
-# IN UINTN Count
-# )
+#
+# ConvertAsm.py: Automatically generated from CopyMem.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CopyMem.S
+#
+# Abstract:
+#
+# CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemCopyMem (
+# IN VOID *Destination,
+# IN VOID *Source,
+# IN UINTN Count
+# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
.globl ASM_PFX(InternalMemCopyMem)
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
index 9a94f5d936..b777aac426 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
@@ -1,57 +1,57 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem16.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# 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
-# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem16)
-ASM_PFX(InternalMemScanMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasw
- lea rax, [rdi - 2]
- cmovnz rax, rcx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ScanMem16.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# 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
+# );
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemScanMem16)
+ASM_PFX(InternalMemScanMem16):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repne scasw
+ lea rax, [rdi - 2]
+ cmovnz rax, rcx
+ pop rdi
+ ret
+
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
index 86a6503fb3..8f1804ce06 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
@@ -1,57 +1,57 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem32.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# 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
-# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem32)
-ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ScanMem32.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# 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
+# );
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemScanMem32)
+ASM_PFX(InternalMemScanMem32):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repne scasd
+ lea rax, [rdi - 4]
+ cmovnz rax, rcx
+ pop rdi
+ ret
+
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
index bd1eee7852..573be8d369 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
@@ -1,56 +1,56 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem64.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# 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
-# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem64)
-ASM_PFX(InternalMemScanMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasq
- lea rax, [rdi - 8]
- cmovnz rax, rcx
- pop rdi
- ret
+#
+# ConvertAsm.py: Automatically generated from ScanMem64.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# 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
+# );
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemScanMem64)
+ASM_PFX(InternalMemScanMem64):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repne scasq
+ lea rax, [rdi - 8]
+ cmovnz rax, rcx
+ pop rdi
+ ret
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
index 1d8b4e1b23..1bd944c791 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
@@ -1,57 +1,57 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem8.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# 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
-# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem8)
-ASM_PFX(InternalMemScanMem8):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov rax, r8
- repne scasb
- lea rax, [rdi - 1]
- cmovnz rax, rcx # set rax to 0 if not found
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ScanMem8.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# 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
+# );
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemScanMem8)
+ASM_PFX(InternalMemScanMem8):
+ push rdi
+ mov rdi, rcx
+ mov rcx, rdx
+ mov rax, r8
+ repne scasb
+ lea rax, [rdi - 1]
+ cmovnz rax, rcx # set rax to 0 if not found
+ pop rdi
+ ret
+
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
index 0fb9deeb75..822ec6cafc 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
@@ -1,48 +1,48 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem16.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem16.S
-#
-# Abstract:
-#
-# SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemSetMem16 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT16 Value
-# )
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem16)
-ASM_PFX(InternalMemSetMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosw
- mov rax, rdx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from SetMem16.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem16.S
+#
+# Abstract:
+#
+# SetMem16 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemSetMem16 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT16 Value
+# )
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemSetMem16)
+ASM_PFX(InternalMemSetMem16):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ xchg rcx, rdx
+ rep stosw
+ mov rax, rdx
+ pop rdi
+ ret
+
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
index 00fec5c969..51d5a2f1fe 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
@@ -1,48 +1,48 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem32.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem32.S
-#
-# Abstract:
-#
-# SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemSetMem32 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT32 Value
-# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem32)
-ASM_PFX(InternalMemSetMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosd
- mov rax, rdx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from SetMem32.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem32.S
+#
+# Abstract:
+#
+# SetMem32 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemSetMem32 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT32 Value
+# );
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemSetMem32)
+ASM_PFX(InternalMemSetMem32):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ xchg rcx, rdx
+ rep stosd
+ mov rax, rdx
+ pop rdi
+ ret
+
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
index 359cbb1633..c8e79c6fa3 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
@@ -1,47 +1,47 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem64.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-#------------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem64 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT64 Value
-# )
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem64)
-ASM_PFX(InternalMemSetMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosq
- mov rax, rdx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from SetMem64.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem64 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT64 Value
+# )
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemSetMem64)
+ASM_PFX(InternalMemSetMem64):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ xchg rcx, rdx
+ rep stosq
+ mov rax, rdx
+ pop rdi
+ ret
+
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
index 9c6be9c97e..5adf575146 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
@@ -1,52 +1,52 @@
-#
-# ConvertAsm.py: Automatically generated from ZeroMem.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ZeroMem.S
-#
-# Abstract:
-#
-# ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemZeroMem (
-# IN VOID *Buffer,
-# IN UINTN Count
-# );
-#------------------------------------------------------------------------------
-.intel_syntax noprefix
-.globl ASM_PFX(InternalMemZeroMem)
-ASM_PFX(InternalMemZeroMem):
- push rdi
- push rcx
- xor rax, rax
- mov rdi, rcx
- mov rcx, rdx
- shr rcx, 3
+#
+# ConvertAsm.py: Automatically generated from ZeroMem.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ZeroMem.S
+#
+# Abstract:
+#
+# ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+.intel_syntax noprefix
+.globl ASM_PFX(InternalMemZeroMem)
+ASM_PFX(InternalMemZeroMem):
+ push rdi
+ push rcx
+ xor rax, rax
+ mov rdi, rcx
+ mov rcx, rdx
+ shr rcx, 3
and rdx, 7
- cld
- rep stosq
- mov rcx, rdx
- rep stosb
- pop rax
- pop rdi
- ret
-
+ cld
+ rep stosq
+ mov rcx, rdx
+ rep stosb
+ pop rax
+ pop rdi
+ ret
+