]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/ModU64x32.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ModU64x32.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; DivU64x32.asm
9 ;
10 ; Abstract:
11 ;
12 ; Calculate the remainder of a 64-bit integer by a 32-bit integer
13 ;
14 ;------------------------------------------------------------------------------
15
16 SECTION .text
17
18 ;------------------------------------------------------------------------------
19 ; UINT32
20 ; EFIAPI
21 ; InternalMathModU64x32 (
22 ; IN UINT64 Dividend,
23 ; IN UINT32 Divisor
24 ; );
25 ;------------------------------------------------------------------------------
26 global ASM_PFX(InternalMathModU64x32)
27 ASM_PFX(InternalMathModU64x32):
28 mov eax, [esp + 8]
29 mov ecx, [esp + 12]
30 xor edx, edx
31 div ecx
32 mov eax, [esp + 4]
33 div ecx
34 mov eax, edx
35 ret
36