3 #Copyright (c) 2006, Intel Corporation
4 #All rights reserved. This program and the accompanying materials
5 #are licensed and made available under the terms and conditions of the BSD License
6 #which accompanies this distribution. The full text of the license may be found at
7 #http://opensource.org/licenses/bsd-license.php
9 #THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 #WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 # 64-bit Multiplication function for IA-32
22 #---------------------------------------------------------------------------
27 #---------------------------------------------------------------------------
28 .globl ASM_PFX(MultU64x32)
31 # IN UINT64 Multiplicand,
38 # This routine allows a 64 bit value to be multiplied with a 32 bit
39 # value returns 64bit result.
40 # No checking if the result is greater than 64bits
44 # Multiplicand - multiplicand
45 # Multiplier - multiplier
49 # Multiplicand * Multiplier
54 movl 4(%esp), %eax # dword ptr Multiplicand[0]
55 mull 0xC(%esp) # Multiplier
58 movl 0x10(%esp), %eax # dword ptr Multiplicand[4]
59 mull 0x14(%esp) # Multiplier
61 # The value in edx stored by second multiplication overflows
62 # the output and should be discarded. So here we overwrite it
63 # with the edx value of first multiplication.