Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 171 of file utmath.c.
Referenced by AcpiExConvertToAscii(), AcpiExDigitsNeeded(), AcpiExIntegerToString(), AcpiExOpcode_1A_1T_1R(), AcpiExSystemMemorySpaceHandler(), AcpiGetTimerDuration(), and AcpiUtStrtoul64().
{ UINT64_OVERLAY DividendOvl; UINT64_OVERLAY Quotient; UINT32 Remainder32; ACPI_FUNCTION_TRACE (UtShortDivide); /* Always check for a zero divisor */ if (Divisor == 0) { ACPI_ERROR ((AE_INFO, "Divide by zero")); return_ACPI_STATUS (AE_AML_DIVIDE_BY_ZERO); } DividendOvl.Full = Dividend; /* * The quotient is 64 bits, the remainder is always 32 bits, * and is generated by the second divide. */ ACPI_DIV_64_BY_32 (0, DividendOvl.Part.Hi, Divisor, Quotient.Part.Hi, Remainder32); ACPI_DIV_64_BY_32 (Remainder32, DividendOvl.Part.Lo, Divisor, Quotient.Part.Lo, Remainder32); /* Return only what was requested */ if (OutQuotient) { *OutQuotient = Quotient.Full; } if (OutRemainder) { *OutRemainder = Remainder32; } return_ACPI_STATUS (AE_OK); }