Lines Matching +full:64 +full:- +full:bit
1 // SPDX-License-Identifier: GPL-2.0
5 * Based on former do_div() implementation from asm-parisc/div64.h:
6 * Copyright (C) 1999 Hewlett-Packard Co
7 * Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
10 * Generic C version of 64bit/32bit division and modulo, with
11 * 64bit result and 32bit remainder.
16 * for some CPUs. __div64_32() can be overridden by linking arch-specific
27 /* Not needed on 64bit architectures */
38 /* Reduce the thing a bit first */ in __div64_32()
43 rem -= (uint64_t) (high*base) << 32; in __div64_32()
53 rem -= b; in __div64_32()
72 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
73 *remainder = -*remainder; in div_s64_rem()
75 quotient = -quotient; in div_s64_rem()
79 quotient = -quotient; in div_s64_rem()
87 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
88 * @dividend: 64bit dividend
89 * @divisor: 64bit divisor
90 * @remainder: 64bit remainder
94 * is kept distinct to avoid slowing down the div64_u64 operation on 32bit
112 quot--; in div64_u64_rem()
114 *remainder = dividend - quot * divisor; in div64_u64_rem()
117 *remainder -= divisor; in div64_u64_rem()
127 * div64_u64 - unsigned 64bit divide with 64bit divisor
128 * @dividend: 64bit dividend
129 * @divisor: 64bit divisor
150 quot--; in div64_u64()
151 if ((dividend - quot * divisor) >= divisor) in div64_u64()
168 return (quot ^ t) - t; in div64_s64()
212 shift = ilog2(a) + ilog2(b) - 62; in mul_u64_u64_div_u64()