mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-24 16:27:42 +01:00
7c0aa811ec
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
44 lines
981 B
NASM
44 lines
981 B
NASM
;------------------------------------------------------------------------------
|
|
;
|
|
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
|
; SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
;
|
|
; Module Name:
|
|
;
|
|
; ZeroMem.Asm
|
|
;
|
|
; Abstract:
|
|
;
|
|
; ZeroMem function
|
|
;
|
|
; Notes:
|
|
;
|
|
;------------------------------------------------------------------------------
|
|
|
|
DEFAULT REL
|
|
SECTION .text
|
|
|
|
;------------------------------------------------------------------------------
|
|
; VOID *
|
|
; InternalMemZeroMem (
|
|
; IN VOID *Buffer,
|
|
; IN UINTN Count
|
|
; );
|
|
;------------------------------------------------------------------------------
|
|
global ASM_PFX(InternalMemZeroMem)
|
|
ASM_PFX(InternalMemZeroMem):
|
|
push rdi
|
|
push rcx
|
|
xor rax, rax
|
|
mov rdi, rcx
|
|
mov rcx, rdx
|
|
shr rcx, 3
|
|
and rdx, 7
|
|
rep stosq
|
|
mov ecx, edx
|
|
rep stosb
|
|
pop rax
|
|
pop rdi
|
|
ret
|
|
|