From 73269bfb71137f978fa49e9f80c9ccac15712e59 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Thu, 25 Sep 2008 03:15:26 +0000 Subject: Rename git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5983 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/BaseMemoryLibRepStr/X64/CompareMem.S | 60 +++++++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/CompareMem.asm | 54 +++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S | 67 ++++++++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm | 61 ++++++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S | 57 ++++++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/ScanMem16.asm | 53 +++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S | 57 ++++++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/ScanMem32.asm | 53 +++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S | 57 ++++++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/ScanMem64.asm | 53 +++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S | 57 ++++++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/ScanMem8.asm | 53 +++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S | 48 ++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm | 44 ++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S | 48 ++++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/SetMem16.asm | 44 ++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S | 48 ++++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/SetMem32.asm | 44 ++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S | 47 +++++++++++++++ .../Library/BaseMemoryLibRepStr/X64/SetMem64.asm | 43 ++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S | 51 ++++++++++++++++ MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm | 47 +++++++++++++++ .../Library/BaseMemoryLibRepStr/x64/CompareMem.S | 60 ------------------- .../Library/BaseMemoryLibRepStr/x64/CompareMem.asm | 54 ----------------- MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.S | 67 ---------------------- MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.asm | 61 -------------------- MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.S | 57 ------------------ .../Library/BaseMemoryLibRepStr/x64/ScanMem16.asm | 53 ----------------- MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.S | 57 ------------------ .../Library/BaseMemoryLibRepStr/x64/ScanMem32.asm | 53 ----------------- MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.S | 57 ------------------ .../Library/BaseMemoryLibRepStr/x64/ScanMem64.asm | 53 ----------------- MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.S | 57 ------------------ .../Library/BaseMemoryLibRepStr/x64/ScanMem8.asm | 53 ----------------- MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.S | 48 ---------------- MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm | 44 -------------- MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.S | 48 ---------------- .../Library/BaseMemoryLibRepStr/x64/SetMem16.asm | 44 -------------- MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.S | 48 ---------------- .../Library/BaseMemoryLibRepStr/x64/SetMem32.asm | 44 -------------- MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.S | 47 --------------- .../Library/BaseMemoryLibRepStr/x64/SetMem64.asm | 43 -------------- MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.S | 51 ---------------- MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.asm | 47 --------------- 44 files changed, 1146 insertions(+), 1146 deletions(-) create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.asm create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/CompareMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.S delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.asm (limited to 'MdePkg/Library/BaseMemoryLibRepStr') diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S new file mode 100644 index 0000000000..46dfe0a23c --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S @@ -0,0 +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 +.globl _InternalMemCompareMem +_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/BaseMemoryLibRepStr/X64/CompareMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.asm new file mode 100644 index 0000000000..7446a052e0 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.asm @@ -0,0 +1,54 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; CompareMem function +; +; Notes: +; +; The following BaseMemoryLib instances contain the same copy of this file: +; +; BaseMemoryLibRepStr +; BaseMemoryLibMmx +; BaseMemoryLibSse2 +; BaseMemoryLibOptDxe +; BaseMemoryLibOptPei +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; INTN +; EFIAPI +; InternalMemCompareMem ( +; IN CONST VOID *DestinationBuffer, +; IN CONST VOID *SourceBuffer, +; IN UINTN Length +; ); +;------------------------------------------------------------------------------ +InternalMemCompareMem PROC USES rsi 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 + ret +InternalMemCompareMem ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S new file mode 100644 index 0000000000..fe67040ff6 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S @@ -0,0 +1,67 @@ +# +# 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 +.globl _InternalMemCopyMem +_InternalMemCopyMem: + push rsi + push rdi + mov rsi, rdx # rsi <- Source + mov rdi, rcx # rdi <- Destination + lea r9, [rsi + r8 - 1] # r9 <- End of Source + cmp rsi, rdi + mov rax, rdi # rax <- Destination as return value + jae _InternalMemCopyMem_al_0000 + cmp r9, rdi + jae _atSym_CopyBackward # Copy backward if overlapped +_InternalMemCopyMem_al_0000: + mov rcx, r8 + and r8, 7 + shr rcx, 3 + rep movsq # Copy as many Qwords as possible + jmp _atSym_CopyBytes +_atSym_CopyBackward: + mov rsi, r9 # rsi <- End of Source + lea rdi, [rdi + r8 - 1] # esi <- End of Destination + std # set direction flag +_atSym_CopyBytes: + mov rcx, r8 + rep movsb # Copy bytes backward + cld + pop rdi + pop rsi + ret + diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm new file mode 100644 index 0000000000..c2b5d6f92f --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm @@ -0,0 +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: +; +; CopyMem.Asm +; +; Abstract: +; +; CopyMem function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID * +; EFIAPI +; InternalMemCopyMem ( +; IN VOID *Destination, +; IN VOID *Source, +; IN UINTN Count +; ) +;------------------------------------------------------------------------------ +InternalMemCopyMem PROC USES rsi rdi + mov rsi, rdx ; rsi <- Source + mov rdi, rcx ; rdi <- Destination + lea r9, [rsi + r8 - 1] ; r9 <- End of Source + cmp rsi, rdi + mov rax, rdi ; rax <- Destination as return value + jae @F + cmp r9, rdi + jae @CopyBackward ; Copy backward if overlapped +@@: + mov rcx, r8 + and r8, 7 + shr rcx, 3 + rep movsq ; Copy as many Qwords as possible + jmp @CopyBytes +@CopyBackward: + mov rsi, r9 ; rsi <- End of Source + lea rdi, [rdi + r8 - 1] ; esi <- End of Destination + std ; set direction flag +@CopyBytes: + mov rcx, r8 + rep movsb ; Copy bytes backward + cld + ret +InternalMemCopyMem ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S new file mode 100644 index 0000000000..f56b9e96d8 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S @@ -0,0 +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 +.globl _InternalMemScanMem16 +_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/BaseMemoryLibRepStr/X64/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.asm new file mode 100644 index 0000000000..0871a4b0f5 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.asm @@ -0,0 +1,53 @@ +;------------------------------------------------------------------------------ +; +; 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 +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; CONST VOID * +; EFIAPI +; InternalMemScanMem16 ( +; IN CONST VOID *Buffer, +; IN UINTN Length, +; IN UINT16 Value +; ); +;------------------------------------------------------------------------------ +InternalMemScanMem16 PROC USES rdi + mov rdi, rcx + mov rax, r8 + mov rcx, rdx + repne scasw + lea rax, [rdi - 2] + cmovnz rax, rcx + ret +InternalMemScanMem16 ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S new file mode 100644 index 0000000000..ef9cd758cf --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S @@ -0,0 +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 +.globl _InternalMemScanMem32 +_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/BaseMemoryLibRepStr/X64/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.asm new file mode 100644 index 0000000000..53a33bafb2 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.asm @@ -0,0 +1,53 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; ScanMem32 function +; +; Notes: +; +; The following BaseMemoryLib instances contain the same copy of this file: +; +; BaseMemoryLibRepStr +; BaseMemoryLibMmx +; BaseMemoryLibSse2 +; BaseMemoryLibOptDxe +; BaseMemoryLibOptPei +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; CONST VOID * +; EFIAPI +; InternalMemScanMem32 ( +; IN CONST VOID *Buffer, +; IN UINTN Length, +; IN UINT32 Value +; ); +;------------------------------------------------------------------------------ +InternalMemScanMem32 PROC USES rdi + mov rdi, rcx + mov rax, r8 + mov rcx, rdx + repne scasd + lea rax, [rdi - 4] + cmovnz rax, rcx + ret +InternalMemScanMem32 ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S new file mode 100644 index 0000000000..ee2ce39ba1 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S @@ -0,0 +1,57 @@ +# +# 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 +.globl _InternalMemScanMem64 +_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/BaseMemoryLibRepStr/X64/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.asm new file mode 100644 index 0000000000..71f85a1ab7 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.asm @@ -0,0 +1,53 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; ScanMem64 function +; +; Notes: +; +; The following BaseMemoryLib instances contain the same copy of this file: +; +; BaseMemoryLibRepStr +; BaseMemoryLibMmx +; BaseMemoryLibSse2 +; BaseMemoryLibOptDxe +; BaseMemoryLibOptPei +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; CONST VOID * +; EFIAPI +; InternalMemScanMem64 ( +; IN CONST VOID *Buffer, +; IN UINTN Length, +; IN UINT64 Value +; ); +;------------------------------------------------------------------------------ +InternalMemScanMem64 PROC USES rdi + mov rdi, rcx + mov rax, r8 + mov rcx, rdx + repne scasq + lea rax, [rdi - 8] + cmovnz rax, rcx + ret +InternalMemScanMem64 ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S new file mode 100644 index 0000000000..4ff3a959c8 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S @@ -0,0 +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 +.globl _InternalMemScanMem8 +_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/BaseMemoryLibRepStr/X64/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.asm new file mode 100644 index 0000000000..39adb01b7f --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.asm @@ -0,0 +1,53 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; ScanMem8 function +; +; Notes: +; +; The following BaseMemoryLib instances contain the same copy of this file: +; +; BaseMemoryLibRepStr +; BaseMemoryLibMmx +; BaseMemoryLibSse2 +; BaseMemoryLibOptDxe +; BaseMemoryLibOptPei +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; CONST VOID * +; EFIAPI +; InternalMemScanMem8 ( +; IN CONST VOID *Buffer, +; IN UINTN Length, +; IN UINT8 Value +; ); +;------------------------------------------------------------------------------ +InternalMemScanMem8 PROC USES 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 + ret +InternalMemScanMem8 ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S new file mode 100644 index 0000000000..d9f8b06e0c --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S @@ -0,0 +1,48 @@ +# +# ConvertAsm.py: Automatically generated from SetMem.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: +# +# SetMem.S +# +# Abstract: +# +# SetMem function +# +# Notes: +# +#------------------------------------------------------------------------------ + + +#------------------------------------------------------------------------------ +# VOID * +# EFIAPI +# InternalMemSetMem ( +# IN VOID *Buffer, +# IN UINTN Count, +# IN UINT8 Value +# ) +#------------------------------------------------------------------------------ +.intel_syntax +.globl _InternalMemSetMem +_InternalMemSetMem: + push rdi + mov rax, r8 # rax = Value + mov rdi, rcx # rdi = Buffer + xchg rcx, rdx # rcx = Count, rdx = Buffer + rep stosb + mov rax, rdx # rax = Buffer + pop rdi + ret + diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm new file mode 100644 index 0000000000..fe1bc70f6b --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm @@ -0,0 +1,44 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; SetMem function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID * +; EFIAPI +; InternalMemSetMem ( +; IN VOID *Buffer, +; IN UINTN Count, +; IN UINT8 Value +; ) +;------------------------------------------------------------------------------ +InternalMemSetMem PROC USES rdi + mov rax, r8 ; rax = Value + mov rdi, rcx ; rdi = Buffer + xchg rcx, rdx ; rcx = Count, rdx = Buffer + rep stosb + mov rax, rdx ; rax = Buffer + ret +InternalMemSetMem ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S new file mode 100644 index 0000000000..5f196462c6 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S @@ -0,0 +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 +.globl _InternalMemSetMem16 +_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/BaseMemoryLibRepStr/X64/SetMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.asm new file mode 100644 index 0000000000..fce9ed7ed5 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.asm @@ -0,0 +1,44 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; SetMem16 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID * +; EFIAPI +; InternalMemSetMem16 ( +; IN VOID *Buffer, +; IN UINTN Count, +; IN UINT16 Value +; ) +;------------------------------------------------------------------------------ +InternalMemSetMem16 PROC USES rdi + mov rdi, rcx + mov rax, r8 + xchg rcx, rdx + rep stosw + mov rax, rdx + ret +InternalMemSetMem16 ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S new file mode 100644 index 0000000000..72243ae8c2 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S @@ -0,0 +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 +.globl _InternalMemSetMem32 +_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/BaseMemoryLibRepStr/X64/SetMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.asm new file mode 100644 index 0000000000..ce9e54da85 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.asm @@ -0,0 +1,44 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; SetMem32 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID * +; EFIAPI +; InternalMemSetMem32 ( +; IN VOID *Buffer, +; IN UINTN Count, +; IN UINT32 Value +; ); +;------------------------------------------------------------------------------ +InternalMemSetMem32 PROC USES rdi + mov rdi, rcx + mov rax, r8 + xchg rcx, rdx + rep stosd + mov rax, rdx + ret +InternalMemSetMem32 ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S new file mode 100644 index 0000000000..a8a4a0b5a0 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S @@ -0,0 +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 +.globl _InternalMemSetMem64 +_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/BaseMemoryLibRepStr/X64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.asm new file mode 100644 index 0000000000..97884a36fe --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.asm @@ -0,0 +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: +; +; SetMem64.Asm +; +; Abstract: +; +; SetMem64 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID * +; InternalMemSetMem64 ( +; IN VOID *Buffer, +; IN UINTN Count, +; IN UINT64 Value +; ) +;------------------------------------------------------------------------------ +InternalMemSetMem64 PROC USES rdi + mov rdi, rcx + mov rax, r8 + xchg rcx, rdx + rep stosq + mov rax, rdx + ret +InternalMemSetMem64 ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S new file mode 100644 index 0000000000..6233b0632a --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S @@ -0,0 +1,51 @@ +# +# 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 +.globl _InternalMemZeroMem +_InternalMemZeroMem: + push rdi + push rcx + xor rax, rax + mov rdi, rcx + mov rcx, rdx + shr rcx, 3 + and rdx, 7 + rep stosq + mov ecx, edx + rep stosb + pop rax + pop rdi + ret + diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm new file mode 100644 index 0000000000..c01af8e6e4 --- /dev/null +++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm @@ -0,0 +1,47 @@ +;------------------------------------------------------------------------------ +; +; 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.Asm +; +; Abstract: +; +; ZeroMem function +; +; Notes: +; +;------------------------------------------------------------------------------ + + .code + +;------------------------------------------------------------------------------ +; VOID * +; InternalMemZeroMem ( +; IN VOID *Buffer, +; IN UINTN Count +; ); +;------------------------------------------------------------------------------ +InternalMemZeroMem PROC USES rdi + push rcx + xor rax, rax + mov rdi, rcx + mov rcx, rdx + shr rcx, 3 + and rdx, 7 + rep stosq + mov ecx, edx + rep stosb + pop rax + ret +InternalMemZeroMem ENDP + + END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/CompareMem.S deleted file mode 100644 index 46dfe0a23c..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/CompareMem.S +++ /dev/null @@ -1,60 +0,0 @@ -# -# 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 -.globl _InternalMemCompareMem -_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/BaseMemoryLibRepStr/x64/CompareMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/CompareMem.asm deleted file mode 100644 index 7446a052e0..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/CompareMem.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES rsi 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 - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.S deleted file mode 100644 index fe67040ff6..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.S +++ /dev/null @@ -1,67 +0,0 @@ -# -# 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 -.globl _InternalMemCopyMem -_InternalMemCopyMem: - push rsi - push rdi - mov rsi, rdx # rsi <- Source - mov rdi, rcx # rdi <- Destination - lea r9, [rsi + r8 - 1] # r9 <- End of Source - cmp rsi, rdi - mov rax, rdi # rax <- Destination as return value - jae _InternalMemCopyMem_al_0000 - cmp r9, rdi - jae _atSym_CopyBackward # Copy backward if overlapped -_InternalMemCopyMem_al_0000: - mov rcx, r8 - and r8, 7 - shr rcx, 3 - rep movsq # Copy as many Qwords as possible - jmp _atSym_CopyBytes -_atSym_CopyBackward: - mov rsi, r9 # rsi <- End of Source - lea rdi, [rdi + r8 - 1] # esi <- End of Destination - std # set direction flag -_atSym_CopyBytes: - mov rcx, r8 - rep movsb # Copy bytes backward - cld - pop rdi - pop rsi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.asm deleted file mode 100644 index c2b5d6f92f..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/CopyMem.asm +++ /dev/null @@ -1,61 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.Asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ) -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES rsi rdi - mov rsi, rdx ; rsi <- Source - mov rdi, rcx ; rdi <- Destination - lea r9, [rsi + r8 - 1] ; r9 <- End of Source - cmp rsi, rdi - mov rax, rdi ; rax <- Destination as return value - jae @F - cmp r9, rdi - jae @CopyBackward ; Copy backward if overlapped -@@: - mov rcx, r8 - and r8, 7 - shr rcx, 3 - rep movsq ; Copy as many Qwords as possible - jmp @CopyBytes -@CopyBackward: - mov rsi, r9 ; rsi <- End of Source - lea rdi, [rdi + r8 - 1] ; esi <- End of Destination - std ; set direction flag -@CopyBytes: - mov rcx, r8 - rep movsb ; Copy bytes backward - cld - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.S deleted file mode 100644 index f56b9e96d8..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.S +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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 -.globl _InternalMemScanMem16 -_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/BaseMemoryLibRepStr/x64/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.asm deleted file mode 100644 index 0871a4b0f5..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem16.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasw - lea rax, [rdi - 2] - cmovnz rax, rcx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.S deleted file mode 100644 index ef9cd758cf..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.S +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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 -.globl _InternalMemScanMem32 -_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/BaseMemoryLibRepStr/x64/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.asm deleted file mode 100644 index 53a33bafb2..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem32.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasd - lea rax, [rdi - 4] - cmovnz rax, rcx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.S deleted file mode 100644 index ee2ce39ba1..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.S +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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 -.globl _InternalMemScanMem64 -_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/BaseMemoryLibRepStr/x64/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.asm deleted file mode 100644 index 71f85a1ab7..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem64.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasq - lea rax, [rdi - 8] - cmovnz rax, rcx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.S deleted file mode 100644 index 4ff3a959c8..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.S +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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 -.globl _InternalMemScanMem8 -_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/BaseMemoryLibRepStr/x64/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.asm deleted file mode 100644 index 39adb01b7f..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ScanMem8.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES 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 - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.S deleted file mode 100644 index d9f8b06e0c..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.S +++ /dev/null @@ -1,48 +0,0 @@ -# -# ConvertAsm.py: Automatically generated from SetMem.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: -# -# SetMem.S -# -# Abstract: -# -# SetMem function -# -# Notes: -# -#------------------------------------------------------------------------------ - - -#------------------------------------------------------------------------------ -# VOID * -# EFIAPI -# InternalMemSetMem ( -# IN VOID *Buffer, -# IN UINTN Count, -# IN UINT8 Value -# ) -#------------------------------------------------------------------------------ -.intel_syntax -.globl _InternalMemSetMem -_InternalMemSetMem: - push rdi - mov rax, r8 # rax = Value - mov rdi, rcx # rdi = Buffer - xchg rcx, rdx # rcx = Count, rdx = Buffer - rep stosb - mov rax, rdx # rax = Buffer - pop rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm deleted file mode 100644 index fe1bc70f6b..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.Asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES rdi - mov rax, r8 ; rax = Value - mov rdi, rcx ; rdi = Buffer - xchg rcx, rdx ; rcx = Count, rdx = Buffer - rep stosb - mov rax, rdx ; rax = Buffer - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.S deleted file mode 100644 index 5f196462c6..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.S +++ /dev/null @@ -1,48 +0,0 @@ -# -# 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 -.globl _InternalMemSetMem16 -_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/BaseMemoryLibRepStr/x64/SetMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.asm deleted file mode 100644 index fce9ed7ed5..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem16.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.Asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosw - mov rax, rdx - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.S deleted file mode 100644 index 72243ae8c2..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.S +++ /dev/null @@ -1,48 +0,0 @@ -# -# 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 -.globl _InternalMemSetMem32 -_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/BaseMemoryLibRepStr/x64/SetMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.asm deleted file mode 100644 index ce9e54da85..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem32.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.Asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosd - mov rax, rdx - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.S deleted file mode 100644 index a8a4a0b5a0..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.S +++ /dev/null @@ -1,47 +0,0 @@ -# -# 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 -.globl _InternalMemSetMem64 -_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/BaseMemoryLibRepStr/x64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.asm deleted file mode 100644 index 97884a36fe..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/SetMem64.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.Asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosq - mov rax, rdx - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.S deleted file mode 100644 index 6233b0632a..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.S +++ /dev/null @@ -1,51 +0,0 @@ -# -# 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 -.globl _InternalMemZeroMem -_InternalMemZeroMem: - push rdi - push rcx - xor rax, rax - mov rdi, rcx - mov rcx, rdx - shr rcx, 3 - and rdx, 7 - rep stosq - mov ecx, edx - rep stosb - pop rax - pop rdi - ret - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.asm deleted file mode 100644 index c01af8e6e4..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/x64/ZeroMem.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation -; All rights reserved. This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.Asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES rdi - push rcx - xor rax, rax - mov rdi, rcx - mov rcx, rdx - shr rcx, 3 - and rdx, 7 - rep stosq - mov ecx, edx - rep stosb - pop rax - ret -InternalMemZeroMem ENDP - - END -- cgit v1.2.3