]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove the DivU64x64Remainder.c (embedded asm version)for IA32 architecture. It canno...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 1 Feb 2008 15:05:08 +0000 (15:05 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 1 Feb 2008 15:05:08 +0000 (15:05 +0000)
Make MSFT tool chain uses the ASM version, which can handle the case in an size efficient way.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4654 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/BaseLib.inf
MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c [deleted file]

index 324bf9d4db000eb62351f3d66ff28c2cb11288cc..b474857eee322348752636843f376b6d6865b869 100644 (file)
   Ia32/EnablePaging32.c | MSFT \r
   Ia32/EnableInterrupts.c | MSFT \r
   Ia32/EnableDisableInterrupts.c | MSFT \r
-  Ia32/DivU64x64Remainder.c | MSFT \r
+  Ia32/DivU64x64Remainder.asm | MSFT \r
   Ia32/DivU64x32Remainder.c | MSFT \r
   Ia32/DivU64x32.c | MSFT \r
   Ia32/DisablePaging32.c | MSFT \r
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c
deleted file mode 100644 (file)
index 46ef12b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/** @file\r
-  Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
-  both the quotient and the remainderSet error flag for all division functions\r
-\r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
-  All rights reserved. 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
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-//\r
-// Include common header file for this module.\r
-//\r
-\r
-\r
-UINT64\r
-EFIAPI\r
-InternalMathDivRemU64x64 (\r
-  IN      UINT64                    Dividend,\r
-  IN      UINT64                    Divisor,\r
-  OUT     UINT64                    *Remainder    OPTIONAL\r
-  )\r
-{\r
-  _asm {\r
-    mov     edx, dword ptr [Dividend + 4]\r
-    mov     eax, dword ptr [Dividend + 0]   // edx:eax <- dividend\r
-    mov     edi, edx\r
-    mov     esi, eax                    // edi:esi <- dividend\r
-    mov     ecx, dword ptr [Divisor + 4]\r
-    mov     ebx, dword ptr [Divisor + 0]   // ecx:ebx <- divisor\r
-BitLoop:\r
-    shr     edx, 1\r
-    rcr     eax, 1\r
-    shrd    ebx, ecx, 1\r
-    shr     ecx, 1\r
-    jnz     BitLoop\r
-    div     ebx\r
-    mov     ebx, eax                    // ebx <- quotient\r
-    mov     ecx, dword ptr [Divisor + 4]\r
-    mul     dword ptr [Divisor]\r
-    imul    ecx, ebx\r
-    add     edx, ecx\r
-    mov     ecx, Remainder\r
-    jc      TooLarge                   // product > 2^64\r
-    cmp     edi, edx                    // compare high 32 bits\r
-    ja      Correct\r
-    jb      TooLarge                   // product > dividend\r
-    cmp     esi, eax\r
-    jae     Correct                    // product <= dividend\r
-TooLarge:\r
-    dec     ebx                         // adjust quotient by -1\r
-    jecxz   Return                     // return if Remainder == NULL\r
-    sub     eax, dword ptr [Divisor + 0]\r
-    sbb     edx, dword ptr [Divisor + 4]\r
-Correct:\r
-    jecxz   Return\r
-    sub     esi, eax\r
-    sbb     edi, edx                    // edi:esi <- remainder\r
-    mov     [ecx], esi\r
-    mov     [ecx + 4], edi\r
-Return:\r
-    mov     eax, ebx                    // eax <- quotient\r
-    xor     edx, edx\r
-  }\r
-}\r
-\r