]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
clean up all of eight BaseMemoryLib instances in MdePkg with the following updates:
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibMmx / X64 / SetMem16.S
index e3e66203146b34f364fe6614f594ebf5f390fe84..6ae6793a7e6eed2c3ba29d70757b0b0c8fdf1b92 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 UINT16 Value\r
 #    )\r
 #------------------------------------------------------------------------------\r
-.intel_syntax noprefix\r
 ASM_GLOBAL ASM_PFX(InternalMemSetMem16)\r
 ASM_PFX(InternalMemSetMem16):\r
-    push    rdi\r
-    mov     rax, r8\r
-    movq    mm0, rax\r
-    mov     r8, rcx\r
-    mov     rdi, r8\r
-    mov     rcx, rdx\r
-    and     edx, 3\r
-    shr     rcx, 2\r
-    jz      L_SetWords\r
-    pshufw  mm0, mm0, 0x0\r
+    pushq    %rdi\r
+    movq     %r8, %rax \r
+    movq     %rax, %mm0 \r
+    movq     %rcx, %r8 \r
+    movq     %r8, %rdi \r
+    movq     %rdx, %rcx \r
+    andl     $3, %edx \r
+    shrq     $2, %rcx\r
+    jz       L_SetWords\r
+    .byte    0x0f, 0x70, 0x0C0, 0x00\r
 L0:\r
-    movntq  [rdi], mm0\r
-    add     rdi, 8\r
-    loop    L0\r
+    movntq   %mm0, (%rdi) \r
+    addq     $8, %rdi \r
+    loop     L0\r
     mfence\r
 L_SetWords:\r
-    mov     ecx, edx\r
+    movl    %edx, %ecx \r
     rep     stosw\r
-    mov     rax, r8\r
-    pop     rdi\r
+    movq    %r8, %rax\r
+    popq    %rdi\r
     ret\r
 \r