]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c
2 Set error flag for all division functions
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 Divides a 64-bit unsigned integer by a 32-bit unsigned integer and
11 generates a 64-bit unsigned result and an optional 32-bit unsigned remainder.
13 This function divides the 64-bit unsigned value Dividend by the 32-bit
14 unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
15 is not NULL, then the 32-bit unsigned remainder is returned in Remainder.
16 This function returns the 64-bit unsigned quotient.
18 @param Dividend A 64-bit unsigned value.
19 @param Divisor A 32-bit unsigned value.
20 @param Remainder A pointer to a 32-bit unsigned value. This parameter is
21 optional and may be NULL.
23 @return Dividend / Divisor
28 InternalMathDivRemU64x32 (
36 mov eax
, dword ptr
[Dividend
+ 4]
40 mov eax
, dword ptr
[Dividend
+ 0]
43 jecxz RemainderNull
// abandon remainder if Remainder == NULL