Home
last modified time | relevance | path

Searched refs:dividend (Results 1 – 25 of 53) sorted by relevance

123

/linux-5.19.10/arch/arm/lib/
Dlib1funcs.S40 .macro ARM_DIV_BODY dividend, divisor, result, curbit
45 clz \result, \dividend
66 @ larger than the dividend.
68 cmplo \divisor, \dividend
76 cmplo \divisor, \dividend
86 1: cmp \dividend, \divisor
87 subhs \dividend, \dividend, \divisor
89 cmp \dividend, \divisor, lsr #1
90 subhs \dividend, \dividend, \divisor, lsr #1
92 cmp \dividend, \divisor, lsr #2
[all …]
Ddiv64.S59 @ Align divisor with upper part of dividend.
85 @ Break out early if dividend reaches 0.
/linux-5.19.10/include/linux/
Dmath64.h26 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
28 *remainder = dividend % divisor; in div_u64_rem()
29 return dividend / divisor; in div_u64_rem()
40 static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument
42 *remainder = dividend % divisor; in div_s64_rem()
43 return dividend / divisor; in div_s64_rem()
54 static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument
56 *remainder = dividend % divisor; in div64_u64_rem()
57 return dividend / divisor; in div64_u64_rem()
67 static inline u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() argument
[all …]
Dmpi.h106 void mpi_mod(MPI rem, MPI dividend, MPI divisor);
154 void mpi_fdiv_r(MPI rem, MPI dividend, MPI divisor);
155 void mpi_fdiv_q(MPI quot, MPI dividend, MPI divisor);
/linux-5.19.10/lib/math/
Dtest_div64.c163 #define test_div64_one(dividend, divisor, i, j) ({ \ argument
168 quotient = dividend; \
172 dividend, divisor, quotient, remainder); \
188 u64 dividend; in test_div64() local
192 dividend = test_div64_dividends[i]; in test_div64()
193 if (!test_div64_one(dividend, TEST_DIV64_DIVISOR_0, i, 0)) in test_div64()
195 if (!test_div64_one(dividend, TEST_DIV64_DIVISOR_1, i, 1)) in test_div64()
197 if (!test_div64_one(dividend, TEST_DIV64_DIVISOR_2, i, 2)) in test_div64()
199 if (!test_div64_one(dividend, TEST_DIV64_DIVISOR_3, i, 3)) in test_div64()
201 if (!test_div64_one(dividend, TEST_DIV64_DIVISOR_4, i, 4)) in test_div64()
[all …]
Ddiv64.c73 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument
77 if (dividend < 0) { in div_s64_rem()
78 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
83 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
104 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument
111 quot = div_u64_rem(dividend, divisor, &rem32); in div64_u64_rem()
115 quot = div_u64(dividend >> n, divisor >> n); in div64_u64_rem()
120 *remainder = dividend - quot * divisor; in div64_u64_rem()
144 u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() argument
150 quot = div_u64(dividend, divisor); in div64_u64()
[all …]
/linux-5.19.10/include/vdso/
Dmath64.h6 __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) in __iter_div_u64_rem() argument
10 while (dividend >= divisor) { in __iter_div_u64_rem()
13 asm("" : "+rm"(dividend)); in __iter_div_u64_rem()
15 dividend -= divisor; in __iter_div_u64_rem()
19 *remainder = dividend; in __iter_div_u64_rem()
/linux-5.19.10/drivers/net/wireless/realtek/rtw89/
Dutil.h23 static inline s32 s32_div_u32_round_down(s32 dividend, u32 divisor, s32 *remainder) in s32_div_u32_round_down() argument
29 quotient = dividend / i_divisor; in s32_div_u32_round_down()
30 i_remainder = dividend % i_divisor; in s32_div_u32_round_down()
42 static inline s32 s32_div_u32_round_closest(s32 dividend, u32 divisor) in s32_div_u32_round_closest() argument
44 return s32_div_u32_round_down(dividend + divisor / 2, divisor, NULL); in s32_div_u32_round_closest()
/linux-5.19.10/drivers/acpi/acpica/
Dutmath.c256 acpi_ut_short_divide(u64 dividend, in acpi_ut_short_divide() argument
272 dividend_ovl.full = dividend; in acpi_ut_short_divide()
315 union uint64_overlay dividend; in acpi_ut_divide() local
335 dividend.full = in_dividend; in acpi_ut_divide()
347 ACPI_DIV_64_BY_32(0, dividend.part.hi, divisor.part.lo, in acpi_ut_divide()
350 ACPI_DIV_64_BY_32(partial1, dividend.part.lo, divisor.part.lo, in acpi_ut_divide()
360 normalized_dividend = dividend; in acpi_ut_divide()
392 if (partial3.part.lo >= dividend.part.hi) { in acpi_ut_divide()
393 if (partial3.part.lo == dividend.part.hi) { in acpi_ut_divide()
394 if (partial2.part.lo > dividend.part.lo) { in acpi_ut_divide()
[all …]
/linux-5.19.10/lib/mpi/
Dmpi-div.c18 void mpi_fdiv_qr(MPI quot, MPI rem, MPI dividend, MPI divisor);
20 void mpi_fdiv_r(MPI rem, MPI dividend, MPI divisor) in mpi_fdiv_r() argument
34 mpi_tdiv_r(rem, dividend, divisor); in mpi_fdiv_r()
36 if (((divisor_sign?1:0) ^ (dividend->sign?1:0)) && rem->nlimbs) in mpi_fdiv_r()
43 void mpi_fdiv_q(MPI quot, MPI dividend, MPI divisor) in mpi_fdiv_q() argument
46 mpi_fdiv_qr(quot, tmp, dividend, divisor); in mpi_fdiv_q()
50 void mpi_fdiv_qr(MPI quot, MPI rem, MPI dividend, MPI divisor) in mpi_fdiv_qr() argument
60 mpi_tdiv_qr(quot, rem, dividend, divisor); in mpi_fdiv_qr()
62 if ((divisor_sign ^ dividend->sign) && rem->nlimbs) { in mpi_fdiv_qr()
Dmpi-mod.c25 void mpi_mod(MPI rem, MPI dividend, MPI divisor) in mpi_mod() argument
27 mpi_fdiv_r(rem, dividend, divisor); in mpi_mod()
/linux-5.19.10/arch/powerpc/lib/
Ddiv64.S16 lwz r5,0(r3) # get the dividend into r5/r6
22 divwu r7,r5,r4 # if dividend.hi >= divisor,
23 mullw r0,r7,r4 # quotient.hi = dividend.hi / divisor
24 subf. r5,r0,r5 # dividend.hi %= divisor
26 1: mr r11,r5 # here dividend.hi != 0
29 cntlzw r0,r5 # we are shifting the dividend right
/linux-5.19.10/arch/m68k/ifpsp060/src/
Dilsp.S75 # 0x8(sp) = hi(dividend) #
76 # 0xc(sp) = lo(dividend) #
138 mov.l 0xc(%a6), %d5 # get dividend hi
139 mov.l 0x10(%a6), %d6 # get dividend lo
155 tst.l %d5 # chk sign of hi(dividend)
156 slt NDIVIDEND(%a6) # save sign of dividend
160 negx.l %d6 # complement signed dividend
164 # - is (dividend == 0) ?
165 # - is (hi(dividend) == 0 && (divisor <= lo(dividend))) ? (32-bit div)
167 tst.l %d5 # is (hi(dividend) == 0)
[all …]
/linux-5.19.10/arch/powerpc/boot/
Ddiv64.S16 lwz r5,0(r3) # get the dividend into r5/r6
22 divwu r7,r5,r4 # if dividend.hi >= divisor,
23 mullw r0,r7,r4 # quotient.hi = dividend.hi / divisor
24 subf. r5,r0,r5 # dividend.hi %= divisor
26 1: mr r11,r5 # here dividend.hi != 0
29 cntlzw r0,r5 # we are shifting the dividend right
/linux-5.19.10/drivers/clk/versatile/
Dicst.c29 u64 dividend = p->ref * 2 * (u64)(vco.v + 8); in icst_hz() local
32 do_div(dividend, divisor); in icst_hz()
33 return (unsigned long)dividend; in icst_hz()
/linux-5.19.10/drivers/net/ethernet/amd/xgbe/
Dxgbe-ptp.c232 u64 dividend; in xgbe_ptp_register() local
256 dividend = 50000000; in xgbe_ptp_register()
257 dividend <<= 32; in xgbe_ptp_register()
258 pdata->tstamp_addend = div_u64(dividend, pdata->ptpclk_rate); in xgbe_ptp_register()
/linux-5.19.10/arch/x86/boot/
Dstring.c201 static inline u64 __div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in __div_u64_rem() argument
206 } d = { dividend }; in __div_u64_rem()
220 static inline u64 __div_u64(u64 dividend, u32 divisor) in __div_u64() argument
224 return __div_u64_rem(dividend, divisor, &remainder); in __div_u64()
/linux-5.19.10/lib/zstd/common/
Dzstd_deps.h68 static uint64_t ZSTD_div64(uint64_t dividend, uint32_t divisor) { in ZSTD_div64() argument
69 return div_u64(dividend, divisor); in ZSTD_div64()
/linux-5.19.10/arch/x86/include/asm/
Ddiv64.h43 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
48 } d = { dividend }; in div_u64_rem()
/linux-5.19.10/drivers/media/tuners/
Dmax2165.c150 static int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction) in fixpt_div32() argument
159 q = dividend / divisor; in fixpt_div32()
160 remainder = dividend - q * divisor; in fixpt_div32()
/linux-5.19.10/drivers/media/dvb-frontends/
Dcx24113.c292 u64 dividend; in cx24113_calc_pll_nf() local
337 dividend = F; in cx24113_calc_pll_nf()
338 do_div(dividend, state->config->xtal_khz * 1000 * factor * 2); in cx24113_calc_pll_nf()
339 F = dividend; in cx24113_calc_pll_nf()
/linux-5.19.10/include/linux/mtd/
Drawnand.h764 #define __DIVIDE(dividend, divisor) ({ \ argument
765 (__typeof__(dividend))(sizeof(dividend) <= sizeof(unsigned long) ? \
766 DIV_ROUND_UP(dividend, divisor) : \
767 DIV_ROUND_UP_ULL(dividend, divisor)); \
/linux-5.19.10/drivers/gpu/drm/msm/hdmi/
Dhdmi_phy_8996.c146 u64 dividend = HDMI_PLL_CMP_CNT * fdata; in pll_get_pll_cmp() local
150 rem = do_div(dividend, divisor); in pll_get_pll_cmp()
152 dividend++; in pll_get_pll_cmp()
154 return dividend - 1; in pll_get_pll_cmp()
/linux-5.19.10/drivers/clk/pistachio/
Dclk-pll.c94 static inline u64 do_div_round_closest(u64 dividend, u64 divisor) in do_div_round_closest() argument
96 dividend += divisor / 2; in do_div_round_closest()
97 return div64_u64(dividend, divisor); in do_div_round_closest()
/linux-5.19.10/drivers/iio/common/hid-sensors/
Dhid-sensor-attributes.c71 static void simple_div(int dividend, int divisor, int *whole, in simple_div() argument
82 *whole = dividend/divisor; in simple_div()
83 rem = dividend % divisor; in simple_div()

123