2 64-bit Math Worker Function.
3 The 32-bit versions of C compiler generate calls to library routines
4 to handle 64-bit math. These functions use non-standard calling conventions.
6 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/BaseLib.h>
21 * Divides a 64-bit unsigned value by another 64-bit unsigned value and returns
22 * the 64-bit unsigned remainder.
24 __declspec(naked
) void __cdecl
_aullrem(void)
27 // Wrapper Implementation over EDKII DivU64x64Remainder() routine
30 // DivU64x64Remainder (
31 // IN UINT64 Dividend,
33 // OUT UINT64 *Remainder OPTIONAL
37 ; Original local stack when calling _aullrem
50 ; ESP
---->|---------------|
54 ; Set up the local stack
for Reminder pointer
60 ; Set up the local stack
for Divisor parameter
68 ; Set up the local stack
for Dividend parameter
76 ; Call native DivU64x64Remainder of BaseLib
78 call DivU64x64Remainder
81 ; Put the Reminder in EDX
:EAX as
return value