__getCFS
[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 Blank topics are included as placeholders.]
Microsoft 固有の仕様 →
現在のフレームの状態を取得します。
unsigned __int64 __getCFS(void);
戻り値
現在のフレーム マーカー (CFM) の最初の 18 ビットを返します。
必要条件
組み込み |
アーキテクチャ |
---|---|
__getCFS |
IPF |
ヘッダー ファイル <intrin.h>
解説
0 ビット6 は現在のスタック フレームのサイズがあります。 13 ビット 7 にはスタック フレーム内のローカル部分のサイズを指定します。 14 ビットに 17 にはスタック フレームの回転部分のサイズを指定します。
このルーチンは組み込みとしてのみ使用できます。
使用例
// getCFS.c
// processor: IPF
#include <stdio.h>
#include <intrin.h>
#pragma intrinsic (__getCFS)
#define SIZE_OF_FRAME_MASK 127
#define SIZE_OF_LOCALS_MASK 16256
#define SIZE_OF_ROT_MASK 245760
int main()
{
int size_of_frame, size_of_locals, size_of_rot;
unsigned __int64 cfs;
cfs = __getCFS();
printf_s("Current Frame State: 0x%x\n", cfs);
size_of_frame = cfs & SIZE_OF_FRAME_MASK;
size_of_locals = (cfs & SIZE_OF_LOCALS_MASK) >> 7;
size_of_rot = (cfs & SIZE_OF_ROT_MASK) >> 13;
printf_s("Size of current stack frame: %d\n",
size_of_frame);
printf_s("Size of locals portion of current stack frame: %d\n",
size_of_locals);
printf_s("Size of rotating portion of current stack frame: %d\n",
size_of_rot);
return 0;
}