]>
Commit | Line | Data |
---|---|---|
f8b4c87c JJ |
1 | ;------------------------------------------------------------------------------\r |
2 | ;\r | |
3 | ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r | |
9344f092 | 4 | ; SPDX-License-Identifier: BSD-2-Clause-Patent\r |
f8b4c87c JJ |
5 | ;\r |
6 | ; Module Name:\r | |
7 | ;\r | |
8 | ; MultU64x32.nasm\r | |
9 | ;\r | |
10 | ; Abstract:\r | |
11 | ;\r | |
12 | ; Calculate the product of a 64-bit integer and a 32-bit integer\r | |
13 | ;\r | |
14 | ;------------------------------------------------------------------------------\r | |
15 | \r | |
16 | SECTION .text\r | |
17 | \r | |
18 | ;------------------------------------------------------------------------------\r | |
19 | ; UINT64\r | |
20 | ; EFIAPI\r | |
21 | ; InternalMathMultU64x32 (\r | |
22 | ; IN UINT64 Multiplicand,\r | |
23 | ; IN UINT32 Multiplier\r | |
24 | ; );\r | |
25 | ;------------------------------------------------------------------------------\r | |
26 | global ASM_PFX(InternalMathMultU64x32)\r | |
27 | ASM_PFX(InternalMathMultU64x32):\r | |
28 | mov ecx, [esp + 12]\r | |
29 | mov eax, ecx\r | |
30 | imul ecx, [esp + 8] ; overflow not detectable\r | |
31 | mul dword [esp + 4]\r | |
32 | add edx, ecx\r | |
33 | ret\r | |
34 | \r |