]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/Math.c
931646b478216a5ebaf974b71d9e7321bb797e96
3 Copyright (c) 2005, Intel Corporation
4 All rights reserved. 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
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.
18 64-bit Math worker functions for x64
36 This routine allows a 64 bit value to be left shifted by 32 bits and returns the
38 Count is valid up 63. (Only Bits 0-5 is valid for Count)
42 Operand - Value to be shifted
44 Count - Number of times to shift left.
48 Value shifted left identified by the Count.
52 return Operand
<< Count
;
58 IN UINT64 Multiplicand
,
65 This routine allows a 64 bit value to be multiplied with a 32 bit value returns
67 No checking if the result is greater than 64bits
77 Multiplicand * Multiplier
81 return Multiplicand
* Multiplier
;
88 OUT UINTN
*Remainder OPTIONAL
94 This routine allows a 64 bit value to be divided with a 32 bit value returns
95 64bit result and the Remainder.
108 Remainder = Dividend mod Divisor
110 N.B. only works for 31bit divisors!!
114 return Dividend
/Divisor
;