audk/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.nasm

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
993 B
NASM
Raw Normal View History

;------------------------------------------------------------------------------
;
; Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
; SetMem64.nasm
;
; Abstract:
;
; SetMem64 function
;
; Notes:
;
;------------------------------------------------------------------------------
DEFAULT REL
SECTION .text
;------------------------------------------------------------------------------
; VOID *
; InternalMemSetMem64 (
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT64 Value
; )
;------------------------------------------------------------------------------
global ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
movq mm0, r8
mov rax, rcx ; rax <- Buffer
xchg rcx, rdx ; rcx <- Count
.0:
movntq [rdx], mm0
add rdx, 8
loop .0
mfence
ret