1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
16 ;------------------------------------------------------------------------------
21 ;------------------------------------------------------------------------------
29 ;------------------------------------------------------------------------------
30 global ASM_PFX(InternalMemSetMem)
31 ASM_PFX(InternalMemSetMem):
34 push rcx ; push Buffer
35 mov rax, r8 ; rax = Value
36 and rax, 0xff ; rax = lower 8 bits of r8, upper 56 bits are 0
39 shl rax, 0x10 ; rax = ax << 16
41 mov rbx, rax ; ebx = eax
42 shl rax, 0x20 ; rax = rax << 32
43 or rax, rbx ; eax = ebx
44 mov rdi, rcx ; rdi = Buffer
45 mov rcx, rdx ; rcx = Count
46 shr rcx, 3 ; rcx = rcx / 8
49 mov rcx, rdx ; rcx = rdx
50 and rcx, 7 ; rcx = rcx & 7
52 pop rax ; rax = Buffer