Lines Matching +full:low +full:- +full:to +full:- +full:high
1 /* SPDX-License-Identifier: GPL-2.0 */
15 * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder
18 * @remainder: pointer to unsigned 32bit remainder
22 * This is commonly provided by 32bit archs to provide an optimized 64bit
32 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder
35 * @remainder: pointer to signed 32bit remainder
46 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
49 * @remainder: pointer to unsigned 64bit remainder
60 * div64_u64 - unsigned 64bit divide with 64bit divisor
72 * div64_s64 - signed 64bit divide with 64bit divisor
115 * div_u64 - unsigned 64bit divide with 32bit divisor
132 * div_s64 - signed 64bit divide with 32bit divisor
148 * Many a GCC version messes this up and generates a 64x64 mult :-(
185 ret += mul_u32_u32(ah, mul) << (32 - shift); in mul_u64_u32_shr()
198 u32 high, low; in mul_u64_u64_shr() member
200 u32 low, high; in mul_u64_u64_shr()
209 rl.ll = mul_u32_u32(a0.l.low, b0.l.low); in mul_u64_u64_shr()
210 rm.ll = mul_u32_u32(a0.l.low, b0.l.high); in mul_u64_u64_shr()
211 rn.ll = mul_u32_u32(a0.l.high, b0.l.low); in mul_u64_u64_shr()
212 rh.ll = mul_u32_u32(a0.l.high, b0.l.high); in mul_u64_u64_shr()
215 * Each of these lines computes a 64-bit intermediate result into "c", in mul_u64_u64_shr()
216 * starting at bits 32-95. The low 32-bits go into the result of the in mul_u64_u64_shr()
217 * multiplication, the high 32-bits are carried into the next step. in mul_u64_u64_shr()
219 rl.l.high = c = (u64)rl.l.high + rm.l.low + rn.l.low; in mul_u64_u64_shr()
220 rh.l.low = c = (c >> 32) + rm.l.high + rn.l.high + rh.l.low; in mul_u64_u64_shr()
221 rh.l.high = (c >> 32) + rh.l.high; in mul_u64_u64_shr()
224 * The 128-bit result of the multiplication is in rl.ll and rh.ll, in mul_u64_u64_shr()
225 * shift it right and throw away the high part of the result. in mul_u64_u64_shr()
230 return (rl.ll >> shift) | (rh.ll << (64 - shift)); in mul_u64_u64_shr()
244 u32 high, low; in mul_u64_u32_div() member
246 u32 low, high; in mul_u64_u32_div()
252 rl.ll = mul_u32_u32(u.l.low, mul); in mul_u64_u32_div()
253 rh.ll = mul_u32_u32(u.l.high, mul) + rl.l.high; in mul_u64_u32_div()
255 /* Bits 32-63 of the result will be in rh.l.low. */ in mul_u64_u32_div()
256 rl.l.high = do_div(rh.ll, divisor); in mul_u64_u32_div()
258 /* Bits 0-31 of the result will be in rl.l.low. */ in mul_u64_u32_div()
261 rl.l.high = rh.l.low; in mul_u64_u32_div()
269 ({ u64 _tmp = (d); div64_u64((ll) + _tmp - 1, _tmp); })
272 * DIV64_U64_ROUND_CLOSEST - unsigned 64bit divide with 64bit divisor rounded to nearest integer
277 * and round to closest integer.
279 * Return: dividend / divisor rounded to nearest integer
285 * DIV_S64_ROUND_CLOSEST - signed 64bit divide with 32bit divisor rounded to nearest integer
290 * and round to closest integer.
292 * Return: dividend / divisor rounded to nearest integer
300 div_s64((__x - (__d / 2)), __d); \