Searched refs:bitPosition (Results 1 – 2 of 2) sorted by relevance
110 static unsigned whichWord(unsigned bitPosition) { in whichWord() argument111 return bitPosition / APINT_BITS_PER_WORD; in whichWord()118 static unsigned whichBit(unsigned bitPosition) { in whichBit() argument119 return bitPosition % APINT_BITS_PER_WORD; in whichBit()128 static uint64_t maskBit(unsigned bitPosition) { in maskBit() argument129 return 1ULL << whichBit(bitPosition); in maskBit()158 uint64_t getWord(unsigned bitPosition) const { in getWord() argument159 return isSingleWord() ? VAL : pVal[whichWord(bitPosition)]; in getWord()957 bool operator[](unsigned bitPosition) const {958 assert(bitPosition < getBitWidth() && "Bit position out of bounds!");[all …]
588 void APInt::setBit(unsigned bitPosition) { in setBit() argument590 VAL |= maskBit(bitPosition); in setBit()592 pVal[whichWord(bitPosition)] |= maskBit(bitPosition); in setBit()597 void APInt::clearBit(unsigned bitPosition) { in clearBit() argument599 VAL &= ~maskBit(bitPosition); in clearBit()601 pVal[whichWord(bitPosition)] &= ~maskBit(bitPosition); in clearBit()609 void APInt::flipBit(unsigned bitPosition) { in flipBit() argument610 assert(bitPosition < BitWidth && "Out of the bit-width range!"); in flipBit()611 if ((*this)[bitPosition]) clearBit(bitPosition); in flipBit()612 else setBit(bitPosition); in flipBit()