1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006, Intel Corporation
4 ; All rights reserved. This program and the accompanying materials
5 ; are licensed and made available under the terms and conditions of the BSD License
6 ; which accompanies this distribution. The full text of the license may be found at
7 ; http://opensource.org/licenses/bsd-license.php
9 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 ; DivU64x64Remainder.asm
18 ; Calculate the quotient of a 64-bit integer by a 64-bit integer and returns
19 ; both the quotient and the remainder
21 ;------------------------------------------------------------------------------
27 EXTERN InternalMathDivRemU64x32:PROC
29 InternalMathDivRemU64x64 PROC
35 and dword ptr [ecx + 4], 0
38 jmp InternalMathDivRemU64x32
39 InternalMathDivRemU64x64 ENDP
41 _@DivRemU64x64 PROC USES ebx esi edi
42 mov edx, dword ptr [esp + 20]
43 mov eax, dword ptr [esp + 16]
46 mov ebx, dword ptr [esp + 24]
56 mul dword ptr [esp + 24]
59 mov ecx, dword ptr [esp + 32]
69 sub eax, dword ptr [esp + 24]
70 sbb edx, dword ptr [esp + 28]