2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2026-03-09 12:53:24 +00:00

slight perf improvement in alloc_dptr

This commit is contained in:
2024-08-26 17:24:46 -04:00
parent 3d95901b65
commit 388eca270e

View File

@@ -411,16 +411,16 @@ proc alloc_dptr stdcall, ns:dword, prps_ptr:dword, numsectors:dword, prp_list_pt
.build_prp_list:
mov ebx, ecx
mov ecx, eax
and ebx, not (PAGE_SIZE - 1)
add ebx, PAGE_SIZE
mov eax, [numsectors]
mov eax, edx
xor edx, edx
div ecx
test [buf], PAGE_SIZE - 1
test ebx, PAGE_SIZE - 1
jz @f
inc eax
@@:
and ebx, not (PAGE_SIZE - 1)
add ebx, PAGE_SIZE
stdcall build_prp_list, eax, ebx, [prp_list_ptr]
test eax, eax
jz .err