Int64ShllMod32

The Int64ShllMod32 function performs a left logical shift operation on an unsigned 64-bit integer value. The function provides improved shifting code for left logical shifts where the shift count is in the range 0 – 31.

ULONGLONG Int64ShllMod32(
  ULONGLONG Value,  // the unsigned 64-bit integer to shift left logically
  DWORD ShiftCount  // a shift count in the range 0 - 31
);
 

Parameters

Value
Specifies the unsigned 64-bit integer to be shifted.
ShiftCount
Specifies a shift count in the range 0 – 31.

Return Values

The return value is the unsigned 64-bit integer result of the left logical shift operation.

Remarks

The shift count is the number of bit positions that the value's bits move.

In a left logical shift operation on an unsigned value, the value's bits move to the left, and vacated bits on the right side of the value are set to zero.

A compiler can generate optimal code for a left logical shift operation when the shift count is a constant. However, if the shift count is a variable whose range of values is unknown, the compiler must assume the worst case, leading to non-optimal code: code that calls a subroutine, or code that is inline but branches. By restricting the shift count to the range 0 – 31, the Int64ShllMod32 function lets the compiler generate optimal or near-optimal code.

Please note that the Int64ShllMod32 function's Value parameter and return value are 64-bit values, not LARGE_INTEGER structures.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winnt.h.

See Also

Large Integer Operations Overview, Large Integer Operations Functions, Int64ShraMod32, Int64ShrlMod32