Lines Matching +full:32 +full:m
8 * Optimization for constant divisors on 32-bit machines:
53 #elif BITS_PER_LONG == 32
83 /* compute m = ((p << 64) + b - 1) / b */ \
90 /* test our ___m with res = m * x / (p << 64) */ \
92 ___t = (___m & 0xffffffff) * (___x >> 32) + (___res >> 32); \
93 ___res = (___m >> 32) * (___x >> 32) + (___t >> 32); \
94 ___t = (___m >> 32) * (___x & 0xffffffff) + (___t & 0xffffffff);\
95 ___res = (___res + (___t >> 32)) / ___p; \
102 * additional bit to represent m which would overflow \
105 * Instead we do m = p / b and n / b = (n * m + m) / p. \
108 /* Compute m = (p << 64) / b */ \
113 /* Reduce m / p to help avoid overflow handling later. */ \
118 * Perform (m_bias + m * n) / (1 << 64). \
130 * Prototype: uint64_t __arch_xprod_64(const uint64_t m, uint64_t n, bool bias)
131 * Semantic: retval = ((bias ? m : 0) + m * n) >> 64
142 uint64_t __arch_xprod_64(const uint64_t m, uint64_t n, bool bias) in __arch_xprod_64() argument
144 uint32_t m_lo = m; in __arch_xprod_64()
145 uint32_t m_hi = m >> 32; in __arch_xprod_64()
147 uint32_t n_hi = n >> 32; in __arch_xprod_64()
151 bool no_ovf = __builtin_constant_p(m) && in __arch_xprod_64()
152 ((m >> 32) + (m & 0xffffffff) < 0x100000000); in __arch_xprod_64()
155 x = (uint64_t)m_lo * n_lo + (bias ? m : 0); in __arch_xprod_64()
156 x >>= 32; in __arch_xprod_64()
159 x >>= 32; in __arch_xprod_64()
163 y = (uint64_t)m_lo * n_hi + (uint32_t)(x >> 32) + (bias ? m_hi : 0); in __arch_xprod_64()
164 x = (uint64_t)m_hi * n_hi + (uint32_t)(y >> 32); in __arch_xprod_64()
166 x += (uint32_t)(y >> 32); in __arch_xprod_64()
192 /* the remainder can be computed with 32-bit regs */ \
195 } else if (likely(((n) >> 32) == 0)) { \