Lines Matching refs:parts
665 // We can check that all parts of an integer are equal by making use of a
2341 zeroes out higher parts. */
2343 APInt::tcSet(integerPart *dst, integerPart part, unsigned int parts)
2347 assert(parts > 0);
2350 for (i = 1; i < parts; i++)
2356 APInt::tcAssign(integerPart *dst, const integerPart *src, unsigned int parts)
2360 for (i = 0; i < parts; i++)
2366 APInt::tcIsZero(const integerPart *src, unsigned int parts)
2370 for (i = 0; i < parts; i++)
2379 APInt::tcExtractBit(const integerPart *parts, unsigned int bit)
2381 return (parts[bit / integerPartWidth] &
2387 APInt::tcSetBit(integerPart *parts, unsigned int bit)
2389 parts[bit / integerPartWidth] |= (integerPart) 1 << (bit % integerPartWidth);
2394 APInt::tcClearBit(integerPart *parts, unsigned int bit)
2396 parts[bit / integerPartWidth] &=
2403 APInt::tcLSB(const integerPart *parts, unsigned int n)
2408 if (parts[i] != 0) {
2409 lsb = partLSB(parts[i]);
2421 APInt::tcMSB(const integerPart *parts, unsigned int n)
2428 if (parts[n] != 0) {
2429 msb = partMSB(parts[n]);
2439 srcLSB, to DST, of dstCOUNT parts, such that the bit srcLSB becomes
2470 /* Clear high parts. */
2478 integerPart c, unsigned int parts)
2484 for (i = 0; i < parts; i++) {
2503 integerPart c, unsigned int parts)
2509 for (i = 0; i < parts; i++) {
2527 APInt::tcNegate(integerPart *dst, unsigned int parts)
2529 tcComplement(dst, parts);
2530 tcIncrement(dst, parts);
2541 DSTPARTS parts of the result, and if all of the omitted higher
2542 parts were zero return zero, otherwise overflow occurred and
2620 /* We would overflow if any significant unwritten parts would be
2621 non-zero. This is true if any remaining src parts are non-zero
2634 is filled with the least significant parts of the result. Returns
2639 const integerPart *rhs, unsigned int parts)
2647 tcSet(dst, 0, parts);
2649 for (i = 0; i < parts; i++)
2650 overflow |= tcMultiplyPart(&dst[i], lhs, rhs[i], 0, parts,
2651 parts - i, true);
2658 operands. Returns the number of parts required to hold the
2697 unsigned int parts)
2704 shiftCount = tcMSB(rhs, parts) + 1;
2708 shiftCount = parts * integerPartWidth - shiftCount;
2712 tcAssign(srhs, rhs, parts);
2713 tcShiftLeft(srhs, parts, shiftCount);
2714 tcAssign(remainder, lhs, parts);
2715 tcSet(lhs, 0, parts);
2722 compare = tcCompare(remainder, srhs, parts);
2724 tcSubtract(remainder, srhs, 0, parts);
2731 tcShiftRight(srhs, parts, 1);
2744 APInt::tcShiftLeft(integerPart *dst, unsigned int parts, unsigned int count)
2753 while (parts > jump) {
2756 parts--;
2758 /* dst[i] comes from the two parts src[i - jump] and, if we have
2760 part = dst[parts - jump];
2763 if (parts >= jump + 1)
2764 part |= dst[parts - jump - 1] >> (integerPartWidth - shift);
2767 dst[parts] = part;
2770 while (parts > 0)
2771 dst[--parts] = 0;
2778 APInt::tcShiftRight(integerPart *dst, unsigned int parts, unsigned int count)
2789 for (i = 0; i < parts; i++) {
2792 if (i + jump >= parts) {
2798 if (i + jump + 1 < parts)
2810 APInt::tcAnd(integerPart *dst, const integerPart *rhs, unsigned int parts)
2814 for (i = 0; i < parts; i++)
2820 APInt::tcOr(integerPart *dst, const integerPart *rhs, unsigned int parts)
2824 for (i = 0; i < parts; i++)
2830 APInt::tcXor(integerPart *dst, const integerPart *rhs, unsigned int parts)
2834 for (i = 0; i < parts; i++)
2840 APInt::tcComplement(integerPart *dst, unsigned int parts)
2844 for (i = 0; i < parts; i++)
2851 unsigned int parts)
2853 while (parts) {
2854 parts--;
2855 if (lhs[parts] == rhs[parts])
2858 if (lhs[parts] > rhs[parts])
2869 APInt::tcIncrement(integerPart *dst, unsigned int parts)
2873 for (i = 0; i < parts; i++)
2877 return i == parts;
2882 APInt::tcDecrement(integerPart *dst, unsigned int parts) {
2883 for (unsigned int i = 0; i < parts; i++) {
2897 APInt::tcSetLeastSignificantBits(integerPart *dst, unsigned int parts,
2911 while (i < parts)