]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
clean up all of eight BaseMemoryLib instances in MdePkg with the following updates:
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibMmx / X64 / SetMem32.S
index a67ca6a843b820aa345f58f801137daf45b0bfa0..c983e6d9c1370b8b7a62cd7afa80992b7d0b7903 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 UINT32 Value\r
 #    );\r
 #------------------------------------------------------------------------------\r
-.intel_syntax noprefix\r
 ASM_GLOBAL ASM_PFX(InternalMemSetMem32)\r
 ASM_PFX(InternalMemSetMem32):\r
-    movq    mm0, r8                     # mm0 <- Value\r
-    mov     rax, rcx                    # rax <- Buffer\r
-    xchg    rcx, rdx                    # rcx <- Count  rdx <- Buffer\r
-    shr     rcx, 1                      # rcx <- # of qwords to set\r
+    movq    %r8, %mm0                   # mm0 <- Value\r
+    movq    %rcx, %rax                  # rax <- Buffer\r
+    xchgq   %rdx, %rcx                  # rcx <- Count  rdx <- Buffer\r
+    shrq    $1, % rcx                   # rcx <- # of qwords to set\r
     jz      L_SetDwords\r
-    pshufw  mm0, mm0, 0x44\r
+   .byte    0x0f, 0x70, 0x0C0, 0x44\r
 L0:\r
-    movntq  [rdx], mm0\r
-    lea     rdx, [rdx + 8]              # use "lea" to avoid flag changes\r
+    movntq  %mm0, (%rdx) \r
+    leaq    8(%rdx), %rdx               # use "lea" to avoid flag changes\r
     loop    L0\r
     mfence\r
 L_SetDwords:\r
     jnc     L1\r
-    movd    [rdx], mm0\r
+    movd    %mm0, (%rdx) \r
 L1:\r
     ret\r
 \r