Lines Matching refs:radix
48 inline static unsigned getDigit(char cdigit, uint8_t radix) { in getDigit() argument
51 if (radix == 16 || radix == 36) { in getDigit()
57 if (r <= radix - 11U) in getDigit()
61 if (r <= radix - 11U) in getDigit()
64 radix = 10; in getDigit()
68 if (r < radix) in getDigit()
114 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() argument
116 fromString(numbits, Str, radix); in APInt()
537 unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) { in getBitsNeeded() argument
540 unsigned sufficient = getSufficientBitsNeeded(str, radix); in getBitsNeeded()
544 if (radix == 2 || radix == 8 || radix == 16) in getBitsNeeded()
563 APInt tmp(sufficient, StringRef(p, slen), radix); in getBitsNeeded()
2088 void APInt::fromString(unsigned numbits, StringRef str, uint8_t radix) { in fromString() argument
2091 assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 || in fromString()
2092 radix == 36) && in fromString()
2103 assert((slen <= numbits || radix != 2) && "Insufficient bit width"); in fromString()
2104 assert(((slen-1)*3 <= numbits || radix != 8) && "Insufficient bit width"); in fromString()
2105 assert(((slen-1)*4 <= numbits || radix != 16) && "Insufficient bit width"); in fromString()
2106 assert((((slen-1)*64)/22 <= numbits || radix != 10) && in fromString()
2116 unsigned shift = (radix == 16 ? 4 : radix == 8 ? 3 : radix == 2 ? 1 : 0); in fromString()
2120 unsigned digit = getDigit(*p, radix); in fromString()
2121 assert(digit < radix && "Invalid character in digit string"); in fromString()
2128 *this *= radix; in fromString()