Coverage Report

Created: 2024-10-17 06:29

/src/hbfa-fl/HBFA/UefiHostTestPkg/Library/BaseLibHost/DivU64x32Remainder.c
Line
Count
Source
1
/** @file
2
  Math worker functions.
3
4
  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5
  SPDX-License-Identifier: BSD-2-Clause-Patent
6
7
**/
8
9
#include <Base.h>
10
#include <Library/BaseLib.h>
11
#include <Library/DebugLib.h>
12
13
UINT64
14
EFIAPI
15
InternalMathDivRemU64x32 (
16
  IN      UINT64                    Dividend,
17
  IN      UINT32                    Divisor,
18
  OUT     UINT32                    *Remainder OPTIONAL
19
  );
20
21
/**
22
  Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
23
  a 64-bit unsigned result and an optional 32-bit unsigned remainder.
24
25
  This function divides the 64-bit unsigned value Dividend by the 32-bit
26
  unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder
27
  is not NULL, then the 32-bit unsigned remainder is returned in Remainder.
28
  This function returns the 64-bit unsigned quotient.
29
30
  If Divisor is 0, then ASSERT().
31
32
  @param  Dividend  A 64-bit unsigned value.
33
  @param  Divisor   A 32-bit unsigned value.
34
  @param  Remainder A pointer to a 32-bit unsigned value. This parameter is
35
                    optional and may be NULL.
36
37
  @return Dividend / Divisor
38
39
**/
40
UINT64
41
EFIAPI
42
DivU64x32Remainder (
43
  IN      UINT64                    Dividend,
44
  IN      UINT32                    Divisor,
45
  OUT     UINT32                    *Remainder  OPTIONAL
46
  )
47
5.39k
{
48
5.39k
  ASSERT (Divisor != 0);
49
5.39k
  return InternalMathDivRemU64x32 (Dividend, Divisor, Remainder);
50
5.39k
}