]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / DivU64x32Remainder.asm
index f1c6c1f4acd1535295ba7f21b8707a8cf6aacab8..1634ef478e29d05cd694363b2196e71463a33257 100644 (file)
@@ -1,7 +1,7 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
+; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
 ; http://opensource.org/licenses/bsd-license.php\r
     .model  flat,C\r
     .code\r
 \r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; InternalMathDivRemU64x32 (\r
+;   IN      UINT64                    Dividend,\r
+;   IN      UINT32                    Divisor,\r
+;   OUT     UINT32                    *Remainder\r
+;   );\r
+;------------------------------------------------------------------------------\r
 InternalMathDivRemU64x32    PROC\r
-    mov     ecx, [esp + 12]\r
-    mov     eax, [esp + 8]\r
+    mov     ecx, [esp + 12]         ; ecx <- divisor\r
+    mov     eax, [esp + 8]          ; eax <- dividend[32..63]\r
     xor     edx, edx\r
-    div     ecx\r
+    div     ecx                     ; eax <- quotient[32..63], edx <- remainder\r
     push    eax\r
-    mov     eax, [esp + 8]\r
-    div     ecx\r
-    mov     ecx, [esp + 20]\r
-    jecxz   @F\r
+    mov     eax, [esp + 8]          ; eax <- dividend[0..31]\r
+    div     ecx                     ; eax <- quotient[0..31]\r
+    mov     ecx, [esp + 20]         ; ecx <- Remainder\r
+    jecxz   @F                      ; abandon remainder if Remainder == NULL\r
     mov     [ecx], edx\r
 @@:\r
-    pop     edx\r
+    pop     edx                     ; edx <- quotient[32..63]\r
     ret\r
 InternalMathDivRemU64x32    ENDP\r
 \r