#\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 UINTN Count\r
# );\r
#------------------------------------------------------------------------------\r
-.intel_syntax noprefix\r
ASM_GLOBAL ASM_PFX(InternalMemZeroMem)\r
ASM_PFX(InternalMemZeroMem):\r
- push rdi\r
- mov rdi, rcx\r
- xor rcx, rcx\r
- xor eax, eax\r
- sub rcx, rdi\r
- and rcx, 15\r
- mov r8, rdi\r
+ pushq %rdi\r
+ movq %rcx, %rdi\r
+ xorq %rcx, %rcx\r
+ xorl %eax, %eax\r
+ subq %rdi, %rcx\r
+ andq $15, %rcx\r
+ movq %rdi, %r8\r
jz L0\r
- cmp rcx, rdx\r
- cmova rcx, rdx\r
- sub rdx, rcx\r
+ cmpq %rdx, %rcx\r
+ cmova %rdx, %rcx\r
+ subq %rcx, %rdx\r
rep stosb\r
L0:\r
- mov rcx, rdx\r
- and edx, 15\r
- shr rcx, 4\r
+ movq %rdx, %rcx\r
+ andl $15, %edx\r
+ shrq $4, %rcx\r
jz L_ZeroBytes\r
- pxor xmm0, xmm0\r
+ pxor %xmm0, %xmm0\r
L1:\r
- movntdq [rdi], xmm0 # rdi should be 16-byte aligned\r
- add rdi, 16\r
+ movntdq %xmm0, (%rdi) # rdi should be 16-byte aligned\r
+ addq $16, %rdi\r
loop L1\r
mfence\r
L_ZeroBytes:\r
- mov ecx, edx\r
+ movl %edx, %ecx\r
rep stosb\r
- mov rax, r8\r
- pop rdi\r
+ movq %r8, %rax\r
+ popq %rdi\r
ret\r