VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseLib/DivS64x64Remainder.c@ 85718

Last change on this file since 85718 was 80721, checked in by vboxsync, 6 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1/** @file
2 Math worker functions.
3
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9
10
11
12#include "BaseLibInternals.h"
13
14/**
15 Divides a 64-bit signed integer by a 64-bit signed integer and generates a
16 64-bit signed result and a optional 64-bit signed remainder.
17
18 This function divides the 64-bit signed value Dividend by the 64-bit signed
19 value Divisor and generates a 64-bit signed quotient. If Remainder is not
20 NULL, then the 64-bit signed remainder is returned in Remainder. This
21 function returns the 64-bit signed quotient.
22
23 It is the caller's responsibility to not call this function with a Divisor of 0.
24 If Divisor is 0, then the quotient and remainder should be assumed to be
25 the largest negative integer.
26
27 If Divisor is 0, then ASSERT().
28
29 @param Dividend A 64-bit signed value.
30 @param Divisor A 64-bit signed value.
31 @param Remainder A pointer to a 64-bit signed value. This parameter is
32 optional and may be NULL.
33
34 @return Dividend / Divisor
35
36**/
37INT64
38EFIAPI
39DivS64x64Remainder (
40 IN INT64 Dividend,
41 IN INT64 Divisor,
42 OUT INT64 *Remainder OPTIONAL
43 )
44{
45 ASSERT (Divisor != 0);
46 return InternalMathDivRemS64x64 (Dividend, Divisor, Remainder);
47}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette