x86指令前缀字节的编码顺序 [英] order for encoding x86 instruction prefix bytes

查看:272
本文介绍了x86指令前缀字节的编码顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道x86指令最多可以有4个字节的前缀,例如Lock,rep,段覆盖等.

I know that x86 instructions can have a maximum of 4 bytes of prefixes, e.g Lock, rep, segment overrides etc.

在使用多个前缀的情况下,它们的显示顺序是否有任何特定的顺序?

Is there any particular order in which they should appear, in case multiple prefixes are used?

推荐答案

可以在《英特尔软件开发人员手册》第2A卷中找到该顺序.

the order can be found in volume 2A of the Intel Software Developer's Manual.

简而言之:

  • F2F3前缀彼此抵消.以后的优先级高.
  • 如果使用F2F3(作为长指令中的强制性前缀),则
  • 66前缀将被忽略.当然,这不适用于rep movsw,因为这两个前缀都是简单的前缀,而不是操作码的一部分.
  • REX转义符不得后面带有任何其他前缀.
  • 在VEX转义符之前不能添加REX,66F2F3
  • the F2 and F3 prefixes cancel each other out. The one that comes later has precedence.
  • the 66 prefix is ignored if either F2 or F3 are used (as mandatory prefixes in a long instruction). This of course doesn't apply to rep movsw where both those prefixes are simply prefixes, not part of the opcode.
  • the REX escape may not be followed by any other prefixes.
  • the VEX escape may not be preceded by REX, 66, F2 or F3

其余的顺序无关紧要.

这篇关于x86指令前缀字节的编码顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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