FF/4 中的/4 是什么意思? [英] What does the /4 mean in FF /4?

查看:29
本文介绍了FF/4 中的/4 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

常参考的一个网站的 x86 文档有一些指令代码一个斜线和一个数字.例如,jmp 接近绝对间接给出 FF/4,而 jmp 远绝对间接给出 FF/5.

One site that I commonly refer to for x86 documentation has a few instruction codes with a slash and a number. For instance, jmp near absolute indirect gives FF /4, whereas jmp far absolute indirect gives FF /5.

/4/5 是什么意思?

为了运行一个快速的小测试,我附加到一个 32 位进程,分配了一点内存并让汇编程序插入 jmp dword ptr[0x12345678];生成的字节码是 FF 25 78563412.我理解地址字节序,但是 25/4/5 有什么关系?

To run a quick little test, I attached to a 32-bit process, allocated a bit of memory and had the assembler insert jmp dword ptr[0x12345678]; the generated bytecode was FF 25 78563412. I understand the address endianess, but how does the 25 relate to /4 or /5?

我的猜测是我生成了一个 jmp far,并且 /5 意味着有五个字节作为参数(4 个字节用于地址 + 1 个字节用于 <代码>25).我仍然对 25 的来源感到困惑.

My guess is that I generated a jmp far, and that the /5 meant there were five bytes as parameters (4 bytes for the address + 1 byte for 25). I'm still confused as to where the 25 is coming from.

推荐答案

来自英特尔参考手册的3.1.1.1 指令汇总表中的操作码列"部分:

From the Intel Reference Manual, section "3.1.1.1 Opcode Column in the Instruction Summary Table":

  • /digit — 0 到 7 之间的数字表示 ModR/M 字节指令仅使用 r/m(寄存器或内存)操作数.reg 字段包含提供指令操作码扩展的数字.
  • /r — 表示指令的 ModR/M 字节包含一个寄存器操作数和 r/m 操作数.
  • /digit — A digit between 0 and 7 indicates that the ModR/M byte of the instruction uses only the r/m (register or memory) operand. The reg field contains the digit that provides an extension to the instruction's opcode.
  • /r — Indicates that the ModR/M byte of the instruction contains a register operand and an r/m operand.

ModR/M 字节的各种描述中也经常提到这种表示法,eg

This notation is also usually mentioned in the various descriptions of the ModR/M byte, e.g.

这篇关于FF/4 中的/4 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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