1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
12 ; Calculate the product of a 64-bit integer and another 64-bit integer
14 ;------------------------------------------------------------------------------
18 ;------------------------------------------------------------------------------
21 ; InternalMathMultU64x64 (
22 ; IN UINT64 Multiplicand,
23 ; IN UINT64 Multiplier
25 ;------------------------------------------------------------------------------
26 global ASM_PFX(InternalMathMultU64x64)
27 ASM_PFX(InternalMathMultU64x64):
29 mov ebx, [esp + 8] ; ebx <- M1[0..31]
30 mov edx, [esp + 16] ; edx <- M2[0..31]
33 imul ebx, [esp + 20] ; ebx <- M1[0..31] * M2[32..63]
34 imul edx, [esp + 12] ; edx <- M1[32..63] * M2[0..31]
35 add ebx, edx ; carries are abandoned
36 mul ecx ; edx:eax <- M1[0..31] * M2[0..31]
37 add edx, ebx ; carries are abandoned