Home
last modified time | relevance | path

Searched refs:bitPosition (Results 1 – 2 of 2) sorted by relevance

/minix3/external/bsd/llvm/dist/llvm/include/llvm/ADT/
H A DAPInt.h110 static unsigned whichWord(unsigned bitPosition) { in whichWord() argument
111 return bitPosition / APINT_BITS_PER_WORD; in whichWord()
118 static unsigned whichBit(unsigned bitPosition) { in whichBit() argument
119 return bitPosition % APINT_BITS_PER_WORD; in whichBit()
128 static uint64_t maskBit(unsigned bitPosition) { in maskBit() argument
129 return 1ULL << whichBit(bitPosition); in maskBit()
158 uint64_t getWord(unsigned bitPosition) const { in getWord() argument
159 return isSingleWord() ? VAL : pVal[whichWord(bitPosition)]; in getWord()
957 bool operator[](unsigned bitPosition) const {
958 assert(bitPosition < getBitWidth() && "Bit position out of bounds!");
[all …]
/minix3/external/bsd/llvm/dist/llvm/lib/Support/
H A DAPInt.cpp588 void APInt::setBit(unsigned bitPosition) { in setBit() argument
590 VAL |= maskBit(bitPosition); in setBit()
592 pVal[whichWord(bitPosition)] |= maskBit(bitPosition); in setBit()
597 void APInt::clearBit(unsigned bitPosition) { in clearBit() argument
599 VAL &= ~maskBit(bitPosition); in clearBit()
601 pVal[whichWord(bitPosition)] &= ~maskBit(bitPosition); in clearBit()
609 void APInt::flipBit(unsigned bitPosition) { in flipBit() argument
610 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()