3 ;Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ;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
21 ;---------------------------------------------------------------------------
26 ;---------------------------------------------------------------------------
30 ; IN UINT64 Multiplicand,
37 ; This routine allows a 64 bit value to be multiplied with a 32 bit
38 ; value returns 64bit result.
39 ; No checking if the result is greater than 64bits
43 ; Multiplicand - multiplicand
44 ; Multiplier - multiplier
48 ; Multiplicand * Multiplier
53 mov eax, [esp + 4]; dword ptr Multiplicand[0]
54 mul dword ptr [esp + 0Ch] ; Multiplier
57 mov eax, [esp + 10h]; dword ptr Multiplicand[4]
58 mul dword ptr [esp + 14h]; Multiplier
60 ; The value in edx stored by second multiplication overflows
61 ; the output and should be discarded. So here we overwrite it
62 ; with the edx value of first multiplication.