]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/LowBitSet32.c
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #include "BaseLibInternals.h"
15 Returns the bit position of the lowest bit set in a 32-bit value.
17 This function computes the bit position of the lowest bit set in the 32-bit
18 value specified by Operand. If Operand is zero, then -1 is returned.
19 Otherwise, a value between 0 and 31 is returned.
21 @param Operand The 32-bit operand to evaluate.
23 @retval 0..31 The lowest bit set in Operand was found.
24 @retval -1 Operand is zero.
39 for (BitIndex
= 0; 0 == (Operand
& 1); BitIndex
++, Operand
>>= 1);