]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / Ia32 / Power10U64.c
CommitLineData
3eb9473e 1/*++\r
2\r
4ea9375a
HT
3Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 Power10U64.c\r
15\r
16Abstract:\r
17\r
18 Calculates Operand * 10 ^ Power\r
19\r
20--*/\r
21\r
22#include "Tiano.h"\r
23\r
24UINT64\r
25MultU64x32 (\r
26 IN UINT64 Multiplicand,\r
27 IN UINTN Multiplier\r
28 );\r
29\r
30UINT64\r
31Power10U64 (\r
32 IN UINT64 Operand,\r
33 IN UINTN Power\r
34 )\r
35/*++\r
36\r
37Routine Description:\r
38\r
39 Raise 10 to the power of Power, and multiply the result with Operand\r
40\r
41Arguments:\r
42\r
43 Operand - multiplicand\r
44 Power - power\r
45\r
46Returns:\r
47\r
48 Operand * 10 ^ Power\r
49\r
50--*/\r
51{\r
52 __asm {\r
22353b17 53 mov eax, dword ptr Operand[0]\r
54 mov edx, dword ptr Operand[4]\r
3eb9473e 55 mov ecx, Power\r
56 jcxz _Power10U64_Done\r
57 \r
58_Power10U64_Wend:\r
59 push 10\r
60 push dword ptr Operand[4]\r
61 push dword ptr Operand[0]\r
62 call MultU64x32\r
22353b17 63 add esp, 0Ch\r
3eb9473e 64 mov dword ptr Operand[0], eax\r
65 mov dword ptr Operand[4], edx\r
66 loop _Power10U64_Wend\r
67\r
68_Power10U64_Done:\r
69 }\r
70}\r