__ll_rshift

[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 Blank topics are included as placeholders.]

Microsoft 固有の仕様 →

2 番目のパラメーターで指定されている数多くのビットを右側に最初のパラメーターで指定される 64 ビット値へ移動します。

__int64 __ll_rshift(
   __int64 Mask,
   int nBit
);

パラメーター

  • [入力] Mask
    アクセス許可を再配置 64 ビット整数値。

  • [入力] nBit
    x64残りの 64 ビット シフトするとx86 の剰余 32 の数値。

戻り値

nBit のビットで移動するマスク。

必要条件

組み込み

アーキテクチャ

__ll_rshift

x86x64

ヘッダー ファイル <intrin.h>

解説

2 番目のパラメーター (x86x64 32) 64 より大きい場合その値はシフトするビット数を決定する剰余 64 (x86)32 取得されます。 ll のプレフィックスはlong long の操作であることを __int64別の名前64 ビット符号付き整数型を示します。

使用例

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

#pragma intrinsic(__ll_rshift)

int main()
{
   __int64 Mask = - 0x100;
   int nBit = 4;
   cout << hex << Mask << endl;
   cout << " - " << (- Mask) << endl;
   Mask = __ll_rshift(Mask, nBit);
   cout << hex << Mask << endl;
   cout << " - " << (- Mask) << endl;
}

出力

ffffffffffffff00
 - 100
fffffffffffffff0
 - 10

_ull_rshift を使用した 説明は 右側の値から始まるためこの目的の結果は負の値の場合はから派生なかろう。

参照

Reference

コンパイラ組み込み関数。

__ll_lshift

__ull_rshift