Home
last modified time | relevance | path

Searched full:quotient (Results 1 – 25 of 110) sorted by relevance

12345

/openbmc/linux/arch/m68k/lib/
H A Dudivsi3.S99 divu d1, d2 /* high quotient in lower word */
100 movew d2, d0 /* save high quotient */
103 divu d1, d2 /* low quotient */
115 /* Multiply the 16 bit tentative quotient with the 32 bit divisor. Because of
117 greater than the dividend, the tentative quotient was too large. */
124 jne L5 /* if 17 bits, quotient was too large */
126 jcs L5 /* if sum is 33 bits, quotient was too large */
128 jls L6 /* if sum > dividend, quotient was too large */
129 L5: subql IMM (1), d0 /* adjust quotient */
/openbmc/linux/drivers/acpi/acpica/
H A Dutmath.c244 * out_quotient - Pointer to where the quotient is returned
250 * divide and modulo. The result is a 64-bit quotient and a
260 union uint64_overlay quotient; in acpi_ut_short_divide() local
275 * The quotient is 64 bits, the remainder is always 32 bits, in acpi_ut_short_divide()
279 quotient.part.hi, remainder32); in acpi_ut_short_divide()
282 quotient.part.lo, remainder32); in acpi_ut_short_divide()
287 *out_quotient = quotient.full; in acpi_ut_short_divide()
302 * out_quotient - Pointer to where the quotient is returned
317 union uint64_overlay quotient; in acpi_ut_divide() local
344 * The quotient is 64 bits, the remainder is always 32 bits, in acpi_ut_divide()
[all …]
/openbmc/u-boot/lib/
H A Ddiv64.c66 u64 quotient; in div_s64_rem() local
69 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
72 quotient = -quotient; in div_s64_rem()
74 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
76 quotient = -quotient; in div_s64_rem()
78 return quotient; in div_s64_rem()
/openbmc/linux/lib/math/
H A Dtest_div64.c56 u64 quotient; member
152 static inline bool test_div64_verify(u64 quotient, u32 remainder, int i, int j) in test_div64_verify() argument
154 return (quotient == test_div64_results[i][j].quotient && in test_div64_verify()
165 u64 quotient; \
168 quotient = dividend; \
169 remainder = do_div(quotient, divisor); \
170 if (!test_div64_verify(quotient, remainder, i, j)) { \
172 dividend, divisor, quotient, remainder); \
174 test_div64_results[i][j].quotient, \
H A Ddiv64.c69 u64 quotient; in div_s64_rem() local
72 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
75 quotient = -quotient; in div_s64_rem()
77 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
79 quotient = -quotient; in div_s64_rem()
81 return quotient; in div_s64_rem()
/openbmc/linux/arch/powerpc/lib/
H A Ddiv64.S7 * the 64-bit quotient, and r4 contains the divisor.
23 mullw r0,r7,r4 # quotient.hi = dividend.hi / divisor
40 2: mullw r10,r11,r4 # to get an estimate of the quotient,
44 subfe. r5,r9,r5 # quotient
52 4: stw r7,0(r3) # return the quotient in *r3
/openbmc/linux/Documentation/devicetree/bindings/power/avs/
H A Dqcom,cpr.yaml59 - description: Corner 1 quotient offset
60 - description: Corner 2 quotient offset
61 - description: Corner 3 quotient offset
65 - description: Corner 1 quotient
66 - description: Corner 2 quotient
67 - description: Corner 3 quotient
/openbmc/u-boot/drivers/ddr/marvell/a38x/
H A Dmv_ddr_common.c32 int round_div(unsigned int dividend, unsigned int divisor, unsigned int *quotient) in round_div() argument
34 if (quotient == NULL) { in round_div()
35 printf("%s: error: NULL quotient pointer found\n", __func__); in round_div()
43 *quotient = (dividend + divisor / 2) / divisor; in round_div()
/openbmc/linux/arch/nios2/kernel/
H A Dinsnemu.S220 * single register to store both the dividend and the quotient,
223 * remainder dividend:quotient
249 * The quotient is 00000110.
266 * OPX is div. Determine and store the sign of the quotient.
269 xor r17, r3, r5 /* MSB contains sign of quotient */
283 * r3 = dividend : quotient
288 * r17 = MSB contains sign of quotient
301 * (remainder:dividend:quotient) <<= 1;
312 * set LSB of quotient
329 * r3 = quotient
[all …]
/openbmc/linux/arch/alpha/lib/
H A Ddivide.S39 * $2 - modulus/quotient
45 * $27 - quotient/modulus
66 #define quotient $27 macro
74 #define quotient $2 macro
108 bis $31,$31,quotient
139 2: DIV_ONLY(addq quotient,mask,tmp2)
143 DIV_ONLY(cmovne compare,tmp2,quotient)
H A Dev6-divide.S39 * $2 - modulus/quotient
45 * $27 - quotient/modulus
76 #define quotient $27 macro
84 #define quotient $2 macro
119 bis $31,$31,quotient # E :
167 DIV_ONLY(addq quotient,mask,tmp2) # E :
176 DIV_ONLY(cmovne compare,tmp2,quotient) # E : Latency 2, extra map slot
/openbmc/linux/drivers/net/wireless/realtek/rtw89/
H A Dutil.h45 s32 quotient; in s32_div_u32_round_down() local
47 quotient = dividend / i_divisor; in s32_div_u32_round_down()
51 quotient--; in s32_div_u32_round_down()
57 return quotient; in s32_div_u32_round_down()
/openbmc/qemu/tests/tcg/mips/user/isa/r5900/
H A Dtest_r5900_div1.c9 struct quotient_remainder { int32_t quotient, remainder; }; member
25 return (struct quotient_remainder) { .quotient = lo, .remainder = hi }; in div1()
34 assert(qr.quotient == expected_quotient); in verify_div1()
68 * Quotient is 0x80000000 (-2147483648), and remainder is 0x00000000 (0). in main()
H A Dtest_r5900_divu1.c9 struct quotient_remainder { uint32_t quotient, remainder; }; member
25 return (struct quotient_remainder) { .quotient = lo, .remainder = hi }; in divu1()
34 assert(qr.quotient == expected_quotient); in verify_divu1()
/openbmc/linux/arch/xtensa/lib/
H A Ddivsi3.S23 movi a2, 0 /* quotient = 0 */
25 /* test-subtract-and-shift loop; one quotient bit on each iteration */
46 movltz a2, a5, a7 /* return (sign < 0) ? -quotient : quotient */
H A Dudivsi3.S22 movi a2, 0 /* quotient = 0 */
24 /* test-subtract-and-shift loop; one quotient bit on each iteration */
42 addi a2, a2, 1 /* increment quotient if dividend >= divisor */
/openbmc/linux/arch/powerpc/boot/
H A Ddiv64.S7 * the 64-bit quotient, and r4 contains the divisor.
23 mullw r0,r7,r4 # quotient.hi = dividend.hi / divisor
40 2: mullw r10,r11,r4 # to get an estimate of the quotient,
44 subfe. r5,r9,r5 # quotient
52 4: stw r7,0(r3) # return the quotient in *r3
/openbmc/linux/lib/crypto/mpi/
H A Dmpi-div.c97 /* Ensure space is enough for quotient and remainder. in mpi_tdiv_qr()
113 * numerator and quotient are the same. in mpi_tdiv_qr()
151 * numerator would be gradually overwritten by the quotient limbs. in mpi_tdiv_qr()
157 } else /* Put quotient at top of remainder. */ in mpi_tdiv_qr()
164 * numerator the same number of steps (to keep the quotient the same!). in mpi_tdiv_qr()
190 * temporary space if it overlaps with the quotient or remainder. in mpi_tdiv_qr()
/openbmc/linux/arch/m68k/ifpsp060/src/
H A Dilsp.S77 # 0x10(sp) = pointer to location to place quotient/remainder #
80 # 0x10(sp) = points to location of remainder/quotient. #
81 # remainder is in first longword, quotient is in 2nd. #
204 eor.b %d0, NDIVIDEND(%a6) # chk if quotient is negative
221 # if the register numbers are the same, only the quotient gets saved.
222 # so, if we always save the quotient second, we save ourselves a cmp&beq
278 # The quotient is returned in %d6, remainder in %d5, unless the #
291 # In the general case, four quotient words would be created by
293 # the first two quotient words must be zero, or overflow would occur.
296 # the last two divisions to get a quotient longword and word remainder:
[all …]
/openbmc/qemu/util/
H A Dhost-utils.c92 * Returns quotient via plow and phigh.
134 * Thus, the high part of the quotient is 1, and we can in divu128()
155 * Returns quotient via plow and phigh.
273 * Returns lower 128 bit of quotient.
335 * Returns quotient via plow and phigh.
379 * Thus, the high part of the quotient is 1, and we can in divu256()
401 * Returns quotient via plow and phigh.
/openbmc/u-boot/arch/nios2/lib/
H A Dlonglong.h44 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
46 HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient
47 in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less
52 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
53 denominator). Like udiv_qrnnd but the numbers are signed. The quotient
/openbmc/qemu/target/m68k/
H A Dfpu_helper.c590 static void make_quotient(CPUM68KState *env, int sign, uint32_t quotient) in make_quotient() argument
592 quotient = (sign << 7) | (quotient & 0x7f); in make_quotient()
593 env->fpsr = (env->fpsr & ~FPSR_QT_MASK) | (quotient << FPSR_QT_SHIFT); in make_quotient()
598 uint64_t quotient; in HELPER() local
601 res->d = floatx80_modrem(val1->d, val0->d, true, &quotient, in HELPER()
608 make_quotient(env, sign, quotient); in HELPER()
620 uint32_t quotient; in HELPER() local
623 /* Calculate quotient directly using round to nearest mode */ in HELPER()
628 quotient = floatx80_to_int32(floatx80_abs(fp_quot.d), &env->fp_status); in HELPER()
629 make_quotient(env, sign, quotient); in HELPER()
/openbmc/linux/drivers/media/tuners/
H A Dmax2165.c150 static int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction) in fixpt_div32() argument
171 *quotient = q; in fixpt_div32()
182 u32 quotient, fraction; in max2165_set_rf() local
187 &quotient, &fraction); in max2165_set_rf()
194 max2165_write_reg(priv, REG_NDIV_INT, quotient); in max2165_set_rf()
/openbmc/u-boot/drivers/serial/
H A Dserial_sifive.c56 unsigned long quotient = in uart_min_clk_divisor() local
59 if (quotient == 0) in uart_min_clk_divisor()
62 return quotient - 1; in uart_min_clk_divisor()
/openbmc/qemu/tests/tcg/alpha/system/
H A Dboot.S227 #define quotient $27 macro
232 mov $31, quotient
243 2: addq quotient, mask, tmp2
247 cmovne compare, tmp2, quotient
265 #undef quotient

12345