]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Renamed remotely
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 27 Sep 2008 05:28:23 +0000 (05:28 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 27 Sep 2008 05:28:23 +0000 (05:28 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6017 6f19259b-4bc3-4df7-8a09-765794883524

36 files changed:
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMem.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep8.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemSSE2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMem.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep1.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep8.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemSSE2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMem.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep1.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep8.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemSSE2.asm [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMem.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep1.S [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep1.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep4.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep8.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemSSE2.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMem.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep1.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep4.S [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep4.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep8.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemSSE2.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMem.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep1.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep4.S [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep4.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep8.asm [deleted file]
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemSSE2.asm [deleted file]

diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMem.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMem.asm
new file mode 100644 (file)
index 0000000..9d1e04b
--- /dev/null
@@ -0,0 +1,74 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CopyMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID *\r
+; EFIAPI\r
+; EfiCommonLibCopyMem (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    mov     rax, rdi                    ; rax <- Destination as return value\r
+    jae     @F\r
+    cmp     r9, rdi\r
+    jae     @CopyBackward               ; Copy backward if overlapped\r
+@@:\r
+    mov     rcx, r8\r
+    and     r8, 7\r
+    shr     rcx, 3                      ; rcx <- # of Qwords to copy\r
+    jz      @CopyBytes\r
+    DB      49h, 0fh, 7eh, 0c2h         ; movd r10, mm0 (Save mm0 in r10)\r
+@@:\r
+    DB      0fh, 6fh, 06h               ; movd mm0, [rsi]\r
+    DB      48h, 0fh, 7eh, 07h          ; movd [rdi], mm0\r
+    add     rsi, 8\r
+    add     rdi, 8\r
+    loop    @B\r
+    DB      49h, 0fh, 6eh, 0c2h         ; movd mm0, r10 (Restore mm0)\r
+    jmp     @CopyBytes\r
+@CopyBackward:\r
+    mov     rsi, r9                     ; rsi <- End of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; rdi <- End of Destination\r
+    std                                 ; set direction flag\r
+@CopyBytes:\r
+    mov     rcx, r8\r
+    rep     movsb                       ; Copy bytes backward\r
+    cld\r
+@CopyMemDone:   \r
+    ret\r
+EfiCommonLibCopyMem  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S
new file mode 100644 (file)
index 0000000..79455cf
--- /dev/null
@@ -0,0 +1,66 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2008, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   EfiCopyMemRep1.S
+#
+# Abstract:
+#
+#   CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EfiBind.h>
+
+    .code: 
+
+.global ASM_PFX(EfiCommonLibCopyMem)
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiCommonLibCopyMem (
+#   OUT     VOID                      *Destination,
+#   IN      VOID                      *Source,
+#   IN      UINTN                     Count
+#   );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCommonLibCopyMem):
+      push   %rsi
+      push   %rdi
+      cmp    %rcx,%rdx
+      je     CopyMemDone
+      cmp    $0x0,%r8
+      je     CopyMemDone
+      mov    %rdx,%rsi
+      mov    %rcx,%rdi
+      lea    -1(%r8,%rsi,1),%r9
+      cmp    %rdi,%rsi
+      jae    CopyBytes
+      cmp    %rdi,%r9
+      jb     CopyBytes
+      mov    %r9,%rsi
+      lea    -1(%r8,%rdi,1),%rdi
+      std    
+
+CopyBytes:
+      mov    %r8,%rcx
+      rep movsb %ds:(%rsi),%es:(%rdi)
+      cld    
+
+CopyMemDone:
+      pop    %rdi
+      pop    %rsi
+      retq   
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.asm
new file mode 100644 (file)
index 0000000..b96d861
--- /dev/null
@@ -0,0 +1,58 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiCopyMemRep1.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibCopyMem (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    jae     @CopyBytes\r
+    cmp     r9, rdi\r
+    jb      @CopyBytes                  ; Copy backward if overlapped\r
+    mov     rsi, r9                     ; rsi <- End of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
+    std                                 ; set direction flag\r
+@CopyBytes:\r
+    mov     rcx, r8\r
+    rep     movsb                       ; Copy bytes backward\r
+    cld\r
+@CopyMemDone:\r
+    ret\r
+EfiCommonLibCopyMem  ENDP\r
+\r
+    END\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep4.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep4.asm
new file mode 100644 (file)
index 0000000..9cd3961
--- /dev/null
@@ -0,0 +1,65 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiCopyMemRep4.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibCopyMem (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    jae     @F\r
+    cmp     r9, rdi\r
+    jae     @CopyBackward               ; Copy backward if overlapped\r
+@@:\r
+    mov     rcx, r8\r
+    and     r8, 3\r
+    shr     rcx, 2\r
+    rep     movsd                       ; Copy as many Dwords as possible\r
+    jmp     @CopyBytes\r
+@CopyBackward:\r
+    mov     rsi, r9                     ; rsi <- End of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
+    std                                 ; set direction flag\r
+@CopyBytes:\r
+    mov     rcx, r8\r
+    rep     movsb                       ; Copy bytes backward\r
+    cld\r
+@CopyMemDone:\r
+    ret\r
+EfiCommonLibCopyMem  ENDP\r
+\r
+    END\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep8.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep8.asm
new file mode 100644 (file)
index 0000000..1494b9f
--- /dev/null
@@ -0,0 +1,65 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiCopyMemRep8.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibCopyMem (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    jae     @F\r
+    cmp     r9, rdi\r
+    jae     @CopyBackward               ; Copy backward if overlapped\r
+@@:\r
+    mov     rcx, r8\r
+    and     r8, 7\r
+    shr     rcx, 3\r
+    rep     movsq                       ; Copy as many Qwords as possible\r
+    jmp     @CopyBytes\r
+@CopyBackward:\r
+    mov     rsi, r9                     ; rsi <- End of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
+    std                                 ; set direction flag\r
+@CopyBytes:\r
+    mov     rcx, r8\r
+    rep     movsb                       ; Copy bytes backward\r
+    cld\r
+@CopyMemDone:\r
+    ret\r
+EfiCommonLibCopyMem  ENDP\r
+\r
+    END\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemSSE2.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemSSE2.asm
new file mode 100644 (file)
index 0000000..9e60e94
--- /dev/null
@@ -0,0 +1,80 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   CopyMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   CopyMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibCopyMem (\r
+;   OUT     VOID                      *Destination,\r
+;   IN      VOID                      *Source,\r
+;   IN      UINTN                     Count\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
+    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
+    je      @CopyMemDone\r
+    cmp     r8, 0                       ; if Count == 0, do nothing\r
+    je      @CopyMemDone\r
+    mov     rsi, rdx                    ; rsi <- Source\r
+    mov     rdi, rcx                    ; rdi <- Destination\r
+    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
+    cmp     rsi, rdi\r
+    mov     rax, rdi                    ; rax <- Destination as return value\r
+    jae     @F                          ; Copy forward if Source > Destination\r
+    cmp     r9, rdi                     ; Overlapped?\r
+    jae     @CopyBackward               ; Copy backward if overlapped\r
+@@:\r
+    xor     rcx, rcx\r
+    sub     rcx, rdi                    ; rcx <- -rdi\r
+    and     rcx, 15                     ; rcx + rsi should be 16 bytes aligned\r
+    jz      @F                          ; skip if rcx == 0\r
+    cmp     rcx, r8\r
+    cmova   rcx, r8\r
+    sub     r8, rcx\r
+    rep     movsb\r
+@@:\r
+    mov     rcx, r8\r
+    and     r8, 15\r
+    shr     rcx, 4                      ; rcx <- # of DQwords to copy\r
+    jz      @CopyBytes\r
+@@:\r
+    movdqu  xmm0, [rsi]                 ; rsi may not be 16-byte aligned\r
+    movdqa  [rdi], xmm0                 ; rdi should be 16-byte aligned\r
+    add     rsi, 16\r
+    add     rdi, 16\r
+    loop    @B\r
+    jmp     @CopyBytes                  ; copy remaining bytes\r
+@CopyBackward:\r
+    mov     rsi, r9                     ; rsi <- Last byte of Source\r
+    lea     rdi, [rdi + r8 - 1]         ; rdi <- Last byte of Destination\r
+    std\r
+@CopyBytes:\r
+    mov     rcx, r8\r
+    rep     movsb\r
+    cld\r
+@CopyMemDone:   \r
+    ret\r
+EfiCommonLibCopyMem  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMem.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMem.asm
new file mode 100644 (file)
index 0000000..7568a52
--- /dev/null
@@ -0,0 +1,60 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   SetMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   SetMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID *\r
+; EFIAPI\r
+; EfiCommonLibSetMem (\r
+;   OUT     VOID                      *Buffer,\r
+;   IN      UINTN                     Size,\r
+;   IN      UINT8                     Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibSetMem   PROC    USES    rdi\r
+    cmp     rdx, 0                      ; if Size == 0, do nothing\r
+    je      @SetDone\r
+    mov     rax, r8\r
+    mov     ah, al\r
+    DB      48h, 0fh, 6eh, 0c0h         ; movd mm0, rax\r
+    mov     r8, rcx\r
+    mov     rdi, r8                     ; rdi <- Buffer\r
+    mov     rcx, rdx\r
+    and     edx, 7\r
+    shr     rcx, 3\r
+    jz      @SetBytes\r
+    DB      0fh, 70h, 0C0h, 00h         ; pshufw mm0, mm0, 0h\r
+@@:\r
+    DB      48h, 0fh, 7eh, 07h          ; movd [rdi], mm0\r
+    add     rdi, 8\r
+    loop    @B\r
+@SetBytes:\r
+    mov     ecx, edx\r
+    rep     stosb\r
+    mov     rax, r8\r
+@SetDone:\r
+    ret\r
+EfiCommonLibSetMem   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep1.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep1.asm
new file mode 100644 (file)
index 0000000..ef2ab8c
--- /dev/null
@@ -0,0 +1,46 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiSetMemRep1.asm\r
+;\r
+; Abstract:\r
+;\r
+;   SetMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibSetMem (\r
+;   OUT     VOID                      *Buffer,\r
+;   IN      UINTN                     Size,\r
+;   IN      UINT8                     Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibSetMem   PROC    USES    rdi\r
+    cmp     rdx, 0                      ; if Size == 0, do nothing\r
+    je      @SetDone\r
+    mov     rax, r8\r
+    mov     rdi, rcx\r
+    mov     rcx, rdx\r
+    rep     stosb\r
+@SetDone:\r
+    ret\r
+EfiCommonLibSetMem   ENDP\r
+\r
+    END\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S
new file mode 100644 (file)
index 0000000..a9eb76a
--- /dev/null
@@ -0,0 +1,54 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2008, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   EfiSetMemRep4.S
+#
+# Abstract:
+#
+#   SetMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EfiBind.h>
+
+    .code: 
+
+.global ASM_PFX(EfiCommonLibCopyMem)
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiCommonLibSetMem (
+#   OUT     VOID                      *Buffer,
+#   IN      UINTN                     Size,
+#   IN      UINT8                     Value
+#   );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCommonLibSetMem):
+      push   %rdi
+      cmp    $0x0,%rdx
+      je     SetDone
+      mov    %rcx,%rdi
+      mov    %r8b,%al
+      mov    %al,%ah
+      shrd   $0x10,%eax,%ecx
+      shld   $0x10,%ecx,%eax
+      mov    %rdx,%rcx
+      shr    $0x2,%rcx
+      rep stos %eax,%es:(%rdi)
+      mov    %rdx,%rcx
+      and    $0x3,%rcx
+      rep stos %al,%es:(%rdi)
+SetDone:
+      pop    %rdi
+      retq   
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.asm
new file mode 100644 (file)
index 0000000..8e3e7e5
--- /dev/null
@@ -0,0 +1,53 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiSetMemRep4.asm\r
+;\r
+; Abstract:\r
+;\r
+;   SetMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibSetMem (\r
+;   OUT     VOID                      *Buffer,\r
+;   IN      UINTN                     Size,\r
+;   IN      UINT8                     Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibSetMem   PROC    USES    rdi\r
+    cmp     rdx, 0                      ; if Size == 0, do nothing\r
+    je      @SetDone\r
+    mov     rdi, rcx\r
+    mov     al,  r8b\r
+    mov     ah,  al\r
+    shrd    ecx, eax, 16\r
+    shld    eax, ecx, 16\r
+    mov     rcx, rdx\r
+    shr     rcx, 2\r
+    rep     stosd\r
+    mov     rcx, rdx\r
+    and     rcx, 3\r
+    rep     stosb\r
+@SetDone:\r
+    ret\r
+EfiCommonLibSetMem   ENDP\r
+\r
+    END\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep8.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep8.asm
new file mode 100644 (file)
index 0000000..09a76b1
--- /dev/null
@@ -0,0 +1,58 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiSetMemRep8.asm\r
+;\r
+; Abstract:\r
+;\r
+;   SetMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibSetMem (\r
+;   OUT     VOID                      *Buffer,\r
+;   IN      UINTN                     Size,\r
+;   IN      UINT8                     Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibSetMem   PROC    USES    rdi rbx\r
+    cmp     rdx, 0                      ; if Size == 0, do nothing\r
+    je      @SetDone\r
+    mov     rax, r8\r
+    mov     bl,  al\r
+    mov     bh,  bl\r
+    mov     ax,  bx\r
+    shl     rax, 10h\r
+    mov     ax,  bx\r
+    mov     ebx, eax \r
+    shl     rax, 20h\r
+    mov     eax, ebx\r
+    mov     rdi, rcx\r
+    mov     rcx, rdx\r
+    shr     rcx, 3\r
+    rep     stosq\r
+    mov     rcx, rdx\r
+    and     rcx, 7\r
+    rep     stosb\r
+@SetDone:\r
+    ret\r
+EfiCommonLibSetMem   ENDP\r
+\r
+    END\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemSSE2.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemSSE2.asm
new file mode 100644 (file)
index 0000000..8667d7e
--- /dev/null
@@ -0,0 +1,67 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   SetMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   SetMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; EfiCommonLibSetMem (\r
+;   OUT     VOID                      *Buffer,\r
+;   IN      UINTN                     Size,\r
+;   IN      UINT8                     Value\r
+;   );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibSetMem   PROC    USES    rdi\r
+    cmp     rdx, 0                      ; if Size == 0, do nothing\r
+    je      @SetDone\r
+    mov     rdi, rcx                    ; rdi <- Buffer\r
+    mov     al, r8b                     ; al <- Value\r
+    xor     rcx, rcx\r
+    sub     rcx, rdi\r
+    and     rcx, 15                     ; rcx + rdi aligns on 16-byte boundary\r
+    jz      @F\r
+    cmp     rcx, rdx\r
+    cmova   rcx, rdx\r
+    sub     rdx, rcx\r
+    rep     stosb\r
+@@:\r
+    mov     rcx, rdx\r
+    and     rdx, 15\r
+    shr     rcx, 4\r
+    jz      @SetBytes\r
+    mov     ah, al                      ; ax <- Value repeats twice\r
+    movd    xmm0, eax                   ; xmm0[0..16] <- Value repeats twice\r
+    pshuflw xmm0, xmm0, 0               ; xmm0[0..63] <- Value repeats 8 times\r
+    movlhps xmm0, xmm0                  ; xmm0 <- Value repeats 16 times\r
+@@:\r
+    movdqa  [rdi], xmm0                 ; rdi should be 16-byte aligned\r
+    add     rdi, 16\r
+    loop    @B\r
+@SetBytes:\r
+    mov     ecx, edx                    ; high 32 bits of rcx are always zero\r
+    rep     stosb\r
+@SetDone:\r
+    ret\r
+EfiCommonLibSetMem   ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMem.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMem.asm
new file mode 100644 (file)
index 0000000..5f2c077
--- /dev/null
@@ -0,0 +1,53 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ZeroMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   ZeroMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID *\r
+;  EfiCommonLibZeroMem (\r
+;    IN VOID   *Buffer,\r
+;    IN UINTN  Size\r
+;    );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibZeroMem  PROC    USES    rdi\r
+    mov     rdi, rcx\r
+    mov     rcx, rdx\r
+    mov     r8, rdi\r
+    and     edx, 7\r
+    shr     rcx, 3\r
+    jz      @ZeroBytes\r
+    DB      0fh, 0efh, 0c0h             ; pxor mm0, mm0\r
+@@:\r
+    DB      48h, 0fh, 7eh, 07h          ; movd [rdi], mm0\r
+    add     rdi, 8\r
+    loop    @B\r
+@ZeroBytes:\r
+    xor     eax, eax\r
+    mov     ecx, edx\r
+    rep     stosb\r
+    mov     rax, r8\r
+    ret\r
+EfiCommonLibZeroMem  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep1.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep1.asm
new file mode 100644 (file)
index 0000000..6b66165
--- /dev/null
@@ -0,0 +1,42 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiZeroMemRep1.asm\r
+;\r
+; Abstract:\r
+;\r
+;   ZeroMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EfiCommonLibZeroMem (\r
+;    IN VOID   *Buffer,\r
+;    IN UINTN  Size\r
+;    );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibZeroMem  PROC    USES    rdi\r
+    xor     rax, rax\r
+    mov     rdi, rcx\r
+    mov     rcx, rdx\r
+    rep     stosb\r
+    ret\r
+EfiCommonLibZeroMem  ENDP\r
+\r
+    END\r
+\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S
new file mode 100644 (file)
index 0000000..11b9b45
--- /dev/null
@@ -0,0 +1,46 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2008, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+#   EfiZeroMemRep4.S
+#
+# Abstract:
+#
+#   ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EfiBind.h>
+
+    .code: 
+
+.global ASM_PFX(EfiCommonLibZeroMem)
+#------------------------------------------------------------------------------
+#  VOID
+#  EfiCommonLibZeroMem (
+#    IN VOID   *Buffer,
+#    IN UINTN  Size
+#    );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCommonLibZeroMem):
+      push   %rdi
+      xor    %rax,%rax
+      mov    %rcx,%rdi
+      mov    %rdx,%rcx
+      shr    $0x2,%rcx
+      and    $0x3,%rdx
+      rep stos %eax,%es:(%rdi)
+      mov    %rdx,%rcx
+      rep stos %al,%es:(%rdi)
+      pop    %rdi
+      retq   
\ No newline at end of file
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.asm
new file mode 100644 (file)
index 0000000..7df6eee
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiZeroMemRep4.asm\r
+;\r
+; Abstract:\r
+;\r
+;   ZeroMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EfiCommonLibZeroMem (\r
+;    IN VOID   *Buffer,\r
+;    IN UINTN  Size\r
+;    );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibZeroMem  PROC    USES    rdi\r
+    xor     rax, rax\r
+    mov     rdi, rcx\r
+    mov     rcx, rdx\r
+    shr     rcx, 2\r
+    and     rdx, 3\r
+    rep     stosd\r
+    mov     rcx, rdx\r
+    rep     stosb\r
+    ret\r
+EfiCommonLibZeroMem  ENDP\r
+\r
+    END
\ No newline at end of file
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep8.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep8.asm
new file mode 100644 (file)
index 0000000..a93a702
--- /dev/null
@@ -0,0 +1,45 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   EfiZeroMemRep8.asm\r
+;\r
+; Abstract:\r
+;\r
+;   ZeroMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EfiCommonLibZeroMem (\r
+;    IN VOID   *Buffer,\r
+;    IN UINTN  Size\r
+;    );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibZeroMem  PROC    USES    rdi\r
+    xor     rax, rax\r
+    mov     rdi, rcx\r
+    mov     rcx, rdx\r
+    shr     rcx, 3\r
+    and     rdx, 7\r
+    rep     stosq\r
+    mov     rcx, rdx\r
+    rep     stosb\r
+    ret\r
+EfiCommonLibZeroMem  ENDP\r
+\r
+    END
\ No newline at end of file
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemSSE2.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemSSE2.asm
new file mode 100644 (file)
index 0000000..58cf76e
--- /dev/null
@@ -0,0 +1,60 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2007, Intel Corporation\r
+; All rights reserved. This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+;   ZeroMem.asm\r
+;\r
+; Abstract:\r
+;\r
+;   ZeroMem function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    .code\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EfiCommonLibZeroMem (\r
+;    IN VOID   *Buffer,\r
+;    IN UINTN  Size\r
+;    );\r
+;------------------------------------------------------------------------------\r
+EfiCommonLibZeroMem  PROC    USES    rdi\r
+    mov     rdi, rcx\r
+    xor     rcx, rcx\r
+    xor     eax, eax\r
+    sub     rcx, rdi\r
+    and     rcx, 15\r
+    jz      @F\r
+    cmp     rcx, rdx\r
+    cmova   rcx, rdx\r
+    sub     rdx, rcx\r
+    rep     stosb\r
+@@:\r
+    mov     rcx, rdx\r
+    and     edx, 15\r
+    shr     rcx, 4\r
+    jz      @ZeroBytes\r
+    pxor    xmm0, xmm0\r
+@@:\r
+    movdqa  [rdi], xmm0                 ; rdi should be 16-byte aligned\r
+    add     rdi, 16\r
+    loop    @B\r
+@ZeroBytes:\r
+    mov     ecx, edx\r
+    rep     stosb\r
+    ret\r
+EfiCommonLibZeroMem  ENDP\r
+\r
+    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMem.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMem.asm
deleted file mode 100644 (file)
index 9d1e04b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   CopyMem.asm\r
-;\r
-; Abstract:\r
-;\r
-;   CopyMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID *\r
-; EFIAPI\r
-; EfiCommonLibCopyMem (\r
-;   OUT     VOID                      *Destination,\r
-;   IN      VOID                      *Source,\r
-;   IN      UINTN                     Count\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
-    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
-    je      @CopyMemDone\r
-    cmp     r8, 0                       ; if Count == 0, do nothing\r
-    je      @CopyMemDone\r
-    mov     rsi, rdx                    ; rsi <- Source\r
-    mov     rdi, rcx                    ; rdi <- Destination\r
-    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
-    cmp     rsi, rdi\r
-    mov     rax, rdi                    ; rax <- Destination as return value\r
-    jae     @F\r
-    cmp     r9, rdi\r
-    jae     @CopyBackward               ; Copy backward if overlapped\r
-@@:\r
-    mov     rcx, r8\r
-    and     r8, 7\r
-    shr     rcx, 3                      ; rcx <- # of Qwords to copy\r
-    jz      @CopyBytes\r
-    DB      49h, 0fh, 7eh, 0c2h         ; movd r10, mm0 (Save mm0 in r10)\r
-@@:\r
-    DB      0fh, 6fh, 06h               ; movd mm0, [rsi]\r
-    DB      48h, 0fh, 7eh, 07h          ; movd [rdi], mm0\r
-    add     rsi, 8\r
-    add     rdi, 8\r
-    loop    @B\r
-    DB      49h, 0fh, 6eh, 0c2h         ; movd mm0, r10 (Restore mm0)\r
-    jmp     @CopyBytes\r
-@CopyBackward:\r
-    mov     rsi, r9                     ; rsi <- End of Source\r
-    lea     rdi, [rdi + r8 - 1]         ; rdi <- End of Destination\r
-    std                                 ; set direction flag\r
-@CopyBytes:\r
-    mov     rcx, r8\r
-    rep     movsb                       ; Copy bytes backward\r
-    cld\r
-@CopyMemDone:   \r
-    ret\r
-EfiCommonLibCopyMem  ENDP\r
-\r
-    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep1.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep1.S
deleted file mode 100644 (file)
index 79455cf..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   EfiCopyMemRep1.S
-#
-# Abstract:
-#
-#   CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EfiBind.h>
-
-    .code: 
-
-.global ASM_PFX(EfiCommonLibCopyMem)
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiCommonLibCopyMem (
-#   OUT     VOID                      *Destination,
-#   IN      VOID                      *Source,
-#   IN      UINTN                     Count
-#   );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiCommonLibCopyMem):
-      push   %rsi
-      push   %rdi
-      cmp    %rcx,%rdx
-      je     CopyMemDone
-      cmp    $0x0,%r8
-      je     CopyMemDone
-      mov    %rdx,%rsi
-      mov    %rcx,%rdi
-      lea    -1(%r8,%rsi,1),%r9
-      cmp    %rdi,%rsi
-      jae    CopyBytes
-      cmp    %rdi,%r9
-      jb     CopyBytes
-      mov    %r9,%rsi
-      lea    -1(%r8,%rdi,1),%rdi
-      std    
-
-CopyBytes:
-      mov    %r8,%rcx
-      rep movsb %ds:(%rsi),%es:(%rdi)
-      cld    
-
-CopyMemDone:
-      pop    %rdi
-      pop    %rsi
-      retq   
-
-
-
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep1.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep1.asm
deleted file mode 100644 (file)
index b96d861..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiCopyMemRep1.asm\r
-;\r
-; Abstract:\r
-;\r
-;   CopyMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibCopyMem (\r
-;   OUT     VOID                      *Destination,\r
-;   IN      VOID                      *Source,\r
-;   IN      UINTN                     Count\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
-    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
-    je      @CopyMemDone\r
-    cmp     r8, 0                       ; if Count == 0, do nothing\r
-    je      @CopyMemDone\r
-    mov     rsi, rdx                    ; rsi <- Source\r
-    mov     rdi, rcx                    ; rdi <- Destination\r
-    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
-    cmp     rsi, rdi\r
-    jae     @CopyBytes\r
-    cmp     r9, rdi\r
-    jb      @CopyBytes                  ; Copy backward if overlapped\r
-    mov     rsi, r9                     ; rsi <- End of Source\r
-    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
-    std                                 ; set direction flag\r
-@CopyBytes:\r
-    mov     rcx, r8\r
-    rep     movsb                       ; Copy bytes backward\r
-    cld\r
-@CopyMemDone:\r
-    ret\r
-EfiCommonLibCopyMem  ENDP\r
-\r
-    END\r
-\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep4.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep4.asm
deleted file mode 100644 (file)
index 9cd3961..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiCopyMemRep4.asm\r
-;\r
-; Abstract:\r
-;\r
-;   CopyMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibCopyMem (\r
-;   OUT     VOID                      *Destination,\r
-;   IN      VOID                      *Source,\r
-;   IN      UINTN                     Count\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
-    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
-    je      @CopyMemDone\r
-    cmp     r8, 0                       ; if Count == 0, do nothing\r
-    je      @CopyMemDone\r
-    mov     rsi, rdx                    ; rsi <- Source\r
-    mov     rdi, rcx                    ; rdi <- Destination\r
-    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
-    cmp     rsi, rdi\r
-    jae     @F\r
-    cmp     r9, rdi\r
-    jae     @CopyBackward               ; Copy backward if overlapped\r
-@@:\r
-    mov     rcx, r8\r
-    and     r8, 3\r
-    shr     rcx, 2\r
-    rep     movsd                       ; Copy as many Dwords as possible\r
-    jmp     @CopyBytes\r
-@CopyBackward:\r
-    mov     rsi, r9                     ; rsi <- End of Source\r
-    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
-    std                                 ; set direction flag\r
-@CopyBytes:\r
-    mov     rcx, r8\r
-    rep     movsb                       ; Copy bytes backward\r
-    cld\r
-@CopyMemDone:\r
-    ret\r
-EfiCommonLibCopyMem  ENDP\r
-\r
-    END\r
-\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep8.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemRep8.asm
deleted file mode 100644 (file)
index 1494b9f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiCopyMemRep8.asm\r
-;\r
-; Abstract:\r
-;\r
-;   CopyMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibCopyMem (\r
-;   OUT     VOID                      *Destination,\r
-;   IN      VOID                      *Source,\r
-;   IN      UINTN                     Count\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
-    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
-    je      @CopyMemDone\r
-    cmp     r8, 0                       ; if Count == 0, do nothing\r
-    je      @CopyMemDone\r
-    mov     rsi, rdx                    ; rsi <- Source\r
-    mov     rdi, rcx                    ; rdi <- Destination\r
-    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
-    cmp     rsi, rdi\r
-    jae     @F\r
-    cmp     r9, rdi\r
-    jae     @CopyBackward               ; Copy backward if overlapped\r
-@@:\r
-    mov     rcx, r8\r
-    and     r8, 7\r
-    shr     rcx, 3\r
-    rep     movsq                       ; Copy as many Qwords as possible\r
-    jmp     @CopyBytes\r
-@CopyBackward:\r
-    mov     rsi, r9                     ; rsi <- End of Source\r
-    lea     rdi, [rdi + r8 - 1]         ; esi <- End of Destination\r
-    std                                 ; set direction flag\r
-@CopyBytes:\r
-    mov     rcx, r8\r
-    rep     movsb                       ; Copy bytes backward\r
-    cld\r
-@CopyMemDone:\r
-    ret\r
-EfiCommonLibCopyMem  ENDP\r
-\r
-    END\r
-\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemSSE2.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiCopyMemSSE2.asm
deleted file mode 100644 (file)
index 9e60e94..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   CopyMem.asm\r
-;\r
-; Abstract:\r
-;\r
-;   CopyMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibCopyMem (\r
-;   OUT     VOID                      *Destination,\r
-;   IN      VOID                      *Source,\r
-;   IN      UINTN                     Count\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibCopyMem  PROC    USES    rsi rdi\r
-    cmp     rdx, rcx                    ; if Source == Destination, do nothing\r
-    je      @CopyMemDone\r
-    cmp     r8, 0                       ; if Count == 0, do nothing\r
-    je      @CopyMemDone\r
-    mov     rsi, rdx                    ; rsi <- Source\r
-    mov     rdi, rcx                    ; rdi <- Destination\r
-    lea     r9, [rsi + r8 - 1]          ; r9 <- End of Source\r
-    cmp     rsi, rdi\r
-    mov     rax, rdi                    ; rax <- Destination as return value\r
-    jae     @F                          ; Copy forward if Source > Destination\r
-    cmp     r9, rdi                     ; Overlapped?\r
-    jae     @CopyBackward               ; Copy backward if overlapped\r
-@@:\r
-    xor     rcx, rcx\r
-    sub     rcx, rdi                    ; rcx <- -rdi\r
-    and     rcx, 15                     ; rcx + rsi should be 16 bytes aligned\r
-    jz      @F                          ; skip if rcx == 0\r
-    cmp     rcx, r8\r
-    cmova   rcx, r8\r
-    sub     r8, rcx\r
-    rep     movsb\r
-@@:\r
-    mov     rcx, r8\r
-    and     r8, 15\r
-    shr     rcx, 4                      ; rcx <- # of DQwords to copy\r
-    jz      @CopyBytes\r
-@@:\r
-    movdqu  xmm0, [rsi]                 ; rsi may not be 16-byte aligned\r
-    movdqa  [rdi], xmm0                 ; rdi should be 16-byte aligned\r
-    add     rsi, 16\r
-    add     rdi, 16\r
-    loop    @B\r
-    jmp     @CopyBytes                  ; copy remaining bytes\r
-@CopyBackward:\r
-    mov     rsi, r9                     ; rsi <- Last byte of Source\r
-    lea     rdi, [rdi + r8 - 1]         ; rdi <- Last byte of Destination\r
-    std\r
-@CopyBytes:\r
-    mov     rcx, r8\r
-    rep     movsb\r
-    cld\r
-@CopyMemDone:   \r
-    ret\r
-EfiCommonLibCopyMem  ENDP\r
-\r
-    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMem.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMem.asm
deleted file mode 100644 (file)
index 7568a52..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   SetMem.asm\r
-;\r
-; Abstract:\r
-;\r
-;   SetMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID *\r
-; EFIAPI\r
-; EfiCommonLibSetMem (\r
-;   OUT     VOID                      *Buffer,\r
-;   IN      UINTN                     Size,\r
-;   IN      UINT8                     Value\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibSetMem   PROC    USES    rdi\r
-    cmp     rdx, 0                      ; if Size == 0, do nothing\r
-    je      @SetDone\r
-    mov     rax, r8\r
-    mov     ah, al\r
-    DB      48h, 0fh, 6eh, 0c0h         ; movd mm0, rax\r
-    mov     r8, rcx\r
-    mov     rdi, r8                     ; rdi <- Buffer\r
-    mov     rcx, rdx\r
-    and     edx, 7\r
-    shr     rcx, 3\r
-    jz      @SetBytes\r
-    DB      0fh, 70h, 0C0h, 00h         ; pshufw mm0, mm0, 0h\r
-@@:\r
-    DB      48h, 0fh, 7eh, 07h          ; movd [rdi], mm0\r
-    add     rdi, 8\r
-    loop    @B\r
-@SetBytes:\r
-    mov     ecx, edx\r
-    rep     stosb\r
-    mov     rax, r8\r
-@SetDone:\r
-    ret\r
-EfiCommonLibSetMem   ENDP\r
-\r
-    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep1.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep1.asm
deleted file mode 100644 (file)
index ef2ab8c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiSetMemRep1.asm\r
-;\r
-; Abstract:\r
-;\r
-;   SetMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibSetMem (\r
-;   OUT     VOID                      *Buffer,\r
-;   IN      UINTN                     Size,\r
-;   IN      UINT8                     Value\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibSetMem   PROC    USES    rdi\r
-    cmp     rdx, 0                      ; if Size == 0, do nothing\r
-    je      @SetDone\r
-    mov     rax, r8\r
-    mov     rdi, rcx\r
-    mov     rcx, rdx\r
-    rep     stosb\r
-@SetDone:\r
-    ret\r
-EfiCommonLibSetMem   ENDP\r
-\r
-    END\r
-\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep4.S
deleted file mode 100644 (file)
index a9eb76a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   EfiSetMemRep4.S
-#
-# Abstract:
-#
-#   SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EfiBind.h>
-
-    .code: 
-
-.global ASM_PFX(EfiCommonLibCopyMem)
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiCommonLibSetMem (
-#   OUT     VOID                      *Buffer,
-#   IN      UINTN                     Size,
-#   IN      UINT8                     Value
-#   );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiCommonLibSetMem):
-      push   %rdi
-      cmp    $0x0,%rdx
-      je     SetDone
-      mov    %rcx,%rdi
-      mov    %r8b,%al
-      mov    %al,%ah
-      shrd   $0x10,%eax,%ecx
-      shld   $0x10,%ecx,%eax
-      mov    %rdx,%rcx
-      shr    $0x2,%rcx
-      rep stos %eax,%es:(%rdi)
-      mov    %rdx,%rcx
-      and    $0x3,%rcx
-      rep stos %al,%es:(%rdi)
-SetDone:
-      pop    %rdi
-      retq   
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep4.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep4.asm
deleted file mode 100644 (file)
index 8e3e7e5..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiSetMemRep4.asm\r
-;\r
-; Abstract:\r
-;\r
-;   SetMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibSetMem (\r
-;   OUT     VOID                      *Buffer,\r
-;   IN      UINTN                     Size,\r
-;   IN      UINT8                     Value\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibSetMem   PROC    USES    rdi\r
-    cmp     rdx, 0                      ; if Size == 0, do nothing\r
-    je      @SetDone\r
-    mov     rdi, rcx\r
-    mov     al,  r8b\r
-    mov     ah,  al\r
-    shrd    ecx, eax, 16\r
-    shld    eax, ecx, 16\r
-    mov     rcx, rdx\r
-    shr     rcx, 2\r
-    rep     stosd\r
-    mov     rcx, rdx\r
-    and     rcx, 3\r
-    rep     stosb\r
-@SetDone:\r
-    ret\r
-EfiCommonLibSetMem   ENDP\r
-\r
-    END\r
-\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep8.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemRep8.asm
deleted file mode 100644 (file)
index 09a76b1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiSetMemRep8.asm\r
-;\r
-; Abstract:\r
-;\r
-;   SetMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibSetMem (\r
-;   OUT     VOID                      *Buffer,\r
-;   IN      UINTN                     Size,\r
-;   IN      UINT8                     Value\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibSetMem   PROC    USES    rdi rbx\r
-    cmp     rdx, 0                      ; if Size == 0, do nothing\r
-    je      @SetDone\r
-    mov     rax, r8\r
-    mov     bl,  al\r
-    mov     bh,  bl\r
-    mov     ax,  bx\r
-    shl     rax, 10h\r
-    mov     ax,  bx\r
-    mov     ebx, eax \r
-    shl     rax, 20h\r
-    mov     eax, ebx\r
-    mov     rdi, rcx\r
-    mov     rcx, rdx\r
-    shr     rcx, 3\r
-    rep     stosq\r
-    mov     rcx, rdx\r
-    and     rcx, 7\r
-    rep     stosb\r
-@SetDone:\r
-    ret\r
-EfiCommonLibSetMem   ENDP\r
-\r
-    END\r
-\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemSSE2.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiSetMemSSE2.asm
deleted file mode 100644 (file)
index 8667d7e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   SetMem.asm\r
-;\r
-; Abstract:\r
-;\r
-;   SetMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EfiCommonLibSetMem (\r
-;   OUT     VOID                      *Buffer,\r
-;   IN      UINTN                     Size,\r
-;   IN      UINT8                     Value\r
-;   );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibSetMem   PROC    USES    rdi\r
-    cmp     rdx, 0                      ; if Size == 0, do nothing\r
-    je      @SetDone\r
-    mov     rdi, rcx                    ; rdi <- Buffer\r
-    mov     al, r8b                     ; al <- Value\r
-    xor     rcx, rcx\r
-    sub     rcx, rdi\r
-    and     rcx, 15                     ; rcx + rdi aligns on 16-byte boundary\r
-    jz      @F\r
-    cmp     rcx, rdx\r
-    cmova   rcx, rdx\r
-    sub     rdx, rcx\r
-    rep     stosb\r
-@@:\r
-    mov     rcx, rdx\r
-    and     rdx, 15\r
-    shr     rcx, 4\r
-    jz      @SetBytes\r
-    mov     ah, al                      ; ax <- Value repeats twice\r
-    movd    xmm0, eax                   ; xmm0[0..16] <- Value repeats twice\r
-    pshuflw xmm0, xmm0, 0               ; xmm0[0..63] <- Value repeats 8 times\r
-    movlhps xmm0, xmm0                  ; xmm0 <- Value repeats 16 times\r
-@@:\r
-    movdqa  [rdi], xmm0                 ; rdi should be 16-byte aligned\r
-    add     rdi, 16\r
-    loop    @B\r
-@SetBytes:\r
-    mov     ecx, edx                    ; high 32 bits of rcx are always zero\r
-    rep     stosb\r
-@SetDone:\r
-    ret\r
-EfiCommonLibSetMem   ENDP\r
-\r
-    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMem.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMem.asm
deleted file mode 100644 (file)
index 5f2c077..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   ZeroMem.asm\r
-;\r
-; Abstract:\r
-;\r
-;   ZeroMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID *\r
-;  EfiCommonLibZeroMem (\r
-;    IN VOID   *Buffer,\r
-;    IN UINTN  Size\r
-;    );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibZeroMem  PROC    USES    rdi\r
-    mov     rdi, rcx\r
-    mov     rcx, rdx\r
-    mov     r8, rdi\r
-    and     edx, 7\r
-    shr     rcx, 3\r
-    jz      @ZeroBytes\r
-    DB      0fh, 0efh, 0c0h             ; pxor mm0, mm0\r
-@@:\r
-    DB      48h, 0fh, 7eh, 07h          ; movd [rdi], mm0\r
-    add     rdi, 8\r
-    loop    @B\r
-@ZeroBytes:\r
-    xor     eax, eax\r
-    mov     ecx, edx\r
-    rep     stosb\r
-    mov     rax, r8\r
-    ret\r
-EfiCommonLibZeroMem  ENDP\r
-\r
-    END\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep1.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep1.asm
deleted file mode 100644 (file)
index 6b66165..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiZeroMemRep1.asm\r
-;\r
-; Abstract:\r
-;\r
-;   ZeroMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiCommonLibZeroMem (\r
-;    IN VOID   *Buffer,\r
-;    IN UINTN  Size\r
-;    );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibZeroMem  PROC    USES    rdi\r
-    xor     rax, rax\r
-    mov     rdi, rcx\r
-    mov     rcx, rdx\r
-    rep     stosb\r
-    ret\r
-EfiCommonLibZeroMem  ENDP\r
-\r
-    END\r
-\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep4.S
deleted file mode 100644 (file)
index 11b9b45..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-# Module Name:
-#
-#   EfiZeroMemRep4.S
-#
-# Abstract:
-#
-#   ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EfiBind.h>
-
-    .code: 
-
-.global ASM_PFX(EfiCommonLibZeroMem)
-#------------------------------------------------------------------------------
-#  VOID
-#  EfiCommonLibZeroMem (
-#    IN VOID   *Buffer,
-#    IN UINTN  Size
-#    );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiCommonLibZeroMem):
-      push   %rdi
-      xor    %rax,%rax
-      mov    %rcx,%rdi
-      mov    %rdx,%rcx
-      shr    $0x2,%rcx
-      and    $0x3,%rdx
-      rep stos %eax,%es:(%rdi)
-      mov    %rdx,%rcx
-      rep stos %al,%es:(%rdi)
-      pop    %rdi
-      retq   
\ No newline at end of file
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep4.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep4.asm
deleted file mode 100644 (file)
index 7df6eee..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiZeroMemRep4.asm\r
-;\r
-; Abstract:\r
-;\r
-;   ZeroMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiCommonLibZeroMem (\r
-;    IN VOID   *Buffer,\r
-;    IN UINTN  Size\r
-;    );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibZeroMem  PROC    USES    rdi\r
-    xor     rax, rax\r
-    mov     rdi, rcx\r
-    mov     rcx, rdx\r
-    shr     rcx, 2\r
-    and     rdx, 3\r
-    rep     stosd\r
-    mov     rcx, rdx\r
-    rep     stosb\r
-    ret\r
-EfiCommonLibZeroMem  ENDP\r
-\r
-    END
\ No newline at end of file
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep8.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemRep8.asm
deleted file mode 100644 (file)
index a93a702..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   EfiZeroMemRep8.asm\r
-;\r
-; Abstract:\r
-;\r
-;   ZeroMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiCommonLibZeroMem (\r
-;    IN VOID   *Buffer,\r
-;    IN UINTN  Size\r
-;    );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibZeroMem  PROC    USES    rdi\r
-    xor     rax, rax\r
-    mov     rdi, rcx\r
-    mov     rcx, rdx\r
-    shr     rcx, 3\r
-    and     rdx, 7\r
-    rep     stosq\r
-    mov     rcx, rdx\r
-    rep     stosb\r
-    ret\r
-EfiCommonLibZeroMem  ENDP\r
-\r
-    END
\ No newline at end of file
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemSSE2.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/x64/EfiZeroMemSSE2.asm
deleted file mode 100644 (file)
index 58cf76e..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2007, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-;   ZeroMem.asm\r
-;\r
-; Abstract:\r
-;\r
-;   ZeroMem function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EfiCommonLibZeroMem (\r
-;    IN VOID   *Buffer,\r
-;    IN UINTN  Size\r
-;    );\r
-;------------------------------------------------------------------------------\r
-EfiCommonLibZeroMem  PROC    USES    rdi\r
-    mov     rdi, rcx\r
-    xor     rcx, rcx\r
-    xor     eax, eax\r
-    sub     rcx, rdi\r
-    and     rcx, 15\r
-    jz      @F\r
-    cmp     rcx, rdx\r
-    cmova   rcx, rdx\r
-    sub     rdx, rcx\r
-    rep     stosb\r
-@@:\r
-    mov     rcx, rdx\r
-    and     edx, 15\r
-    shr     rcx, 4\r
-    jz      @ZeroBytes\r
-    pxor    xmm0, xmm0\r
-@@:\r
-    movdqa  [rdi], xmm0                 ; rdi should be 16-byte aligned\r
-    add     rdi, 16\r
-    loop    @B\r
-@ZeroBytes:\r
-    mov     ecx, edx\r
-    rep     stosb\r
-    ret\r
-EfiCommonLibZeroMem  ENDP\r
-\r
-    END\r