]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.asm
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ia32 / DivU64x32.asm
CommitLineData
3eb9473e 1; Copyright (c) 2004, Intel Corporation \r
2; All rights reserved. This program and the accompanying materials \r
3; are licensed and made available under the terms and conditions of the BSD License \r
4; which accompanies this distribution. The full text of the license may be found at \r
5; http://opensource.org/licenses/bsd-license.php \r
6; \r
7; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
8; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
9;\r
10; Module Name:\r
11;\r
12; DivU64x32.asm\r
13;\r
14; Abstract:\r
15;\r
16; Calculate the quotient of a 64-bit integer by a 32-bit integer\r
17;\r
18;------------------------------------------------------------------------------\r
19\r
20 .386\r
21 .model flat,C\r
22 .code\r
23\r
24;------------------------------------------------------------------------------\r
25; UINT64\r
26; EFIAPI\r
27; InternalMathDivU64x32 (\r
28; IN UINT64 Dividend,\r
29; IN UINT32 Divisor\r
30; );\r
31;------------------------------------------------------------------------------\r
32InternalMathDivU64x32 PROC\r
33 mov eax, [esp + 8]\r
34 mov ecx, [esp + 12]\r
35 xor edx, edx\r
36 div ecx\r
37 push eax ; save quotient on stack\r
38 mov eax, [esp + 8]\r
39 div ecx\r
40 pop edx ; restore high-order dword of the quotient\r
41 ret\r
42InternalMathDivU64x32 ENDP\r
43\r
44 END\r