1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; This program and the accompanying materials
5 ; are licensed and made available under the terms and conditions of the BSD License
6 ; which accompanies this distribution. The full text of the license may be found at
7 ; http://opensource.org/licenses/bsd-license.php.
9 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 ;------------------------------------------------------------------------------
27 ;------------------------------------------------------------------------------
29 ; InternalMemSetMem32 (
34 ;------------------------------------------------------------------------------
35 global ASM_PFX(InternalMemSetMem32)
36 ASM_PFX(InternalMemSetMem32):
37 DB 0x49, 0xf, 0x6e, 0xc0 ; movd mm0, r8 (Value)
38 mov rax, rcx ; rax <- Buffer
39 xchg rcx, rdx ; rcx <- Count rdx <- Buffer
40 shr rcx, 1 ; rcx <- # of qwords to set
42 DB 0xf, 0x70, 0xC0, 0x44 ; pshufw mm0, mm0, 44h
44 DB 0xf, 0xe7, 0x2 ; movntq [rdx], mm0
45 lea rdx, [rdx + 8] ; use "lea" to avoid flag changes
50 DB 0xf, 0x7e, 0x2 ; movd [rdx], mm0