mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-25 16:37:42 +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
|
||
|
|