]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / Ia32 / Power10U64.c
1 /*++
2
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
8
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.
11
12 Module Name:
13
14 Power10U64.c
15
16 Abstract:
17
18 Calculates Operand * 10 ^ Power
19
20 --*/
21
22 #include "Tiano.h"
23
24 UINT64
25 MultU64x32 (
26 IN UINT64 Multiplicand,
27 IN UINTN Multiplier
28 );
29
30 UINT64
31 Power10U64 (
32 IN UINT64 Operand,
33 IN UINTN Power
34 )
35 /*++
36
37 Routine Description:
38
39 Raise 10 to the power of Power, and multiply the result with Operand
40
41 Arguments:
42
43 Operand - multiplicand
44 Power - power
45
46 Returns:
47
48 Operand * 10 ^ Power
49
50 --*/
51 {
52 __asm {
53 mov eax, dword ptr Operand[0]
54 mov edx, dword ptr Operand[4]
55 mov ecx, Power
56 jcxz _Power10U64_Done
57
58 _Power10U64_Wend:
59 push 10
60 push dword ptr Operand[4]
61 push dword ptr Operand[0]
62 call MultU64x32
63 add esp, 0Ch
64 mov dword ptr Operand[0], eax
65 mov dword ptr Operand[4], edx
66 loop _Power10U64_Wend
67
68 _Power10U64_Done:
69 }
70 }