Home
last modified time | relevance | path

Searched full:remainder (Results 1 – 25 of 769) sorted by relevance

12345678910>>...31

/openbmc/linux/Documentation/staging/
H A Dcrc32.rst5 A CRC is a long-division remainder. You add the CRC to the message,
9 remainder computed on the message+CRC is 0. This latter approach
20 Like all division, the remainder is always smaller than the divisor.
36 and append it to the current remainder. Then you figure out the
37 appropriate multiple of the divisor to subtract to being the remainder
39 and to make the XOR cancel, it's just a copy of bit 32 of the remainder.
43 the polynomial from the remainder and we're back to where we started,
49 multiple = remainder & 0x80000000 ? CRCPOLY : 0;
50 remainder = (remainder << 1 | next_input_bit()) ^ multiple;
53 Notice how, to get at bit 32 of the shifted remainder, we look
[all …]
/openbmc/linux/include/linux/
H A Dmath64.h16 * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder
19 * @remainder: pointer to unsigned 32bit remainder
21 * Return: sets ``*remainder``, then returns dividend / divisor
26 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()
33 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder
36 * @remainder: pointer to signed 32bit remainder
38 * Return: sets ``*remainder``, then returns dividend / divisor
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()
[all …]
/openbmc/u-boot/lib/
H A Ddiv64.c10 * 64bit result and 32bit remainder.
64 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument
69 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
70 *remainder = -*remainder; in div_s64_rem()
74 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
84 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
87 * @remainder: 64bit remainder
90 * But this operation, which includes math for calculating the remainder,
95 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument
103 *remainder = rem32; in div64_u64_rem()
[all …]
/openbmc/u-boot/include/linux/
H A Dmath64.h14 * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder
19 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
21 *remainder = dividend % divisor; in div_u64_rem()
26 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder
28 static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument
30 *remainder = dividend % divisor; in div_s64_rem()
35 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
37 static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument
39 *remainder = dividend % divisor; in div64_u64_rem()
65 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
[all …]
/openbmc/linux/lib/math/
H A Ddiv64.c11 * 64bit result and 32bit remainder.
67 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument
72 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
73 *remainder = -*remainder; in div_s64_rem()
77 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem()
87 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder
90 * @remainder: 64bit remainder
93 * But this operation, which includes math for calculating the remainder,
98 u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument
106 *remainder = rem32; in div64_u64_rem()
[all …]
H A Dtest_div64.c57 u32 remainder; member
152 static inline bool test_div64_verify(u64 quotient, u32 remainder, int i, int j) in test_div64_verify() argument
155 remainder == test_div64_results[i][j].remainder); in test_div64_verify()
166 u32 remainder; \
169 remainder = do_div(quotient, divisor); \
170 if (!test_div64_verify(quotient, remainder, i, j)) { \
172 dividend, divisor, quotient, remainder); \
175 test_div64_results[i][j].remainder); \
/openbmc/u-boot/drivers/mtd/ubi/
H A Dcrc32.c253 * A CRC is a long-division remainder. You add the CRC to the message,
257 * remainder computed on the message+CRC is 0. This latter approach
280 * Just like with ordinary division, the remainder is always smaller than
283 * to the current remainder. Then you figure out the appropriate multiple
284 * of the divisor to subtract to being the remainder back into range.
286 * XOR cancel, it's just a copy of bit 32 of the remainder.
290 * the polynomial from the remainder and we're back to where we started,
295 * multiple = remainder & 0x80000000 ? CRCPOLY : 0;
296 * remainder = (remainder << 1 | next_input_bit()) ^ multiple;
298 * Notice how, to get at bit 32 of the shifted remainder, we look
[all …]
/openbmc/linux/drivers/acpi/acpica/
H A Dutmath.c245 * out_remainder - Pointer to where the remainder is returned
251 * 32-bit remainder.
275 * The quotient is 64 bits, the remainder is always 32 bits, in acpi_ut_short_divide()
303 * out_remainder - Pointer to where the remainder is returned
318 union uint64_overlay remainder; in acpi_ut_divide() local
341 remainder.part.hi = 0; in acpi_ut_divide()
344 * The quotient is 64 bits, the remainder is always 32 bits, in acpi_ut_divide()
351 quotient.part.lo, remainder.part.lo); in acpi_ut_divide()
382 * adjustment. The 64-bit remainder must be generated. in acpi_ut_divide()
388 remainder.part.hi = partial3.part.lo; in acpi_ut_divide()
[all …]
/openbmc/linux/arch/nios2/kernel/
H A Dinsnemu.S223 * remainder dividend:quotient
227 * remainder >= divisor? no 00000000 0101011:0
229 * remainder >= divisor? no 00000000 101011:00
231 * remainder >= divisor? no 00000001 01011:000
233 * remainder >= divisor? no 00000010 1011:0000
235 * remainder >= divisor? no 00000101 011:00000
237 * remainder >= divisor? yes 00001010 11:000001
238 * remainder -= divisor - 00000111
242 * remainder >= divisor? yes 00000111 1:0000011
243 * remainder -= divisor - 00000111
[all …]
/openbmc/linux/arch/powerpc/math-emu/
H A Dudivmodti4.c27 /* Remainder in n0. */ in _fp_udivmodti4()
39 /* Remainder in n0. */ in _fp_udivmodti4()
66 /* Remainder in n0 >> bm. */ in _fp_udivmodti4()
109 /* Remainder in n0 >> bm. */ in _fp_udivmodti4()
125 /* Remainder in n1n0. */ in _fp_udivmodti4()
182 /* Remainder in (n1n0 - m1m0) >> bm. */ in _fp_udivmodti4()
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dml/calcs/
H A Dbw_fixed.c64 uint64_t remainder; in bw_frc_to_fixed() local
73 res_value = div64_u64_rem(arg1_value, arg2_value, &remainder); in bw_frc_to_fixed()
82 remainder <<= 1; in bw_frc_to_fixed()
86 if (remainder >= arg2_value) { in bw_frc_to_fixed()
88 remainder -= arg2_value; in bw_frc_to_fixed()
95 uint64_t summand = (remainder << 1) >= arg2_value; in bw_frc_to_fixed()
/openbmc/linux/drivers/clk/at91/
H A Dclk-pll.c175 unsigned long remainder; in clk_pll_get_best_div_mul() local
186 remainder = tmprate - rate; in clk_pll_get_best_div_mul()
188 remainder = rate - tmprate; in clk_pll_get_best_div_mul()
191 * Compare the remainder with the best remainder found until in clk_pll_get_best_div_mul()
193 * current remainder is smaller than the best one. in clk_pll_get_best_div_mul()
195 if (remainder < bestremainder) { in clk_pll_get_best_div_mul()
196 bestremainder = remainder; in clk_pll_get_best_div_mul()
206 if (!remainder) in clk_pll_get_best_div_mul()
/openbmc/linux/lib/crypto/mpi/
H A Dmpi-div.c25 /* We need the original value of the divisor after the remainder has been in mpi_fdiv_r()
97 /* Ensure space is enough for quotient and remainder. in mpi_tdiv_qr()
98 * We need space for an extra limb in the remainder, because it's in mpi_tdiv_qr()
157 } else /* Put quotient at top of remainder. */ in mpi_tdiv_qr()
179 * significant word. Move the shifted numerator in the remainder in mpi_tdiv_qr()
190 * temporary space if it overlaps with the quotient or remainder. in mpi_tdiv_qr()
200 /* Move the numerator to the remainder. */ in mpi_tdiv_qr()
/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()
35 assert(qr.remainder == expected_remainder); 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()
35 assert(qr.remainder == expected_remainder); in verify_divu1()
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dml/
H A Ddml_inline_defs.h137 unsigned int remainder; in dml_round_to_multiple()
142 remainder = num % multiple; in dml_round_to_multiple()
144 if (remainder == 0) in dml_abs()
148 return (num + multiple - remainder); in dml_abs()
150 return (num - remainder); in dml_abs()
129 unsigned int remainder; dml_round_to_multiple() local
/openbmc/linux/drivers/gpu/drm/amd/display/dc/basics/
H A Dfixpt31_32.c45 * *remainder = dividend % divisor
50 unsigned long long *remainder) in complete_integer_division_u64() argument
56 result = div64_u64_rem(dividend, divisor, remainder); in complete_integer_division_u64()
81 unsigned long long remainder; in dc_fixpt_from_fraction() local
86 arg1_value, arg2_value, &remainder); in dc_fixpt_from_fraction()
95 remainder <<= 1; in dc_fixpt_from_fraction()
99 if (remainder >= arg2_value) { in dc_fixpt_from_fraction()
101 remainder -= arg2_value; in dc_fixpt_from_fraction()
108 unsigned long long summand = (remainder << 1) >= arg2_value; in dc_fixpt_from_fraction()
/openbmc/linux/arch/parisc/math-emu/
H A Dsfrem.c15 * Single Precision Floating-point Remainder
34 * Single Precision Floating-point Remainder
204 * Do iterative subtract until remainder is less than operand 2. in sgl_frem()
212 * Do last subtract, then determine which way to round if remainder in sgl_frem()
220 /* division is exact, remainder is zero */ in sgl_frem()
237 /* check for remainder being exactly 1/2 of opnd2 */ in sgl_frem()
H A Ddfrem.c15 * Double Precision Floating-point Remainder
34 * Double Precision Floating-point Remainder
208 * Do iterative subtract until remainder is less than operand 2. in dbl_frem()
217 * Do last subtract, then determine which way to round if remainder in dbl_frem()
225 /* division is exact, remainder is zero */ in dbl_frem()
243 /* check for remainder being exactly 1/2 of opnd2 */ in dbl_frem()
/openbmc/u-boot/cmd/
H A Dtime.c12 ulong total_seconds, remainder; in report_time() local
15 remainder = cycles % CONFIG_SYS_HZ; in report_time()
19 milliseconds = (remainder * 1000 + CONFIG_SYS_HZ / 2) / CONFIG_SYS_HZ; in report_time()
/openbmc/linux/arch/x86/include/asm/
H A Ddiv64.h12 * two values (the quotient and the remainder), but
17 * - returns the 32-bit remainder
43 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
57 asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) : in div_u64_rem()
/openbmc/u-boot/fs/ext4/
H A Dext4_write.c140 int remainder; in delete_single_indirect_block() local
157 remainder = blknr % blk_per_grp; in delete_single_indirect_block()
158 if (!remainder) in delete_single_indirect_block()
189 int remainder; in delete_double_indirect_block() local
219 remainder = le32_to_cpu(*di_buffer) % blk_per_grp; in delete_double_indirect_block()
220 if (!remainder) in delete_double_indirect_block()
252 remainder = blknr % blk_per_grp; in delete_double_indirect_block()
253 if (!remainder) in delete_double_indirect_block()
286 int remainder; in delete_triple_indirect_block() local
328 remainder = le32_to_cpu(*tip_buffer) % blk_per_grp; in delete_triple_indirect_block()
[all …]
/openbmc/openbmc/meta-security/recipes-ids/suricata/files/
H A DCVE-2024-38535_pre.patch237 Ok((remainder, hd)) => {
244 assert_eq!(remainder.len(), 0);
248 Ok((remainder, hd)) => {
255 assert_eq!(remainder.len(), 0);
259 Ok((remainder, hd)) => {
266 assert_eq!(remainder.len(), 0);
270 Ok((remainder, hd)) => {
277 assert_eq!(remainder.len(), 0);
281 Ok((remainder, hd)) => {
288 assert_eq!(remainder.len(), 0);
/openbmc/u-boot/drivers/crypto/
H A Daspeed_hace.c109 static void aspeed_ahash_fill_padding(struct aspeed_hash_ctx *ctx, unsigned int remainder) in aspeed_ahash_fill_padding() argument
116 index = (ctx->bufcnt + remainder) & 0x3f; in aspeed_ahash_fill_padding()
125 index = (ctx->bufcnt + remainder) & 0x7f; in aspeed_ahash_fill_padding()
208 int remainder; in hw_sha_update() local
221 remainder = (size + ctx->bufcnt) % ctx->block_size; in hw_sha_update()
222 total_len = size + ctx->bufcnt - remainder; in hw_sha_update()
238 if (remainder != 0) { in hw_sha_update()
239 memcpy(ctx->buffer, buf + (total_len - ctx->bufcnt), remainder); in hw_sha_update()
240 ctx->bufcnt = remainder; in hw_sha_update()
/openbmc/qemu/util/
H A Dhost-utils.c91 * Returns the remainder.
93 * Also returns the remainder via the function return value.
147 * the remainder might also have to be shifted back in divu128()
156 * Also returns the remainder via the function return value.
272 * Returns the remainder via r.
334 * Returns the remainder.
336 * Also returns the remainder via the function return value.
392 * the remainder might also have to be shifted back in divu256()
402 * Also returns the remainder via the function return value.

12345678910>>...31