x86_64 intel手册中的操作码编码格式

x86_64 Opcode encoding formats in the intel manual

Intel x86_64 reference manual? 中列出的 "Op/En" 格式是什么 例如在 Add opcode 中,我可以猜测一些 "I" = Immediate,但是是否有这些的综合列表?

Intel's vol.2 manual 的介绍部分解释了如何阅读每个条目:

Section 3.1.1.4 Operand Encoding Column in the Instruction Summary Table

The “operand encoding” column is abbreviated as Op/En in the Instruction Summary table heading. Instruction operand encoding information is provided for each assembly instruction syntax using a letter to cross reference to a row entry in the operand encoding definition table that follows the instruction summary table. ...

NOTES

  • The letters in the Op/En column of an instruction apply ONLY to the encoding definition table immediately following the instruction summary table.

  • ...

所以它们只是每个指令附带的 table 的键。 不,英特尔似乎没有记录它们代表什么,但是非常简单。

(相关:


是的,I 代表立即。

对于 r/mreg 字段,使用 ModRM 字节编码的显式操作数是 MR

V 是由 VEX.vvvv 或 EVEX 编码的字段,为此类指令提供第 3 个操作数,用于非破坏性操作,或用于像 FMA 这样的 3 操作数指令。

vpblendvb xmm1, xmm2, xmm3/m128, xmm4 encodes the 4th operand with an immediate byte, and uses RVMR in to Op/En column. See also - 我认为这可能是除 AVX512 的 3 + 掩码寄存器之外唯一具有 4 个独立显式编码操作数的 x86 指令。

vextractf128 and the AVX512 versions of it 使用 AD 用于 table 的行,因为唯一的区别特征是 "tuple type" 用于缩放短位移和掩蔽.如果他们使用 MRI / MRI2 / MRI4 等,那就太奇怪了。


(rep) movs 使用 ZO :所有操作数都是隐式的(DF、RSI、RDI 和它们指向的内存),所以可能代表零操作数。 (至少none个需要编码)。

cdq 使用相同的 ZO 所以是的,它可能是 "zero (explicit) operands"

x86 只有几种方法可以指定 explicit 操作数。