]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
clean up all of eight BaseMemoryLib instances in MdePkg with the following updates:
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibMmx / X64 / SetMem.S
index 814d20c7cee13652e02d6d568792396b99f3fa16..a29be89a1fe81c73a57f64facabeb8fafb1fc18f 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 UINT8  Value\r
 #    )\r
 #------------------------------------------------------------------------------\r
-.intel_syntax noprefix\r
 ASM_GLOBAL ASM_PFX(InternalMemSetMem)\r
 ASM_PFX(InternalMemSetMem):\r
-    push    rdi\r
-    mov     rax, r8\r
-    mov     ah, al\r
-    movq    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
+    push    %rdi\r
+    movq    %r8, %rax\r
+    movb    %al, %ah\r
+    movq    %rax, %mm0\r
+    movq    %rcx, %r8\r
+    movq    %r8, %rdi                     # rdi <- Buffer\r
+    movq    %rdx, %rcx\r
+    andq    $7, %rdx \r
+    shrq    $3, %rcx\r
     jz      L_SetBytes\r
-    pshufw  mm0, mm0, 0x0\r
+    .byte   0x0f, 0x70, 0x0C0, 0x00\r
 L0:\r
-    movntq  [rdi], mm0\r
-    add     rdi, 8\r
+    movntq  %mm0, (%rdi) \r
+    addq    $8, %rdi\r
     loop    L0\r
     mfence\r
 L_SetBytes:\r
-    mov     ecx, edx\r
-    rep     stosb\r
-    mov     rax, r8\r
-    pop     rdi\r
+    movl    %edx, %ecx\r
+    rep       stosb\r
+    movq    %r8, %rax\r
+    pop     %rdi\r
     ret\r
 \r