Lines Matching refs:precision
418 <int_traits <T2>::precision> > result_type;
439 <int_traits <T1>::precision> > result_type;
449 STATIC_ASSERT (int_traits <T1>::precision == int_traits <T2>::precision);
453 <int_traits <T1>::precision> > result_type;
622 unsigned int precision;
635 : val (val_in), len (len_in), precision (precision_in)
648 return precision;
757 unsigned int precision)
758 : storage (x, precision)
766 generic_wide_int <storage>::to_shwi (unsigned int precision) const
768 if (precision < HOST_BITS_PER_WIDE_INT)
769 return sext_hwi (this->get_val ()[0], precision);
790 generic_wide_int <storage>::to_uhwi (unsigned int precision) const
792 if (precision < HOST_BITS_PER_WIDE_INT)
793 return zext_hwi (this->get_val ()[0], precision);
826 unsigned int precision = this->get_precision ();
827 int excess = len * HOST_BITS_PER_WIDE_INT - precision;
897 unsigned int precision = this->get_precision ();
899 if (len * HOST_BITS_PER_WIDE_INT < precision)
904 val[0], precision);
930 decompose (HOST_WIDE_INT *, unsigned int precision,
933 gcc_checking_assert (precision == x.get_precision ());
934 return wi::storage_ref (x.get_val (), x.get_len (), precision);
982 wide_int_ref_storage (const T &x, unsigned int precision)
983 : storage_ref (wi::int_traits <T>::decompose (scratch, precision, x))
1013 unsigned int precision;
1065 precision = xi.precision;
1076 precision = xi.precision;
1084 return precision;
1109 if (!is_sign_extended && len * HOST_BITS_PER_WIDE_INT > precision)
1111 precision % HOST_BITS_PER_WIDE_INT);
1117 wide_int_storage::from (const wide_int_ref &x, unsigned int precision,
1120 wide_int result = wide_int::create (precision);
1122 x.precision, precision, sgn));
1131 unsigned int precision, bool need_canon_p)
1133 wide_int result = wide_int::create (precision);
1134 result.set_len (wi::from_array (result.write_val (), val, len, precision,
1141 wide_int_storage::create (unsigned int precision)
1144 x.precision = precision;
1194 static const unsigned int precision = N;
1258 x.precision, N, sgn));
1358 trailing_wide_int_storage (unsigned int precision, unsigned char *len,
1360 : m_precision (precision), m_len (len), m_val (val)
1410 trailing_wide_ints <N>::set_precision (unsigned int precision)
1412 m_precision = precision;
1413 m_max_len = ((precision + HOST_BITS_PER_WIDE_INT - 1)
1438 trailing_wide_ints <N>::extra_size (unsigned int precision)
1440 unsigned int max_len = ((precision + HOST_BITS_PER_WIDE_INT - 1)
1476 unsigned int precision, T x)
1479 if (signed_p || scratch[0] >= 0 || precision <= HOST_BITS_PER_WIDE_INT)
1480 return wi::storage_ref (scratch, 1, precision);
1482 return wi::storage_ref (scratch, 2, precision);
1532 unsigned int precision;
1547 : precision (p), sgn (s)
1549 if (precision < HOST_BITS_PER_WIDE_INT)
1550 val = sext_hwi (v, precision);
1557 wi::shwi (HOST_WIDE_INT val, unsigned int precision)
1559 return hwi_with_prec (val, precision, SIGNED);
1564 wi::uhwi (unsigned HOST_WIDE_INT val, unsigned int precision)
1566 return hwi_with_prec (val, precision, UNSIGNED);
1571 wi::minus_one (unsigned int precision)
1573 return wi::shwi (-1, precision);
1578 wi::zero (unsigned int precision)
1580 return wi::shwi (0, precision);
1585 wi::one (unsigned int precision)
1587 return wi::shwi (1, precision);
1592 wi::two (unsigned int precision)
1594 return wi::shwi (2, precision);
1640 return x.precision;
1645 decompose (HOST_WIDE_INT *scratch, unsigned int precision,
1648 gcc_checking_assert (precision == x.precision);
1650 if (x.sgn == SIGNED || x.val >= 0 || precision <= HOST_BITS_PER_WIDE_INT)
1651 return wi::storage_ref (scratch, 1, precision);
1653 return wi::storage_ref (scratch, 2, precision);
1768 if (xi.precision <= HOST_BITS_PER_WIDE_INT)
1801 unsigned int precision = get_binary_precision (x, y);
1802 WIDE_INT_REF_FOR (T1) xi (x, precision);
1803 WIDE_INT_REF_FOR (T2) yi (y, precision);
1827 int excess = HOST_BITS_PER_WIDE_INT - precision;
1832 return eq_p_large (xi.val, xi.len, yi.val, yi.len, precision);
1848 unsigned int precision = get_binary_precision (x, y);
1849 WIDE_INT_REF_FOR (T1) xi (x, precision);
1850 WIDE_INT_REF_FOR (T2) yi (y, precision);
1873 return lts_p_large (xi.val, xi.len, precision, yi.val, yi.len);
1881 unsigned int precision = get_binary_precision (x, y);
1882 WIDE_INT_REF_FOR (T1) xi (x, precision);
1883 WIDE_INT_REF_FOR (T2) yi (y, precision);
1898 return ltu_p_large (xi.val, xi.len, precision, yi.val, yi.len);
1999 unsigned int precision = get_binary_precision (x, y);
2000 WIDE_INT_REF_FOR (T1) xi (x, precision);
2001 WIDE_INT_REF_FOR (T2) yi (y, precision);
2027 return cmps_large (xi.val, xi.len, precision, yi.val, yi.len);
2036 unsigned int precision = get_binary_precision (x, y);
2037 WIDE_INT_REF_FOR (T1) xi (x, precision);
2038 WIDE_INT_REF_FOR (T2) yi (y, precision);
2069 return cmpu_large (xi.val, xi.len, precision, yi.val, yi.len);
2128 unsigned int precision = get_precision (result);
2129 WIDE_INT_REF_FOR (T) xi (x, precision);
2137 result.set_len (sext_large (val, xi.val, xi.len, precision, offset));
2147 unsigned int precision = get_precision (result);
2148 WIDE_INT_REF_FOR (T) xi (x, precision);
2152 if (offset >= precision)
2166 result.set_len (zext_large (val, xi.val, xi.len, precision, offset), true);
2185 unsigned int precision = get_precision (result);
2186 WIDE_INT_REF_FOR (T) xi (x, precision);
2187 if (precision <= HOST_BITS_PER_WIDE_INT)
2193 result.set_len (set_bit_large (val, xi.val, xi.len, precision, bit));
2204 unsigned int precision = get_precision (result);
2206 wi::copy (result, WIDE_INT_REF_FOR (T1) (x, precision));
2208 wi::copy (result, WIDE_INT_REF_FOR (T2) (y, precision));
2235 unsigned int precision = get_precision (result);
2237 wi::copy (result, WIDE_INT_REF_FOR (T1) (x, precision));
2239 wi::copy (result, WIDE_INT_REF_FOR (T2) (y, precision));
2265 unsigned int precision = get_precision (result);
2266 WIDE_INT_REF_FOR (T1) xi (x, precision);
2267 WIDE_INT_REF_FOR (T2) yi (y, precision);
2276 precision), is_sign_extended);
2286 unsigned int precision = get_precision (result);
2287 WIDE_INT_REF_FOR (T1) xi (x, precision);
2288 WIDE_INT_REF_FOR (T2) yi (y, precision);
2297 precision), is_sign_extended);
2307 unsigned int precision = get_precision (result);
2308 WIDE_INT_REF_FOR (T1) xi (x, precision);
2309 WIDE_INT_REF_FOR (T2) yi (y, precision);
2318 yi.val, yi.len, precision), is_sign_extended);
2328 unsigned int precision = get_precision (result);
2329 WIDE_INT_REF_FOR (T1) xi (x, precision);
2330 WIDE_INT_REF_FOR (T2) yi (y, precision);
2339 precision), is_sign_extended);
2349 unsigned int precision = get_precision (result);
2350 WIDE_INT_REF_FOR (T1) xi (x, precision);
2351 WIDE_INT_REF_FOR (T2) yi (y, precision);
2360 yi.val, yi.len, precision), is_sign_extended);
2370 unsigned int precision = get_precision (result);
2371 WIDE_INT_REF_FOR (T1) xi (x, precision);
2372 WIDE_INT_REF_FOR (T2) yi (y, precision);
2373 if (precision <= HOST_BITS_PER_WIDE_INT)
2388 else if (STATIC_CONSTANT_P (precision > HOST_BITS_PER_WIDE_INT)
2401 yi.val, yi.len, precision,
2413 unsigned int precision = get_precision (result);
2414 WIDE_INT_REF_FOR (T1) xi (x, precision);
2415 WIDE_INT_REF_FOR (T2) yi (y, precision);
2416 if (precision <= HOST_BITS_PER_WIDE_INT)
2423 >> (precision - 1)) & 1;
2425 *overflow = ((resultl << (HOST_BITS_PER_WIDE_INT - precision))
2426 < (xl << (HOST_BITS_PER_WIDE_INT - precision)));
2432 yi.val, yi.len, precision,
2443 unsigned int precision = get_precision (result);
2444 WIDE_INT_REF_FOR (T1) xi (x, precision);
2445 WIDE_INT_REF_FOR (T2) yi (y, precision);
2446 if (precision <= HOST_BITS_PER_WIDE_INT)
2461 else if (STATIC_CONSTANT_P (precision > HOST_BITS_PER_WIDE_INT)
2474 yi.val, yi.len, precision,
2486 unsigned int precision = get_precision (result);
2487 WIDE_INT_REF_FOR (T1) xi (x, precision);
2488 WIDE_INT_REF_FOR (T2) yi (y, precision);
2489 if (precision <= HOST_BITS_PER_WIDE_INT)
2495 *overflow = (((xl ^ yl) & (resultl ^ xl)) >> (precision - 1)) & 1;
2497 *overflow = ((resultl << (HOST_BITS_PER_WIDE_INT - precision))
2498 > (xl << (HOST_BITS_PER_WIDE_INT - precision)));
2504 yi.val, yi.len, precision,
2515 unsigned int precision = get_precision (result);
2516 WIDE_INT_REF_FOR (T1) xi (x, precision);
2517 WIDE_INT_REF_FOR (T2) yi (y, precision);
2518 if (precision <= HOST_BITS_PER_WIDE_INT)
2525 precision, UNSIGNED, 0, false));
2536 unsigned int precision = get_precision (result);
2537 WIDE_INT_REF_FOR (T1) xi (x, precision);
2538 WIDE_INT_REF_FOR (T2) yi (y, precision);
2540 yi.val, yi.len, precision,
2570 unsigned int precision = get_precision (result);
2571 WIDE_INT_REF_FOR (T1) xi (x, precision);
2572 WIDE_INT_REF_FOR (T2) yi (y, precision);
2574 yi.val, yi.len, precision,
2587 unsigned int precision = get_precision (quotient);
2588 WIDE_INT_REF_FOR (T1) xi (x, precision);
2592 precision,
2593 yi.val, yi.len, yi.precision,
2623 unsigned int precision = get_precision (quotient);
2624 WIDE_INT_REF_FOR (T1) xi (x, precision);
2630 xi.val, xi.len, precision,
2631 yi.val, yi.len, yi.precision, sgn,
2665 unsigned int precision = get_precision (quotient);
2666 WIDE_INT_REF_FOR (T1) xi (x, precision);
2672 xi.val, xi.len, precision,
2673 yi.val, yi.len, yi.precision, sgn,
2698 unsigned int precision = get_precision (quotient);
2699 WIDE_INT_REF_FOR (T1) xi (x, precision);
2705 xi.val, xi.len, precision,
2706 yi.val, yi.len, yi.precision, sgn,
2741 unsigned int precision = get_precision (quotient);
2742 WIDE_INT_REF_FOR (T1) xi (x, precision);
2748 xi.val, xi.len, precision,
2749 yi.val, yi.len, yi.precision, sgn, 0));
2785 unsigned int precision = get_precision (remainder);
2786 WIDE_INT_REF_FOR (T1) xi (x, precision);
2791 xi.val, xi.len, precision,
2792 yi.val, yi.len, yi.precision, sgn, overflow);
2825 unsigned int precision = get_precision (quotient);
2826 WIDE_INT_REF_FOR (T1) xi (x, precision);
2832 xi.val, xi.len, precision,
2833 yi.val, yi.len, yi.precision, sgn,
2861 unsigned int precision = get_precision (quotient);
2862 WIDE_INT_REF_FOR (T1) xi (x, precision);
2868 xi.val, xi.len, precision,
2869 yi.val, yi.len, yi.precision, sgn,
2887 unsigned int precision = get_precision (quotient);
2888 WIDE_INT_REF_FOR (T1) xi (x, precision);
2894 xi.val, xi.len, precision,
2895 yi.val, yi.len, yi.precision, sgn,
2955 unsigned int precision = get_precision (result);
2956 WIDE_INT_REF_FOR (T1) xi (x, precision);
2959 if (geu_p (yi, precision))
2975 if (STATIC_CONSTANT_P (xi.precision > HOST_BITS_PER_WIDE_INT)
2980 : precision <= HOST_BITS_PER_WIDE_INT)
2987 precision, shift));
3004 if (geu_p (yi, xi.precision))
3020 if (STATIC_CONSTANT_P (xi.precision > HOST_BITS_PER_WIDE_INT)
3024 : xi.precision <= HOST_BITS_PER_WIDE_INT)
3030 result.set_len (lrshift_large (val, xi.val, xi.len, xi.precision,
3048 if (geu_p (yi, xi.precision))
3056 if (xi.precision <= HOST_BITS_PER_WIDE_INT)
3058 val[0] = sext_hwi (xi.ulow () >> shift, xi.precision - shift);
3062 result.set_len (arshift_large (val, xi.val, xi.len, xi.precision,
3087 unsigned int precision = get_binary_precision (x, x);
3089 width = precision;
3093 if (width != precision)
3105 unsigned int precision = get_binary_precision (x, x);
3107 width = precision;
3111 if (width != precision)
3129 unsigned precision = get_precision (x);
3130 if (precision < bitpos + width)
3131 precision = bitpos + width;
3132 WIDE_INT_REF_FOR (T) xi (x, precision);
3333 wi::mask (unsigned int width, bool negate_p, unsigned int precision)
3335 wide_int result = wide_int::create (precision);
3336 result.set_len (mask (result.write_val (), width, negate_p, precision));
3345 unsigned int precision)
3347 wide_int result = wide_int::create (precision);
3349 precision));
3356 wi::set_bit_in_zero (unsigned int bit, unsigned int precision)
3358 return shifted_mask (bit, 1, false, precision);
3367 STATIC_ASSERT (wi::int_traits<T>::precision);
3370 wi::int_traits <T>::precision));
3381 STATIC_ASSERT (wi::int_traits<T>::precision);
3385 wi::int_traits <T>::precision));