2016-05-31 03:52:09 +02:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
;
|
|
|
|
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
2019-04-04 01:06:00 +02:00
|
|
|
; SPDX-License-Identifier: BSD-2-Clause-Patent
|
2016-05-31 03:52:09 +02:00
|
|
|
;
|
|
|
|
; 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
|
|
|
|
|