Home
last modified time | relevance | path

Searched full:divisor (Results 1 – 25 of 339) sorted by relevance

12345678910>>...14

/freebsd-src/contrib/cortex-strings/src/thumb/
H A Daeabi_idiv.S126 divisor .req r1 label
136 cmp curbit, divisor
142 cmp curbit, divisor
144 lsls curbit, divisor, \n
159 lsls divisor, divisor, #8
162 cmp curbit, divisor
165 lsls divisor, divisor, #8
169 cmp curbit, divisor
173 lsrs divisor, divisor, #8
198 subs divisor, dividend, divisor
[all …]
/freebsd-src/contrib/llvm-project/compiler-rt/lib/builtins/
H A Dudivmodti4.c28 du_int vn1, vn0; // Norm. divisor digits in udiv128by64to64default()
36 // Normalize the divisor. in udiv128by64to64default()
46 // Break divisor up into two 32-bit digits. in udiv128by64to64default()
104 utwords divisor; in __udivmodti4() local
105 divisor.all = b; in __udivmodti4()
108 if (divisor.all > dividend.all) { in __udivmodti4()
113 // When the divisor fits in 64 bits, we can use an optimized path. in __udivmodti4()
114 if (divisor.s.high == 0) { in __udivmodti4()
116 if (dividend.s.high < divisor.s.low) { in __udivmodti4()
119 divisor.s.low, &remainder.s.low); in __udivmodti4()
[all …]
/freebsd-src/sys/compat/linuxkpi/common/include/linux/
H A Dmath64.h43 div64_u64_rem(uint64_t dividend, uint64_t divisor, uint64_t *remainder) in div64_u64_rem() argument
46 *remainder = dividend % divisor; in div64_u64_rem()
47 return (dividend / divisor); in div64_u64_rem()
51 div64_s64(int64_t dividend, int64_t divisor) in div64_s64() argument
54 return (dividend / divisor); in div64_s64()
58 div64_u64(uint64_t dividend, uint64_t divisor) in div64_u64() argument
61 return (dividend / divisor); in div64_u64()
65 div_u64_rem(uint64_t dividend, uint32_t divisor, uint32_t *remainder) in div_u64_rem() argument
68 *remainder = dividend % divisor; in div_u64_rem()
69 return (dividend / divisor); in div_u64_rem()
[all …]
H A Dmath.h51 #define DIV_ROUND_CLOSEST(x, divisor) (((x) + ((divisor) / 2)) / (divisor)) argument
52 #define DIV_ROUND_CLOSEST_ULL(x, divisor) ({ \ argument
53 __typeof(divisor) __d = (divisor); \
68 mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor) in mult_frac() argument
70 uintmax_t q = (x / divisor); in mult_frac()
71 uintmax_t r = (x % divisor); in mult_frac()
73 return ((q * multiplier) + ((r * multiplier) / divisor)); in mult_frac()
/freebsd-src/contrib/llvm-project/compiler-rt/lib/builtins/sparc64/
H A Ddivmod.m410 * divisor -- how many ways to divide it
25 * V -- the current comparand -- initially divisor*2ˆ(ITER*N-1)
36 define(divisor,`%o1') macro
92 orcc divisor,dividend,%g0 ! are either dividend or divisor negative
94 xor divisor,dividend,SIGN ! record sign of result in sign of SIGN
95 tst divisor
98 ! divisor < 0
100 neg divisor
114 orcc divisor,dividend,%g0 ! are either dividend or divisor negative
117 tst divisor
[all …]
/freebsd-src/sys/contrib/device-tree/Bindings/clock/ti/
H A Ddivider.txt6 the register is one less than the actual divisor value. E.g:
8 register value actual divisor value
15 ti,index-starts-at-one - valid divisor values start at 1, not the default
17 register value actual divisor value
22 ti,index-power-of-two - valid divisor values are powers of two. E.g:
23 register value actual divisor value
32 Which will map the resulting values to a divisor table by their index:
33 register value actual divisor value
36 2 <invalid divisor, skipped>
63 - ti,min-div : min divisor fo
[all...]
/freebsd-src/lib/libutil/
H A Dhumanize_number.c54 int64_t divisor, max; in humanize_number() local
82 * HN_IEC_PREFIXES implies a divisor of 1024 here in humanize_number()
86 divisor = 1024; in humanize_number()
95 divisor = 1000; in humanize_number()
102 divisor = 1024; in humanize_number()
146 divisor / 2))) && i < maxscale; i++) { in humanize_number()
147 remainder = quotient % divisor; in humanize_number()
148 quotient /= divisor; in humanize_number()
155 remainder = quotient % divisor; in humanize_number()
156 quotient /= divisor; in humanize_number()
[all …]
/freebsd-src/contrib/llvm-project/compiler-rt/lib/builtins/hexagon/
H A Dudivdi3.S26 r7 = cl0(r3:2) // count leading 0's of divisor (denominator)
27 r5:4 = r3:2 // divisor moved into working registers
31 r10 = sub(r7,r6) // left shift count for bit & divisor
37 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb
38 r15:14 = lsl(r15:14,r10) // shift the bit left by same amount as divisor
41 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend
45 if (p0) jumpr r31 // if divisor > dividend, we're done, so return
50 p0 = cmp.gtu(r13:12,r3:2) // set predicate reg if shifted divisor > current remainder
53 r7:6 = sub(r3:2, r13:12) // subtract shifted divisor from current remainder
62 r13:12 = lsr(r13:12, #1) // shift "shifted divisor" right by 1 for next iteration
H A Dudivmoddi4.S26 r7 = cl0(r3:2) // count leading 0's of divisor (denominator)
27 r5:4 = r3:2 // divisor moved into working registers
31 r10 = sub(r7,r6) // left shift count for bit & divisor
37 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb
38 r15:14 = lsl(r15:14,r10) // shift the bit left by same amount as divisor
41 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend
45 if (p0) jumpr r31 // if divisor > dividend, we're done, so return
50 p0 = cmp.gtu(r13:12,r3:2) // set predicate reg if shifted divisor > current remainder
53 r7:6 = sub(r3:2, r13:12) // subtract shifted divisor from current remainder
62 r13:12 = lsr(r13:12, #1) // shift "shifted divisor" right by 1 for next iteration
H A Dumoddi3.S26 r7 = cl0(r3:2) // count leading 0's of divisor (denominator)
27 r5:4 = r3:2 // divisor moved into working registers
31 r10 = sub(r7,r6) // left shift count for bit & divisor
37 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb
38 r15:14 = lsl(r15:14,r10) // shift the bit left by same amount as divisor
41 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend
45 if (p0) jump .hexagon_umoddi3_return // if divisor > dividend, we're done, so return
50 p0 = cmp.gtu(r13:12,r3:2) // set predicate reg if shifted divisor > current remainder
53 r7:6 = sub(r3:2, r13:12) // subtract shifted divisor from current remainder
62 r13:12 = lsr(r13:12, #1) // shift "shifted divisor" right by 1 for next iteration
H A Dmoddi3.S32 r7 = cl0(r3:2) // count leading 0's of divisor (denominator)
33 r5:4 = r3:2 // divisor moved into working registers
37 r10 = sub(r7,r6) // left shift count for bit & divisor
43 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb
44 r15:14 = lsl(r15:14,r10) // shift the bit left by same amount as divisor
47 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend
51 if (p0) jump .hexagon_moddi3_return // if divisor > dividend, we're done, so return
56 p0 = cmp.gtu(r13:12,r3:2) // set predicate reg if shifted divisor > current remainder
59 r7:6 = sub(r3:2, r13:12) // subtract shifted divisor from current remainder
68 r13:12 = lsr(r13:12, #1) // shift "shifted divisor" right by 1 for next iteration
H A Ddivdi3.S33 r7 = cl0(r3:2) // count leading 0's of divisor (denominator)
34 r5:4 = r3:2 // divisor moved into working registers
39 r10 = sub(r7,r6) // left shift count for bit & divisor
45 r13:12 = lsl(r5:4,r10) // shift divisor msb into same bit position as dividend msb
46 r15:14 = lsl(r15:14,r10) // shift the bit left by same amount as divisor
49 p0 = cmp.gtu(r5:4,r3:2) // check if divisor > dividend
53 if (p0) jump .hexagon_divdi3_return // if divisor > dividend, we're done, so return
58 p0 = cmp.gtu(r13:12,r3:2) // set predicate reg if shifted divisor > current remainder
61 r7:6 = sub(r3:2, r13:12) // subtract shifted divisor from current remainder
70 r13:12 = lsr(r13:12, #1) // shift "shifted divisor" right by 1 for next iteration
/freebsd-src/sys/sys/
H A Dtime.h164 __stime64_scale32_ceil(int64_t x, int32_t factor, int32_t divisor) in __stime64_scale32_ceil() argument
166 const int64_t rem = x % divisor; in __stime64_scale32_ceil()
168 return (x / divisor * factor + (rem * factor + divisor - 1) / divisor); in __stime64_scale32_ceil()
172 __stime64_scale32_floor(int64_t x, int32_t factor, int32_t divisor) in __stime64_scale32_floor() argument
174 const int64_t rem = x % divisor; in __stime64_scale32_floor()
176 return (x / divisor * factor + (rem * factor) / divisor); in __stime64_scale32_floor()
180 __utime64_scale32_ceil(uint64_t x, uint32_t factor, uint32_t divisor) in __utime64_scale32_ceil() argument
188 __utime64_scale32_floor(uint64_t x,uint32_t factor,uint32_t divisor) __utime64_scale32_floor() argument
218 __stime64_scale64_ceil(int64_t x,int64_t factor,int64_t divisor) __stime64_scale64_ceil() argument
226 __stime64_scale64_floor(int64_t x,int64_t factor,int64_t divisor) __stime64_scale64_floor() argument
234 __utime64_scale64_ceil(uint64_t x,uint64_t factor,uint64_t divisor) __utime64_scale64_ceil() argument
242 __utime64_scale64_floor(uint64_t x,uint64_t factor,uint64_t divisor) __utime64_scale64_floor() argument
[all...]
/freebsd-src/sys/contrib/dev/rtw89/
H A Dutil.h19 /* The result of negative dividend and positive divisor is undefined, but it
22 * Note: the maximum value of divisor is 0x7FFF_FFFF, because we cast it to
25 static inline s32 s32_div_u32_round_down(s32 dividend, u32 divisor, s32 *remainder) in s32_div_u32_round_down()
27 s32 i_divisor = (s32)divisor; in s32_div_u32_round_down()
44 static inline s32 s32_div_u32_round_closest(s32 dividend, u32 divisor) in s32_div_u32_round_closest()
46 return s32_div_u32_round_down(dividend + divisor / 2, divisor, NULL);
23 s32_div_u32_round_down(s32 dividend,u32 divisor,s32 * remainder) s32_div_u32_round_down() argument
42 s32_div_u32_round_closest(s32 dividend,u32 divisor) s32_div_u32_round_closest() argument
/freebsd-src/contrib/llvm-project/llvm/lib/Support/
H A DScaledNumber.cpp58 uint32_t Divisor) { in divide32() argument
60 assert(Divisor && "expected non-zero divisor"); in divide32()
69 uint64_t Quotient = Dividend64 / Divisor; in divide32()
70 uint64_t Remainder = Dividend64 % Divisor; in divide32()
77 return getRounded<uint32_t>(Quotient, Shift, Remainder >= getHalf(Divisor)); in divide32()
81 uint64_t Divisor) { in divide64() argument
83 assert(Divisor && "expected non-zero divisor"); in divide64()
85 // Minimize size of divisor. in divide64()
87 if (int Zeros = llvm::countr_zero(Divisor)) { in divide64()
89 Divisor >>= Zeros; in divide64()
[all …]
/freebsd-src/crypto/openssl/crypto/bn/
H A Dbn_div.c111 * other words divisor has to be "bit-aligned to the left." bn_div_fixed_top
202 * BN_div computes dv := num / divisor, rounding towards
203 * zero, and sets up rm such that dv*divisor + rm = num holds.
205 * dv->neg == num->neg ^ divisor->neg (unless the result is zero)
209 int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, in BN_div() argument
214 if (BN_is_zero(divisor)) { in BN_div()
224 if (divisor->d[divisor->top - 1] == 0) { in BN_div()
229 ret = bn_div_fixed_top(dv, rm, num, divisor, ctx); in BN_div()
242 * It's argued that *length* of *significant* part of divisor is public.
246 * of limb length. Thanks to this assumption we can require that |divisor|
[all …]
/freebsd-src/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DIntegerDivision.cpp32 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument
41 // ; %divisor_sgn = ashr i32 %divisor, 31 in generateSignedRemainderCode()
43 // ; %dvs_xor = xor i32 %divisor, %divisor_sgn in generateSignedRemainderCode()
46 // ; %urem = urem i32 %dividend, %divisor in generateSignedRemainderCode()
50 Divisor = Builder.CreateFreeze(Divisor); in generateSignedRemainderCode()
52 Value *DivisorSign = Builder.CreateAShr(Divisor, Shift); in generateSignedRemainderCode()
54 Value *DvsXor = Builder.CreateXor(Divisor, DivisorSign); in generateSignedRemainderCode()
73 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument
75 // Remainder = Dividend - Quotient*Divisor in generatedUnsignedRemainderCode()
79 // ; %quotient = udiv i32 %dividend, %divisor in generatedUnsignedRemainderCode()
[all …]
H A DBypassSlowDivision.cpp156 Value *Divisor = SlowDivOrRem->getOperand(1); in getReplacement() local
157 DivRemMapKey Key(isSignedOp(), Dividend, Divisor); in getReplacement()
267 Value *Divisor = SlowDivOrRem->getOperand(1); in createSlowBB() local
270 DivRemPair.Quotient = Builder.CreateSDiv(Dividend, Divisor); in createSlowBB()
271 DivRemPair.Remainder = Builder.CreateSRem(Dividend, Divisor); in createSlowBB()
273 DivRemPair.Quotient = Builder.CreateUDiv(Dividend, Divisor); in createSlowBB()
274 DivRemPair.Remainder = Builder.CreateURem(Dividend, Divisor); in createSlowBB()
291 Value *Divisor = SlowDivOrRem->getOperand(1); in createFastBB() local
293 Builder.CreateCast(Instruction::Trunc, Divisor, BypassType); in createFastBB()
324 /// Creates a runtime check to test whether both the divisor an
353 Value *Divisor = SlowDivOrRem->getOperand(1); insertFastDivAndRem() local
[all...]
/freebsd-src/sys/contrib/device-tree/Bindings/clock/
H A Dvt8500.txt41 Divisor device clocks:
44 - divisor-reg : shall be the register offset from PMC base for the divisor
47 - divisor-mask : shall be the mask for the divisor register. Defaults to 0x1f
70 divisor-reg = <0x328>;
71 divisor-mask = <0x3f>;
/freebsd-src/sys/contrib/dev/acpica/components/utilities/
H A Dutmath.c432 * Divisor - 32-bit divisor
447 UINT32 Divisor, in AcpiUtShortDivide() argument
459 /* Always check for a zero divisor */ in AcpiUtShortDivide()
461 if (Divisor == 0) in AcpiUtShortDivide()
473 ACPI_DIV_64_BY_32 (0, DividendOvl.Part.Hi, Divisor, in AcpiUtShortDivide()
476 ACPI_DIV_64_BY_32 (Remainder32, DividendOvl.Part.Lo, Divisor, in AcpiUtShortDivide()
499 * InDivisor - Divisor
517 UINT64_OVERLAY Divisor; in AcpiUtDivide() local
530 /* Always check for a zero divisor */ in AcpiUtDivide()
661 AcpiUtShortDivide(UINT64 InDividend,UINT32 Divisor,UINT64 * OutQuotient,UINT32 * OutRemainder) AcpiUtShortDivide() argument
[all...]
/freebsd-src/sys/dev/qcom_clk/
H A Dqcom_clk_fdiv.c44 * This is a fixed divisor node. It represents some divisor
53 uint32_t divisor; member
68 *freq = *freq / sc->divisor; in qcom_clk_fdiv_recalc()
76 * There's only a single parent here for an fixed divisor, in qcom_clk_fdiv_init()
107 sc->divisor = clkdef->divisor; in qcom_clk_fdiv_register()
/freebsd-src/sys/dev/uart/
H A Duart_dev_quicc.c59 int act_baud, divisor, error; in quicc_divisor() local
64 divisor = rclk / baudrate / 16; in quicc_divisor()
65 if (divisor > 4096) in quicc_divisor()
66 divisor = ((divisor >> 3) - 2) | 1; in quicc_divisor()
67 else if (divisor >= 0) in quicc_divisor()
68 divisor = (divisor - 1) << 1; in quicc_divisor()
69 if (divisor < 0 || divisor >= 8192) in quicc_divisor()
71 act_baud = rclk / (((divisor >> 1) + 1) << ((divisor & 1) ? 8 : 4)); in quicc_divisor()
80 return (divisor); in quicc_divisor()
87 int divisor; in quicc_param() local
[all …]
H A Duart_dev_z8530.c74 int act_baud, divisor, error; in z8530_divisor() local
79 divisor = (rclk + baudrate) / (baudrate << 1) - 2; in z8530_divisor()
80 if (divisor < 0 || divisor >= 65536) in z8530_divisor()
82 act_baud = rclk / 2 / (divisor + 2); in z8530_divisor()
91 return (divisor); in z8530_divisor()
98 int divisor; in z8530_param() local
127 divisor = z8530_divisor(bas->rclk, baudrate); in z8530_param()
128 if (divisor == -1) in z8530_param()
131 divisor = -1; in z8530_param()
136 if (divisor >= 0) { in z8530_param()
[all …]
/freebsd-src/sys/dev/clk/starfive/
H A Djh7110_clk.c187 uint32_t divisor; in jh7110_clk_recalc_freq() local
198 divisor = READ4(sc, sc_clk->offset) & JH7110_DIV_MASK; in jh7110_clk_recalc_freq()
202 if (divisor) in jh7110_clk_recalc_freq()
203 *freq = *freq / divisor; in jh7110_clk_recalc_freq()
216 uint32_t divisor; in jh7110_clk_set_freq() local
224 divisor = MIN(MAX(DIV_ROUND_CLOSEST(fin, *fout), 1UL), sc_clk->d_max); in jh7110_clk_set_freq()
231 divisor |= READ4(sc, sc_clk->offset) & ~JH7110_DIV_MASK; in jh7110_clk_set_freq()
232 WRITE4(sc, sc_clk->offset, divisor); in jh7110_clk_set_freq()
237 *fout = divisor; in jh7110_clk_set_freq()
/freebsd-src/cddl/contrib/opensolaris/lib/libcmdutils/common/
H A Dnicenum.c44 uint64_t divisor = 1; in nicenum_scale() local
71 uint64_t newdiv = divisor * divamt; in nicenum_scale()
75 VERIFY3U(newdiv, >=, divisor); in nicenum_scale()
80 divisor = newdiv; in nicenum_scale()
88 } else if (n % divisor == 0) { in nicenum_scale()
93 rc = snprintf(buf, buflen, "%llu%c", n / divisor, u); in nicenum_scale()
108 (double)n / divisor, u)) <= 5) in nicenum_scale()

12345678910>>...14