]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/MultU64x64.asm
1. Added comments to ASM files
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / MultU64x64.asm
index 377aa5197227fc6a335fb46273e51bfa098ace26..f3679548f15226fd1deb830c339218b1992780b6 100644 (file)
 ;   );\r
 ;------------------------------------------------------------------------------\r
 InternalMathMultU64x64  PROC    USES    ebx\r
-    mov     ebx, [esp + 8]\r
-    mov     edx, [esp + 16]\r
+    mov     ebx, [esp + 8]              ; ebx <- M1[0..31]\r
+    mov     edx, [esp + 16]             ; edx <- M2[0..31]\r
     mov     ecx, ebx\r
     mov     eax, edx\r
-    imul    ebx, [esp + 20]\r
-    imul    edx, [esp + 12]\r
-    add     ebx, edx\r
-    mul     ecx\r
-    add     edx, ebx\r
+    imul    ebx, [esp + 20]             ; ebx <- M1[0..31] * M2[32..63]\r
+    imul    edx, [esp + 12]             ; edx <- M1[32..63] * M2[0..31]\r
+    add     ebx, edx                    ; carries are abandoned\r
+    mul     ecx                         ; edx:eax <- M1[0..31] * M2[0..31]\r
+    add     edx, ebx                    ; carries are abandoned\r
     ret\r
 InternalMathMultU64x64  ENDP\r
 \r