]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / DivU64x64Remainder.S
index f4df094195f99bc9d0cb7212e693638cac53f8d8..9ec61b134b4341e19a89b7ecc952f65544ff1ed1 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2018, 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
@@ -57,22 +57,22 @@ L2:
     shrl    %ecx\r
     jnz     L2\r
     divl    %ebx\r
-    movl    %eax, %ebx                  # ebx <- quotient                     \r
-    movl    28(%esp), %ecx              # ecx <- high dword of divisor        \r
+    movl    %eax, %ebx                  # ebx <- quotient\r
+    movl    28(%esp), %ecx              # ecx <- high dword of divisor\r
     mull    24(%esp)                    # edx:eax <- quotient * divisor[0..31]\r
-    imull   %ebx, %ecx                  # ecx <- quotient * divisor[32..63]   \r
-    addl    %ecx, %edx                  # edx <- (quotient * divisor)[32..63] \r
-    mov     32(%esp), %ecx              # ecx <- addr for Remainder           \r
-    jc      TooLarge                    # product > 2^64                      \r
-    cmpl    %edx, %edi                  # compare high 32 bits                \r
-    ja      Correct                                                           \r
-    jb      TooLarge                    # product > dividend                  \r
-    cmpl    %eax, %esi                                                        \r
-    jae     Correct                     # product <= dividend                 \r
+    imull   %ebx, %ecx                  # ecx <- quotient * divisor[32..63]\r
+    addl    %ecx, %edx                  # edx <- (quotient * divisor)[32..63]\r
+    mov     32(%esp), %ecx              # ecx <- addr for Remainder\r
+    jc      TooLarge                    # product > 2^64\r
+    cmpl    %edx, %edi                  # compare high 32 bits\r
+    ja      Correct\r
+    jb      TooLarge                    # product > dividend\r
+    cmpl    %eax, %esi\r
+    jae     Correct                     # product <= dividend\r
 TooLarge:\r
-    decl    %ebx                        # adjust quotient by -1              \r
-    jecxz   Return                      # return if Remainder == NULL        \r
-    sub     24(%esp), %eax                                                   \r
+    decl    %ebx                        # adjust quotient by -1\r
+    jecxz   Return                      # return if Remainder == NULL\r
+    sub     24(%esp), %eax\r
     sbb     28(%esp), %edx              # edx:eax <- (quotient - 1) * divisor\r
 Correct:\r
     jecxz   Return\r
@@ -81,7 +81,7 @@ Correct:
     movl    %esi, (%ecx)\r
     movl    %edi, 4(%ecx)\r
 Return:\r
-    movl    %ebx, %eax                  # eax <- quotient         \r
+    movl    %ebx, %eax                  # eax <- quotient\r
     xorl    %edx, %edx                  # quotient is 32 bits long\r
     pop     %edi\r
     pop     %esi\r