summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm')
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm14
1 files changed, 7 insertions, 7 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm
index a836e22d0d..e025b22c2d 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm
@@ -33,18 +33,18 @@
; );
;------------------------------------------------------------------------------
InternalMathDivRemU64x32 PROC
- mov ecx, [esp + 12]
- mov eax, [esp + 8]
+ mov ecx, [esp + 12] ; ecx <- divisor
+ mov eax, [esp + 8] ; eax <- dividend[32..63]
xor edx, edx
- div ecx
+ div ecx ; eax <- quotient[32..63], edx <- remainder
push eax
- mov eax, [esp + 8]
- div ecx
- mov ecx, [esp + 20]
+ mov eax, [esp + 8] ; eax <- dividend[0..31]
+ div ecx ; eax <- quotient[0..31]
+ mov ecx, [esp + 20] ; ecx <- Remainder
jecxz @F ; abandon remainder if Remainder == NULL
mov [ecx], edx
@@:
- pop edx
+ pop edx ; edx <- quotient[32..63]
ret
InternalMathDivRemU64x32 ENDP