]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/GetPowerOfTwo64.c
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #include "BaseLibInternals.h"
15 Returns the value of the highest bit set in a 64-bit value. Equivalent to
18 This function computes the value of the highest bit set in the 64-bit value
19 specified by Operand. If Operand is zero, then zero is returned.
21 @param Operand The 64-bit operand to evaluate.
23 @return 1 << HighBitSet64(Operand)
24 @retval 0 Operand is zero.
37 return LShiftU64 (1, (UINTN
) HighBitSet64 (Operand
));