SFENCE属于什么指令集?
我对 AMD64 (x86-64) 指令进行了大量研究,但它有点令人困惑。很多时候,官方 CPU 文档不会将指令指定为特定指令集的一部分,并且互联网有时会在特定指令所属的指令集上存在分歧。其中一个例子是 SFENCE,一些消息来源声称它是 EMMX 的一部分,而另一些消息来源则声称它是 SSE 的一部分。
我试图将所有这些内容组织在一个电子表格中以帮助学习,但在一个以技术和精确着称的领域,这些不一致之处令人难以置信地令人沮丧。
I've been doing a good amount of research on AMD64 (x86-64) instructions, and its been kind of confusing. A lot of the time official CPU documentation doesn't designate instruction as part of a specific set, and the internet is sometimes split on which instruction set a specific instruction belongs to. One example of this is SFENCE
, with some sources claiming that it's part of EMMX and others claiming it's part of SSE.
I'm trying to organize all of them in a spreadsheet to help with learning, but these inconsistencies are incredibly frustrating in a field that is famously technical and precise.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
EMMX 是 SSE 的子集,
sfence
是两者的一部分。AMD 并没有立即支持所有 SSE 指令,但首先 采用了不需要新 XMM 寄存器的子集(请参阅靠近底部的部分) PDF),后来被称为 EMMX。例如,其中包括
pavgb mm0、mm1
(但不
pavgb xmm0、xmm1
),以及sfence
。EMMX 中的所有指令也在 SSE 中,支持 SSE 的处理器都可以执行 EMMX 代码,无论它们是否“显式”支持 EMMX(具有专用的 CPUID 功能标志)。您链接的 Zen 1 又名 Summit Ridge 隐式支持 EMMX:它没有设置相应的功能标志,但由于它支持 SSE,因此它最终也支持 EMMX。在 Zen 之前,具有 SSE 的 AMD 处理器也用于设置 EMMX 功能标志。
EMMX is a subset of SSE, and
sfence
is part of both of them.AMD did not immediately support all SSE instructions, but at first took a subset of it that did not require the new XMM registers (see near the bottom of the PDF), which became known as EMMX. That included for example
pavgb mm0, mm1
(but notpavgb xmm0, xmm1
), and alsosfence
.All instructions that are in EMMX are also in SSE, processors that support SSE can execute EMMX code regardless of whether they "explicitly" support EMMX (which has a dedicated CPUID feature flag). The Zen 1 aka Summit Ridge you linked, supports EMMX implicitly: it does not have the corresponding feature flag set, but since it supports SSE, it also ends up supporting EMMX. Before Zen, AMD processors with SSE used to set the EMMX feature flag as well.