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