TianoCore EDK2 master
Loading...
Searching...
No Matches
DivU64x32Remainder.c
Go to the documentation of this file.
1
26UINT64
27EFIAPI
29 IN UINT64 Dividend,
30 IN UINT32 Divisor,
31 OUT UINT32 *Remainder
32 )
33{
34 _asm {
35 mov ecx, Divisor
36 mov eax, dword ptr [Dividend + 4]
37 xor edx, edx
38 div ecx
39 push eax
40 mov eax, dword ptr [Dividend + 0]
41 div ecx
42 mov ecx, Remainder
43 jecxz RemainderNull // abandon remainder if Remainder == NULL
44 mov [ecx], edx
45RemainderNull:
46 pop edx
47 }
48}
UINT64 EFIAPI InternalMathDivRemU64x32(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
Definition: Math64.c:288
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284