1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
16 ;------------------------------------------------------------------------------
21 ;------------------------------------------------------------------------------
23 ; InternalMemSetMem32 (
28 ;------------------------------------------------------------------------------
29 global ASM_PFX(InternalMemSetMem32)
30 ASM_PFX(InternalMemSetMem32):
31 DB 0x49, 0xf, 0x6e, 0xc0 ; movd mm0, r8 (Value)
32 mov rax, rcx ; rax <- Buffer
33 xchg rcx, rdx ; rcx <- Count rdx <- Buffer
34 shr rcx, 1 ; rcx <- # of qwords to set
36 DB 0xf, 0x70, 0xC0, 0x44 ; pshufw mm0, mm0, 44h
38 DB 0xf, 0xe7, 0x2 ; movntq [rdx], mm0
39 lea rdx, [rdx + 8] ; use "lea" to avoid flag changes
44 DB 0xf, 0x7e, 0x2 ; movd [rdx], mm0