__getcallerseflags
Microsoft 专用
从调用方上下文中返回 EFLAGS 值。
语法
unsigned int __getcallerseflags(void);
返回值
调用方上下文中的 EFLAGS 值。
要求
Intrinsic | 体系结构 |
---|---|
__getcallerseflags |
x86、x64 |
头文件<intrin.h>
备注
此例程仅可用作内部函数。
示例
// getcallerseflags.cpp
// processor: x86, x64
#include <stdio.h>
#include <intrin.h>
#pragma intrinsic(__getcallerseflags)
unsigned int g()
{
unsigned int EFLAGS = __getcallerseflags();
printf_s("EFLAGS 0x%x\n", EFLAGS);
return EFLAGS;
}
unsigned int f()
{
return g();
}
int main()
{
unsigned int i;
i = f();
i = g();
return 0;
}
EFLAGS 0x202
EFLAGS 0x206
结束 Microsoft 专用
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈