mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125453 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d91ef79c43
commit
16e036fa8f
@ -431,6 +431,13 @@ public:
|
||||
/// @returns the low "numBits" bits of this APInt.
|
||||
APInt getLoBits(unsigned numBits) const;
|
||||
|
||||
/// getOneBitSet - Return an APInt with exactly one bit set in the result.
|
||||
static APInt getOneBitSet(unsigned numBits, unsigned BitNo) {
|
||||
APInt Res(numBits, 0);
|
||||
Res.setBit(BitNo);
|
||||
return Res;
|
||||
}
|
||||
|
||||
/// 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
|
||||
|
Loading…
Reference in New Issue
Block a user