#\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
- push rdi\r
- mov rdi, rcx\r
- mov r9, rdi\r
- xor rcx, rcx\r
- sub rcx, rdi\r
- and rcx, 15\r
- mov rax, r8\r
+ pushq %rdi\r
+ movq %rcx, %rdi\r
+ movq %rdi, %r9\r
+ xorq %rcx, %rcx\r
+ subq %rdi, %rcx\r
+ andq $15, %rcx\r
+ movq %r8, %rax\r
jz L0\r
- shr rcx, 2\r
- cmp rcx, rdx\r
- cmova rcx, rdx\r
- sub rdx, rcx\r
- rep stosd\r
+ shrq $2, %rcx\r
+ cmpq %rdx, %rcx\r
+ cmova %rdx, %rcx\r
+ subq %rcx, %rdx\r
+ rep stosl\r
L0:\r
- mov rcx, rdx\r
- and edx, 3\r
- shr rcx, 2\r
+ movq %rdx, %rcx\r
+ andl $3, %edx\r
+ shrq $2, %rcx\r
jz L_SetDwords\r
- movd xmm0, eax\r
- pshufd xmm0, xmm0, 0\r
+ movd %eax, %xmm0\r
+ pshufd $0, %xmm0, %xmm0\r
L1:\r
- movntdq [rdi], xmm0\r
- add rdi, 16\r
+ movntdq %xmm0, (%rdi)\r
+ addq $16, %rdi\r
loop L1\r
mfence\r
L_SetDwords:\r
- mov ecx, edx\r
- rep stosd\r
- mov rax, r9\r
- pop rdi\r
+ movl %edx, %ecx\r
+ rep stosl\r
+ movq %r9, %rax\r
+ popq %rdi\r
ret\r