summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S')
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S29
1 files changed, 14 insertions, 15 deletions
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
index b5dec03031..4ea751f97a 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
@@ -3,7 +3,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
+# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -32,27 +32,26 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-.intel_syntax noprefix
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov r8, rdi
- and edx, 7
- shr rcx, 3
+ pushq %rdi
+ movq %rcx, %rdi
+ movq %rdx, %rcx
+ movq %rdi, %r8
+ andq $7, %rdx
+ shrq $3, %rcx
jz L_ZeroBytes
- pxor mm0, mm0
+ pxor %mm0, %mm0
L0:
- movntq [rdi], mm0
- add rdi, 8
+ movntq %mm0, (%rdi)
+ addq $8, %rdi
loop L0
mfence
L_ZeroBytes:
- xor eax, eax
- mov ecx, edx
+ xorl %eax, %eax
+ movl %edx, %ecx
rep stosb
- mov rax, r8
- pop rdi
+ movq %r8, %rax
+ popq %rdi
ret