]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S
clean up all of eight BaseMemoryLib instances in MdePkg with the following updates:
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibSse2 / X64 / ZeroMem.S
index bb2a194544113c95c3570a727c8f4f8250271c4c..eafd155b6f1e3ceee886095ae91ed2b64e764163 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2008, Intel Corporation\r
+# Copyright (c) 2006 - 2009, 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
 #    IN UINTN  Count\r
 #    );\r
 #------------------------------------------------------------------------------\r
-.intel_syntax noprefix\r
 ASM_GLOBAL ASM_PFX(InternalMemZeroMem)\r
 ASM_PFX(InternalMemZeroMem):\r
-    push    rdi\r
-    mov     rdi, rcx\r
-    xor     rcx, rcx\r
-    xor     eax, eax\r
-    sub     rcx, rdi\r
-    and     rcx, 15\r
-    mov     r8, rdi\r
+    pushq   %rdi\r
+    movq    %rcx, %rdi\r
+    xorq    %rcx, %rcx\r
+    xorl    %eax, %eax\r
+    subq    %rdi, %rcx\r
+    andq    $15, %rcx\r
+    movq    %rdi, %r8\r
     jz      L0\r
-    cmp     rcx, rdx\r
-    cmova   rcx, rdx\r
-    sub     rdx, rcx\r
+    cmpq    %rdx, %rcx\r
+    cmova   %rdx, %rcx\r
+    subq    %rcx, %rdx\r
     rep     stosb\r
 L0:\r
-    mov     rcx, rdx\r
-    and     edx, 15\r
-    shr     rcx, 4\r
+    movq    %rdx, %rcx\r
+    andl    $15, %edx\r
+    shrq    $4, %rcx\r
     jz      L_ZeroBytes\r
-    pxor    xmm0, xmm0\r
+    pxor    %xmm0, %xmm0\r
 L1:\r
-    movntdq [rdi], xmm0                 # rdi should be 16-byte aligned\r
-    add     rdi, 16\r
+    movntdq %xmm0, (%rdi)                 # rdi should be 16-byte aligned\r
+    addq    $16, %rdi\r
     loop    L1\r
     mfence\r
 L_ZeroBytes:\r
-    mov     ecx, edx\r
+    movl    %edx, %ecx\r
     rep     stosb\r
-    mov     rax, r8\r
-    pop     rdi\r
+    movq    %r8, %rax\r
+    popq    %rdi\r
     ret\r