#\r
# Module Name:\r
#\r
-# SetMem.Asm\r
+# SetMem.S\r
#\r
# Abstract:\r
#\r
ASM_PFX(InternalMemZeroMem):\r
push rdi\r
push rbx\r
- push rcx # push Buffer\r
- mov rax, r8 # rax = Value\r
- and rax, 0xff # rax = lower 8 bits of r8, upper 56 bits are 0\r
- mov ah, al # ah = al\r
- mov bx, ax # bx = ax\r
- shl rax, 0x10 # rax = ax << 16\r
- mov ax, bx # ax = bx\r
- mov rbx, rax # ebx = eax\r
- shl rax, 0x20 # rax = rax << 32\r
- or rax, rbx # eax = ebx\r
- mov rdi, rcx # rdi = Buffer\r
- mov rcx, rdx # rcx = Count\r
- shr rcx, 3 # rcx = rcx / 8\r
+ push rcx # push Buffer\r
+ mov rax, r8 # rax = Value\r
+ and rax, 0xff # rax = lower 8 bits of r8, upper 56 bits are 0\r
+ mov ah, al # ah = al\r
+ mov bx, ax # bx = ax\r
+ shl rax, 0x10 # rax = ax << 16\r
+ mov ax, bx # ax = bx\r
+ mov rbx, rax # ebx = eax\r
+ shl rax, 0x20 # rax = rax << 32\r
+ or rax, rbx # eax = ebx\r
+ mov rdi, rcx # rdi = Buffer\r
+ mov rcx, rdx # rcx = Count\r
+ shr rcx, 3 # rcx = rcx / 8\r
cld\r
rep stosq \r
- mov rcx, rdx # rcx = rdx\r
- and rcx, 7 # rcx = rcx & 7\r
+ mov rcx, rdx # rcx = rdx\r
+ and rcx, 7 # rcx = rcx & 7\r
rep stosb \r
- pop rax # rax = Buffer\r
+ pop rax # rax = Buffer\r
pop rbx\r
pop rdi\r
ret\r