Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 1.57 KB

ull-rshift.md

File metadata and controls

79 lines (57 loc) · 1.57 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: __ull_rshift
__ull_rshift
09/02/2019
__ull_rshift
ull_rshift intrinsic
__ull_rshift intrinsic
b7ff5254-3540-4e6e-b57c-a6c4beb7dca2

__ull_rshift

Microsoft Specific

on x64, shifts a 64-bit value specified by the first parameter to the right by a number of bits specified by the second parameter.

Syntax

unsigned __int64 __ull_rshift(
   unsigned __int64 mask,
   int nBit
);

Parameters

mask
[in] The 64-bit integer value to shift right.

nBit
[in] The number of bits to shift, modulo 32 on x86, and modulo 64 on x64.

Return value

The mask shifted by nBit bits.

Requirements

Intrinsic Architecture
__ull_rshift x86, x64

Header file <intrin.h>

Remarks

If the second parameter is greater than 31 on x86 (63 on x64), that number is taken modulo 32 (64 on x64) to determine the number of bits to shift. The ull in the name indicates unsigned long long (unsigned __int64).

Example

// ull_rshift.cpp
// compile with: /EHsc
// processor: x86, x64
#include <iostream>
#include <intrin.h>
using namespace std;

#pragma intrinsic(__ull_rshift)

int main()
{
   unsigned __int64 mask = 0x100;
   int nBit = 8;
   mask = __ull_rshift(mask, nBit);
   cout << hex << mask << endl;
}
1

END Microsoft Specific

See also

__ll_lshift
__ll_rshift
Compiler intrinsics