Get a value with a block of bits set.
Declared in <llvm/ADT/APInt.h>
static
APInt
getBitsSet(
unsigned int numBits,
unsigned int loBit,
unsigned int hiBit);
Constructs an APInt value that has a contiguous range of bits set. The bits from loBit (inclusive) to hiBit (exclusive) will be set. All other bits will be zero. For example, with parameters(32, 0, 16) you would get 0x0000FFFF. Please call getBitsSetWithWrap if loBit may be greater than hiBit.
An APInt value with the requested bits set.
| Name | Description |
|---|---|
| numBits | the intended bit width of the result |
| loBit | the index of the lowest bit set. |
| hiBit | the index of the highest bit set. |