1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
12 ; Set error flag for all division functions
14 ;------------------------------------------------------------------------------
18 ;------------------------------------------------------------------------------
21 ; InternalMathDivRemU64x32 (
24 ; OUT UINT32 *Remainder
26 ;------------------------------------------------------------------------------
27 global ASM_PFX(InternalMathDivRemU64x32)
28 ASM_PFX(InternalMathDivRemU64x32):
29 mov ecx, [esp + 12] ; ecx <- divisor
30 mov eax, [esp + 8] ; eax <- dividend[32..63]
32 div ecx ; eax <- quotient[32..63], edx <- remainder
34 mov eax, [esp + 8] ; eax <- dividend[0..31]
35 div ecx ; eax <- quotient[0..31]
36 mov ecx, [esp + 20] ; ecx <- Remainder
37 jecxz .0 ; abandon remainder if Remainder == NULL
40 pop edx ; edx <- quotient[32..63]