Lines Matching +full:full +full:- +full:bit

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: utmath - Integer math support routines
14 /* Structures used only for 64-bit divide */
22 u64 full; member
28 * Optional support for 64-bit double-precision integer multiply and shift.
29 * This code is configurable and is implemented in order to support 32-bit
30 * kernel environments where a 64-bit double-precision math library is not
39 * PARAMETERS: multiplicand - 64-bit multiplicand
40 * multiplier - 32-bit multiplier
41 * out_product - Pointer to where the product is returned
56 multiplicand_ovl.full = multiplicand; in acpi_ut_short_multiply()
73 *out_product = product.full; in acpi_ut_short_multiply()
83 * PARAMETERS: operand - 64-bit shift operand
84 * count - 32-bit shift count
85 * out_result - Pointer to where the result is returned
97 operand_ovl.full = operand; in acpi_ut_short_shift_left()
102 count = (count & 63) - 32; in acpi_ut_short_shift_left()
110 *out_result = operand_ovl.full; in acpi_ut_short_shift_left()
120 * PARAMETERS: operand - 64-bit shift operand
121 * count - 32-bit shift count
122 * out_result - Pointer to where the result is returned
134 operand_ovl.full = operand; in acpi_ut_short_shift_right()
139 count = (count & 63) - 32; in acpi_ut_short_shift_right()
147 *out_result = operand_ovl.full; in acpi_ut_short_shift_right()
229 * Optional support for 64-bit double-precision integer divide. This code
230 * is configurable and is implemented in order to support 32-bit kernel
231 * environments where a 64-bit double-precision math library is not available.
233 * Support for a more normal 64-bit divide/modulo (with check for a divide-
234 * by-zero) appears after this optional section of code.
242 * PARAMETERS: dividend - 64-bit dividend
243 * divisor - 32-bit divisor
244 * out_quotient - Pointer to where the quotient is returned
245 * out_remainder - Pointer to where the remainder is returned
247 * RETURN: Status (Checks for divide-by-zero)
250 * divide and modulo. The result is a 64-bit quotient and a
251 * 32-bit remainder.
272 dividend_ovl.full = dividend; in acpi_ut_short_divide()
287 *out_quotient = quotient.full; in acpi_ut_short_divide()
300 * PARAMETERS: in_dividend - Dividend
301 * in_divisor - Divisor
302 * out_quotient - Pointer to where the quotient is returned
303 * out_remainder - Pointer to where the remainder is returned
305 * RETURN: Status (Checks for divide-by-zero)
334 divisor.full = in_divisor; in acpi_ut_divide()
335 dividend.full = in_dividend; in acpi_ut_divide()
356 * 2) The general case where the divisor is a full 64 bits in acpi_ut_divide()
382 * adjustment. The 64-bit remainder must be generated. in acpi_ut_divide()
385 partial2.full = (u64) quotient.part.lo * divisor.part.lo; in acpi_ut_divide()
386 partial3.full = (u64) partial2.part.hi + partial1; in acpi_ut_divide()
395 quotient.part.lo--; in acpi_ut_divide()
396 remainder.full -= divisor.full; in acpi_ut_divide()
399 quotient.part.lo--; in acpi_ut_divide()
400 remainder.full -= divisor.full; in acpi_ut_divide()
404 remainder.full = remainder.full - dividend.full; in acpi_ut_divide()
405 remainder.part.hi = (u32)-((s32)remainder.part.hi); in acpi_ut_divide()
406 remainder.part.lo = (u32)-((s32)remainder.part.lo); in acpi_ut_divide()
409 remainder.part.hi--; in acpi_ut_divide()
417 *out_quotient = quotient.full; in acpi_ut_divide()
420 *out_remainder = remainder.full; in acpi_ut_divide()
435 * 1) The target is a 64-bit platform and therefore 64-bit
437 * 2) The target is a 32-bit or 16-bit platform, and the
438 * double-precision integer math library is available to