Home
last modified time | relevance | path

Searched refs:UINT_BITS (Results 1 - 2 of 2) sorted by relevance

/third_party/mesa3d/src/util/
H A Dfast_idiv_by_const.c47 util_compute_fast_udiv_info(uint64_t D, unsigned num_bits, unsigned UINT_BITS) in util_compute_fast_udiv_info() argument
50 assert(num_bits > 0 && num_bits <= UINT_BITS); in util_compute_fast_udiv_info()
61 result.multiplier = 1ull << (UINT_BITS - div_shift); in util_compute_fast_udiv_info()
69 result.multiplier = u_uintN_max(UINT_BITS); in util_compute_fast_udiv_info()
77 /* The extra shift implicit in the difference between UINT_BITS and num_bits in util_compute_fast_udiv_info()
79 const unsigned extra_shift = UINT_BITS - num_bits; in util_compute_fast_udiv_info()
84 const uint64_t initial_power_of_2 = (uint64_t)1 << (UINT_BITS-1); in util_compute_fast_udiv_info()
164 UINT_BITS); in util_compute_fast_udiv_info()
H A Dfast_idiv_by_const.h75 * integer D. UINT_BITS is the bit size at which the final "magic"
78 * is known to be smaller than calc_bits; if this is not known then UINT_BITS
81 * Assume we have a hardware register of width UINT_BITS, a known constant D
83 * (which may be up to UINT_BITS). To emit code for n/d, use one of the two
89 * emit("result = (m.multiplier * n) >>> UINT_BITS")
98 * emit("result >>>= UINT_BITS")
101 * This second version works even if D is 1. The shifts by UINT_BITS may be
105 * if n == (1 << UINT_BITS)-1: result = n
127 util_compute_fast_udiv_info(uint64_t D, unsigned num_bits, unsigned UINT_BITS);

Completed in 2 milliseconds