Lines Matching refs:bitPosition
340 void APInt::flipBit(unsigned bitPosition) { in flipBit() argument
341 assert(bitPosition < BitWidth && "Out of the bit-width range!"); in flipBit()
342 if ((*this)[bitPosition]) clearBit(bitPosition); in flipBit()
343 else setBit(bitPosition); in flipBit()
346 void APInt::insertBits(const APInt &subBits, unsigned bitPosition) { in insertBits() argument
348 assert(0 < subBitWidth && (subBitWidth + bitPosition) <= BitWidth && in insertBits()
360 U.VAL &= ~(mask << bitPosition); in insertBits()
361 U.VAL |= (subBits.U.VAL << bitPosition); in insertBits()
365 unsigned loBit = whichBit(bitPosition); in insertBits()
366 unsigned loWord = whichWord(bitPosition); in insertBits()
367 unsigned hi1Word = whichWord(bitPosition + subBitWidth - 1); in insertBits()
399 setBit(bitPosition + i); in insertBits()
401 clearBit(bitPosition + i); in insertBits()
405 APInt APInt::extractBits(unsigned numBits, unsigned bitPosition) const { in extractBits()
407 assert(bitPosition < BitWidth && (numBits + bitPosition) <= BitWidth && in extractBits()
411 return APInt(numBits, U.VAL >> bitPosition); in extractBits()
413 unsigned loBit = whichBit(bitPosition); in extractBits()
414 unsigned loWord = whichWord(bitPosition); in extractBits()
415 unsigned hiWord = whichWord(bitPosition + numBits - 1); in extractBits()