]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S
clean up all of eight BaseMemoryLib instances in MdePkg with the following updates:
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibSse2 / X64 / SetMem64.S
index adfbb0c42ecaeb80d3a15483ad66f3c5193bf066..a9565ce97a46a903d388d3f4225045cff7ab0164 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 UINT64 Value\r
 #    )\r
 #------------------------------------------------------------------------------\r
-.intel_syntax noprefix\r
 ASM_GLOBAL ASM_PFX(InternalMemSetMem64)\r
 ASM_PFX(InternalMemSetMem64):\r
-    mov     rax, rcx                    # rax <- Buffer\r
-    xchg    rcx, rdx                    # rcx <- Count & rdx <- Buffer\r
-    test    dl, 8\r
-    movq    xmm0, r8\r
+    movq    %rcx, %rax                    # rax <- Buffer\r
+    xchgq   %rdx, %rcx                    # rcx <- Count & rdx <- Buffer\r
+    testb   $8, %dl\r
+    movq    %r8, %xmm0\r
     jz      L0\r
-    mov     [rdx], r8\r
-    add     rdx, 8\r
-    dec     rcx\r
+    movq    %r8, (%rdx)\r
+    addq    $8, %rdx\r
+    decq    %rcx\r
 L0:\r
-    shr     rcx, 1\r
+    shrq    $1, %rcx\r
     jz      L_SetQwords\r
-    movlhps xmm0, xmm0\r
+    movlhps %xmm0, %xmm0\r
 L1:\r
-    movntdq [rdx], xmm0\r
-    lea     rdx, [rdx + 16]\r
+    movntdq %xmm0, (%rdx)\r
+    leaq    16(%rdx), %rdx\r
     loop    L1\r
     mfence\r
 L_SetQwords:\r
     jnc     L2\r
-    mov     [rdx], r8\r
+    movq    %r8, (%rdx)\r
 L2:\r
     ret\r
 \r