X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseLib%2FIa32%2FMultU64x64.S;h=3a38229247197477b28737e64549bb588fee6b5d;hb=bb817c56c51fabe92915fe30b168b4833cb2aed9;hp=03523865f6c71d3259533cbab179d6a467be0286;hpb=a2b1bf96b3470f5eb82b47e629f6c3a840f87295;p=mirror_edk2.git diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S b/MdePkg/Library/BaseLib/Ia32/MultU64x64.S index 03523865f6..3a38229247 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.S @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------ # -# Copyright (c) 2006, Intel Corporation -# All rights reserved. This program and the accompanying materials +# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php @@ -11,7 +11,7 @@ # # Module Name: # -# MultU64x64.asm +# MultU64x64.S # # Abstract: # @@ -19,7 +19,7 @@ # #------------------------------------------------------------------------------ -.globl ASM_PFX(InternalMathMultU64x64) +ASM_GLOBAL ASM_PFX(InternalMathMultU64x64) #------------------------------------------------------------------------------ # UINT64 @@ -30,15 +30,15 @@ # ); #------------------------------------------------------------------------------ ASM_PFX(InternalMathMultU64x64): - push %ebx - movl 8(%esp), %ebx - movl 16(%esp), %edx - movl %ebx, %ecx - movl %edx, %eax - imull 20(%esp), %ebx - imull 12(%esp), %edx - addl %edx, %ebx - mull %ecx - addl %ebx, %edx + push %ebx + movl 8(%esp), %ebx # ebx <- M1[0..31] + movl 16(%esp), %edx # edx <- M2[0..31] + movl %ebx, %ecx + movl %edx, %eax + imull 20(%esp), %ebx # ebx <- M1[0..31] * M2[32..63] + imull 12(%esp), %edx # edx <- M1[32..63] * M2[0..31] + addl %edx, %ebx # carries are abandoned + mull %ecx # edx:eax <- M1[0..31] * M2[0..31] + addl %ebx, %edx # carries are abandoned pop %ebx ret