Lines Matching refs:radix

49 inline static unsigned getDigit(char cdigit, uint8_t radix) {  in getDigit()  argument
52 if (radix == 16 || radix == 36) { in getDigit()
58 if (r <= radix - 11U) in getDigit()
62 if (r <= radix - 11U) in getDigit()
65 radix = 10; in getDigit()
69 if (r < radix) in getDigit()
115 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() argument
117 fromString(numbits, Str, radix); in APInt()
545 unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) { in getBitsNeeded() argument
548 unsigned sufficient = getSufficientBitsNeeded(str, radix); in getBitsNeeded()
552 if (radix == 2 || radix == 8 || radix == 16) in getBitsNeeded()
571 APInt tmp(sufficient, StringRef(p, slen), radix); in getBitsNeeded()
2083 void APInt::fromString(unsigned numbits, StringRef str, uint8_t radix) { in fromString() argument
2086 assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 || in fromString()
2087 radix == 36) && in fromString()
2098 assert((slen <= numbits || radix != 2) && "Insufficient bit width"); in fromString()
2099 assert(((slen-1)*3 <= numbits || radix != 8) && "Insufficient bit width"); in fromString()
2100 assert(((slen-1)*4 <= numbits || radix != 16) && "Insufficient bit width"); in fromString()
2101 assert((((slen-1)*64)/22 <= numbits || radix != 10) && in fromString()
2111 unsigned shift = (radix == 16 ? 4 : radix == 8 ? 3 : radix == 2 ? 1 : 0); in fromString()
2115 unsigned digit = getDigit(*p, radix); in fromString()
2116 assert(digit < radix && "Invalid character in digit string"); in fromString()
2123 *this *= radix; in fromString()