mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-28 12:25:19 +01:00
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
|
||
|
|