TianoCore EDK2 master
Loading...
Searching...
No Matches
HighBitSet64.c
Go to the documentation of this file.
1
9#include "BaseLibInternals.h"
10
25INTN
26EFIAPI
28 IN UINT64 Operand
29 )
30{
31 if (Operand == (UINT32)Operand) {
32 //
33 // Operand is just a 32-bit integer
34 //
35 return HighBitSet32 ((UINT32)Operand);
36 }
37
38 //
39 // Operand is really a 64-bit integer
40 //
41 if (sizeof (UINTN) == sizeof (UINT32)) {
42 return HighBitSet32 (((UINT32 *)&Operand)[1]) + 32;
43 } else {
44 return HighBitSet32 ((UINT32)RShiftU64 (Operand, 32)) + 32;
45 }
46}
UINT64 UINTN
INT64 INTN
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: RShiftU64.c:28
INTN EFIAPI HighBitSet32(IN UINT32 Operand)
Definition: HighBitSet32.c:27
INTN EFIAPI HighBitSet64(IN UINT64 Operand)
Definition: HighBitSet64.c:27
#define IN
Definition: Base.h:279