Lines Matching defs:bitPosition
108 static unsigned whichWord(unsigned bitPosition) {
109 return bitPosition / APINT_BITS_PER_WORD;
116 static unsigned whichBit(unsigned bitPosition) {
117 return bitPosition % APINT_BITS_PER_WORD;
122 /// \returns a uint64_t with only bit at "whichBit(bitPosition)" set
126 static uint64_t maskBit(unsigned bitPosition) {
127 return 1ULL << whichBit(bitPosition);
156 uint64_t getWord(unsigned bitPosition) const {
157 return isSingleWord() ? VAL : pVal[whichWord(bitPosition)];
941 /// \returns the bit value at bitPosition
942 bool operator[](unsigned bitPosition) const {
943 assert(bitPosition < getBitWidth() && "Bit position out of bounds!");
944 return (maskBit(bitPosition) &
945 (isSingleWord() ? VAL : pVal[whichWord(bitPosition)])) !=
1208 /// Set the given bit to 1 whose position is given as "bitPosition".
1209 void setBit(unsigned bitPosition);
1221 /// Set the given bit to 0 whose position is given as "bitPosition".
1222 void clearBit(unsigned bitPosition);
1238 /// as "bitPosition".
1239 void flipBit(unsigned bitPosition);