为什么ia32/x64操作码将文档0x66和0xF2映射为操作码0x0F38F1(CRC32)的双重强制前缀? [英] Why does the ia32/x64 opcode map document 0x66 and 0xF2 as a double mandatory prefix for opcode 0x0F38F1 (CRC32)?

查看:339
本文介绍了为什么ia32/x64操作码将文档0x66和0xF2映射为操作码0x0F38F1(CRC32)的双重强制前缀?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在《英特尔64和IA-32体系结构软件开发人员手册》中,表F-4的表F-4附录A.3第2C卷(订货号326018-045US,2013年1月)是唯一的,因为它有一个前缀子行.两个前缀的组合:0x66和0xF2.

In the Intel 64 and IA-32 Architectures Software Developer's Manual, Row F table A-4 Appendix A.3 Volume 2C (Order Number 326018-045US January 2013) is unique in that it has a prefix sub-row for a combination of two prefixes: 0x66 and 0xF2.

与此相关的唯一操作码是0x0F38F1(CRC32).对于单独的前缀0xF2,源操作数为Ey(内存或通用寄存器; 32位或64位),对于前缀0x66和0xF2一起,源操作数为Ew(内存或通用寄存器;始终为16位)

The only opcode for which this is relevant is 0x0F38F1 (CRC32). For the prefix 0xF2 alone, the source operand is Ey (memory or general purpose register; 32 bit or 64 bit), and for the prefixes 0x66 and 0xF2 together, the source operand is Ew (memory or general purpose register; always 16 bit)

但是,这些源操作数与0x66只是可选的操作数大小覆盖前缀而不是两个强制性前缀的组合中的第一个是相同的.实际上,在第3.2卷2A章中,如何以0x66作为可选前缀来记录CRC32指令(隐式:16位和32位源操作数的相同字节序列).该表似乎可以省略0x66和0xF2行,而在0xF2行中将源操作数记录为Ev(内存或通用寄存器; 16位或32位或64位).

But these source operands are identical to what they would be if 0x66 were simply the optional operand size override prefix instead of the first of a combination of two mandatory prefixes. In fact, 0x66 as an optional prefix is how the CRC32 instruction is documented (implicitly: identical byte sequences for both 16 bit and 32 bit source operands) in Chapter 3.2 Volume 2A. It seems that the table could have omitted the 0x66 and 0xF2 row and documented the source operand as Ev (memory or general purpose register; 16 bit or 32 bit or 64 bit) in the 0xF2 row.

操作码映射是否有这种唯一方式记录操作码0x0F38F1的源操作数?

Is there a reason why the opcode map documents the source operand for opcode 0x0F38F1 in this unique way?

添加了手册版本

推荐答案

此操作码与Atom的MOVBE指令共享.我认为,这就是所有组合的外观:

This opcode is shared with the Atom's MOVBE instruction. I think this is how it looks for all combinations:

0F 38 F1        movbe My, Gy
66 0F 38 F1     movbe Mw, Gw
66 F2 0F 38 F1  crc32 Gd, Ew
F2 0F 38 F1     crc32 Gd, Ey
F2 66 0F 38 F1  crc32 Gd, Ew

编辑:对于0F38和0F3A组中的大多数操作码,66前缀是强制性前缀,它定义了实际指令,而不是通常的操作数大小前缀:

EDIT: for most of opcodes in the 0F38 and 0F3A groups, the 66 prefix is a mandatory prefix which defines the actual instruction, and not the usual operand-size prefix:

长度为4字节的三字节操作码以强制性开头 前缀(66H,F2H或F3H)和两个转义字节(0F38H或0F3AH).这 第四个字节的高四位和低四位用于索引a 表A-4或表A-5中的特定行和列.

Three-byte opcodes that are 4 bytes in length begin with a mandatory prefix (66H, F2H, or F3H) and two escape bytes (0F38H or 0F3AH). The upper and lower four bits of the fourth byte are used to index a particular row and column in Table A-4 or Table A-5.

这就是为什么必须单独列出在其传统的操作数大小覆盖角色中使用的其他可选66前缀的情况.

That's why the case of the additional, optional 66 prefix used in its traditional role of operand-size override has to be listed separately.

这篇关于为什么ia32/x64操作码将文档0x66和0xF2映射为操作码0x0F38F1(CRC32)的双重强制前缀?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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