]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/MultU64x32.S
Import some basic libraries instances for Mde Packages.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / MultU64x32.S
1 //
2 // Include common header file for this module.
3 //
4 #include "CommonHeader.h"
5
6 #------------------------------------------------------------------------------
7 #
8 # Copyright (c) 2006, Intel Corporation
9 # All rights reserved. This program and the accompanying materials
10 # are licensed and made available under the terms and conditions of the BSD License
11 # which accompanies this distribution. The full text of the license may be found at
12 # http://opensource.org/licenses/bsd-license.php
13 #
14 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #
17 # Module Name:
18 #
19 # MultU64x32.asm
20 #
21 # Abstract:
22 #
23 # Calculate the product of a 64-bit integer and a 32-bit integer
24 #
25 #------------------------------------------------------------------------------
26
27 .386:
28 .code:
29
30 .globl ASM_PFX(InternalMathMultU64x32)
31
32 #------------------------------------------------------------------------------
33 # UINT64
34 # EFIAPI
35 # InternalMathMultU64x32 (
36 # IN UINT64 Multiplicand,
37 # IN UINT32 Multiplier
38 # );
39 #------------------------------------------------------------------------------
40 ASM_PFX(InternalMathMultU64x32):
41 movl 12(%esp), %ecx
42 movl %ecx, %eax
43 imull 8(%esp), %ecx
44 mull 0x4(%esp)
45 addl %ecx, %edx
46 ret