英特尔手册中的x86_64 Opcode编码格式 [英] x86_64 Opcode encoding formats in the intel manual

查看:44
本文介绍了英特尔手册中的x86_64 Opcode编码格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

添加操作码中,我可以猜测诸如"I" =立即数之类的内容,但是在那里这些的完整列表吗?

What are the "Op/En" formats listed in the Intel x86_64 reference manual? For example in the Add opcode I can take a guess at some such as "I" = Immediate, but is there a comprehensive list for these?

推荐答案

The intro sections of Intel's vol.2 manual explain how to read each entry:

指令摘要表中的3.1.1.4节操作数编码"列

操作数编码"列在中缩写为Op/En指令摘要表标题.指令操作数编码使用以下命令为每个汇编指令语法提供信息:交叉引用操作数编码中的行条目的字母指令摘要表之后的定义表....

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. ...

注意

  • 指令的Op/En列中的字母仅适用于编码定义表紧跟在指令摘要表之后.

...

因此它们只是每条指令附带的表的键.不,Intel似乎没有证明它们代表什么,但这很简单.

So they're just keys to the table that goes with each instruction. And no, Intel doesn't seem to document what they stand for, but it's pretty straightforward.

(相关:如何确定ModR/通过操作码需要M吗?)

是的, I 代表即时.

对于 r/m reg 字段,使用ModRM字节编码的显式操作数为 M R

Explicit operands encoded with the ModRM byte are M or R for the r/m or reg fields.

V 是VEX.vvvv或EVEX编码的字段,为非破坏性操作或FMA之类的三操作数指令提供此类指令的第三个操作数.

V is the field encoded by VEX.vvvv or EVEX, giving such instructions a 3rd operand for non-destructive operations, or for 3-operand instructions like FMA.

vpblendvb xmm1,xmm2,xmm3/m128,xmm4 使用立即数对第4个操作数进行编码,然后在Op/En列中使用 RVMR .另请参见 x86 cpu具有哪种地址指令?-我认为这可能是唯一的x86指令,它具有4个单独的显式编码的操作数,位于AVX512的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 What kind of address instruction does the x86 cpu have? - I think that might be the only x86 instruction with 4 separate explicitly-encoded operands, outside of AVX512's 3 + mask register.

vextractf128 和AVX512版本它对表的行使用 A D ,因为唯一的区别是缩放后的短位移和掩码的元组类型".如果他们使用MRI/MRI2/MRI4等,那将很奇怪.

vextractf128 and the AVX512 versions of it use A through D for rows of the table because the only distinguishing feature is the "tuple type" for scaled short-displacements and masking. It would just be weird if they used MRI / MRI2 / MRI4 / etc.

(rep)movs 使用 ZO :所有操作数都是隐式的(DF,RSI,RDI和它们所指向的内存),因此可能表示零操作数.(至少不需要编码.)

(rep) movs uses ZO : all operands are implicit (DF, RSI, RDI, and the memory pointed-to by them), so probably that stands for Zero Operands. (At least none that need to be encoded).

cdq 使用相同的 ZO 所以是的,它可能是零(显式)操作数"

cdq uses the same ZO so yeah it's probably "zero (explicit) operands"

x86只有几种方法可以指定显式操作数.

x86 only has a few ways to specify explicit operands.

这篇关于英特尔手册中的x86_64 Opcode编码格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆