-/**\r
- Returns the bit position of the lowest bit set in a 64-bit value.\r
-\r
- This function computes the bit position of the lowest bit set in the 64-bit\r
- value specified by Operand. If Operand is zero, then -1 is returned.\r
- Otherwise, a value between 0 and 63 is returned.\r
-\r
- @param Operand The 64-bit operand to evaluate.\r
-\r
- @retval 0..63 The lowest bit set in Operand was found.\r
- @retval -1 Operand is zero.\r
-\r
-\r
-**/\r
-INTN\r
-EFIAPI\r
-LowBitSet64 (\r
- IN UINT64 Operand\r
- );\r
-\r
-\r
-/**\r
- Returns the bit position of the highest bit set in a 32-bit value. Equivalent\r
- to log2(x).\r
-\r
- This function computes the bit position of the highest bit set in the 32-bit\r
- value specified by Operand. If Operand is zero, then -1 is returned.\r
- Otherwise, a value between 0 and 31 is returned.\r
-\r
- @param Operand The 32-bit operand to evaluate.\r
-\r
- @retval 0..31 Position of the highest bit set in Operand if found.\r
- @retval -1 Operand is zero.\r
-\r
-**/\r
-INTN\r
-EFIAPI\r
-HighBitSet32 (\r
- IN UINT32 Operand\r
- );\r
-\r
-\r
-/**\r
- Returns the bit position of the highest bit set in a 64-bit value. Equivalent\r
- to log2(x).\r
-\r
- This function computes the bit position of the highest bit set in the 64-bit\r
- value specified by Operand. If Operand is zero, then -1 is returned.\r
- Otherwise, a value between 0 and 63 is returned.\r
-\r
- @param Operand The 64-bit operand to evaluate.\r
-\r
- @retval 0..63 Position of the highest bit set in Operand if found.\r
- @retval -1 Operand is zero.\r
-\r
-**/\r
-INTN\r
-EFIAPI\r
-HighBitSet64 (\r
- IN UINT64 Operand\r
- );\r
-\r
-\r
-/**\r
- Returns the value of the highest bit set in a 32-bit value. Equivalent to\r
- 1 << log2(x).\r
-\r
- This function computes the value of the highest bit set in the 32-bit value\r
- specified by Operand. If Operand is zero, then zero is returned.\r
-\r
- @param Operand The 32-bit operand to evaluate.\r
-\r
- @return 1 << HighBitSet32(Operand)\r
- @retval 0 Operand is zero.\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-GetPowerOfTwo32 (\r
- IN UINT32 Operand\r
- );\r
-\r
-\r
-/**\r
- Returns the value of the highest bit set in a 64-bit value. Equivalent to\r
- 1 << log2(x).\r
-\r
- This function computes the value of the highest bit set in the 64-bit value\r
- specified by Operand. If Operand is zero, then zero is returned.\r
-\r
- @param Operand The 64-bit operand to evaluate.\r
-\r
- @return 1 << HighBitSet64(Operand)\r
- @retval 0 Operand is zero.\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-GetPowerOfTwo64 (\r
- IN UINT64 Operand\r
- );\r
-\r
-\r
-/**\r
- Switches the endianness of a 16-bit integer.\r
-\r
- This function swaps the bytes in a 16-bit unsigned value to switch the value\r
- from little endian to big endian or vice versa. The byte swapped value is\r
- returned.\r
-\r
- @param Value A 16-bit unsigned value.\r
-\r
- @return The byte swapped Value.\r
-\r
-**/\r
-UINT16\r
-EFIAPI\r
-SwapBytes16 (\r
- IN UINT16 Value\r
- );\r
-\r
-\r
-/**\r
- Switches the endianness of a 32-bit integer.\r
-\r
- This function swaps the bytes in a 32-bit unsigned value to switch the value\r
- from little endian to big endian or vice versa. The byte swapped value is\r
- returned.\r
-\r
- @param Value A 32-bit unsigned value.\r
-\r
- @return The byte swapped Value.\r
-\r
-**/\r
-UINT32\r
-EFIAPI\r
-SwapBytes32 (\r
- IN UINT32 Value\r
- );\r
-\r
-\r
-/**\r
- Switches the endianness of a 64-bit integer.\r
-\r
- This function swaps the bytes in a 64-bit unsigned value to switch the value\r
- from little endian to big endian or vice versa. The byte swapped value is\r
- returned.\r
-\r
- @param Value A 64-bit unsigned value.\r
-\r
- @return The byte swapped Value.\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-SwapBytes64 (\r
- IN UINT64 Value\r
- );\r
-\r
-\r
-/**\r
- Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and\r
- generates a 64-bit unsigned result.\r
-\r
- This function multiples the 64-bit unsigned value Multiplicand by the 32-bit\r
- unsigned value Multiplier and generates a 64-bit unsigned result. This 64-\r
- bit unsigned result is returned.\r
-\r
- @param Multiplicand A 64-bit unsigned value.\r
- @param Multiplier A 32-bit unsigned value.\r
-\r
- @return Multiplicand * Multiplier\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-MultU64x32 (\r
- IN UINT64 Multiplicand,\r
- IN UINT32 Multiplier\r
- );\r
-\r
-\r
-/**\r
- Multiples a 64-bit unsigned integer by a 64-bit unsigned integer and\r
- generates a 64-bit unsigned result.\r
-\r
- This function multiples the 64-bit unsigned value Multiplicand by the 64-bit\r
- unsigned value Multiplier and generates a 64-bit unsigned result. This 64-\r
- bit unsigned result is returned.\r
-\r
- @param Multiplicand A 64-bit unsigned value.\r
- @param Multiplier A 64-bit unsigned value.\r
-\r
- @return Multiplicand * Multiplier.\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-MultU64x64 (\r
- IN UINT64 Multiplicand,\r
- IN UINT64 Multiplier\r
- );\r
-\r
-\r
-/**\r
- Multiples a 64-bit signed integer by a 64-bit signed integer and generates a\r
- 64-bit signed result.\r
-\r
- This function multiples the 64-bit signed value Multiplicand by the 64-bit\r
- signed value Multiplier and generates a 64-bit signed result. This 64-bit\r
- signed result is returned.\r
-\r
- @param Multiplicand A 64-bit signed value.\r
- @param Multiplier A 64-bit signed value.\r
-\r
- @return Multiplicand * Multiplier\r
-\r
-**/\r
-INT64\r
-EFIAPI\r
-MultS64x64 (\r
- IN INT64 Multiplicand,\r
- IN INT64 Multiplier\r
- );\r
-\r
-\r
-/**\r
- Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates\r
- a 64-bit unsigned result.\r
-\r
- This function divides the 64-bit unsigned value Dividend by the 32-bit\r
- unsigned value Divisor and generates a 64-bit unsigned quotient. This\r
- function returns the 64-bit unsigned quotient.\r
-\r
- If Divisor is 0, then ASSERT().\r
-\r
- @param Dividend A 64-bit unsigned value.\r
- @param Divisor A 32-bit unsigned value.\r
-\r
- @return Dividend / Divisor.\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-DivU64x32 (\r
- IN UINT64 Dividend,\r
- IN UINT32 Divisor\r
- );\r
-\r
-\r
-/**\r
- Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates\r
- a 32-bit unsigned remainder.\r
-\r
- This function divides the 64-bit unsigned value Dividend by the 32-bit\r
- unsigned value Divisor and generates a 32-bit remainder. This function\r
- returns the 32-bit unsigned remainder.\r
-\r
- If Divisor is 0, then ASSERT().\r
-\r
- @param Dividend A 64-bit unsigned value.\r
- @param Divisor A 32-bit unsigned value.\r