]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / Ia32 / Power10U64.S
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 #include "EfiBind.h"
24 #---------------------------------------------------------------------------
25 .686:
26 #.MODEL flat,C
27 .code:
28
29 .globl ASM_PFX(DivU64x32)
30 #---------------------------------------------------------------------------
31 #
32 #UINT64
33 #MultU64x32 (
34 # IN UINT64 Multiplicand,
35 # IN UINTN Multiplier
36 # );
37 #
38 #UINT64
39 #Power10U64 (
40 # IN UINT64 Operand,
41 # IN UINTN Power
42 # )
43 #/*++
44 #
45 #Routine Description:
46 #
47 # Raise 10 to the power of Power, and multiply the result with Operand
48 #
49 #Arguments:
50 #
51 # Operand - multiplicand
52 # Power - power
53 #
54 #Returns:
55 #
56 # Operand * 10 ^ Power
57 #
58 #--*/
59 ASM_PFX(Power10U64):
60 pushl %ebp
61 movl %esp, %ebp
62 movl 8(%ebp), %eax # dword ptr Operand[0]
63 movl 0xC(%ebp), %edx # dword ptr Operand[4]
64 movl 0x10(%ebp), %ecx #Power
65 jcxz _Power10U64_Done
66
67 _Power10U64_Wend:
68 pushl $10
69 push 0xC(%ebp)
70 push 0x8(%ebp)
71 call ASM_PFX(MultU64x32)
72 addl $0xc, %esp
73 movl %eax, 8(%ebp) # dword ptr Operand[0]
74 movl %edx, 0xC(%ebp) # dword ptr Operand[4]
75 loopl _Power10U64_Wend
76
77 _Power10U64_Done:
78
79 popl %ebp
80 ret
81 #Power10U64 ENDP
82