【问题标题】:What does insn stand for?insn 代表什么?
【发布时间】:2014-09-02 17:22:49
【问题描述】:

我需要提供一个 x86(-64) 反汇编程序,所以我开始阅读 objdump 的源代码。在搜索了一下之后,我在一个文件中,'ia64-asmtab.h'。里面是一个struct 'ia64_main_table':

struct ia64_main_table
{
  /* The entry in the string table that corresponds to the name of this
     opcode. */
  unsigned short name_index;

  /* The type of opcode; corresponds to the TYPE field in 
     struct ia64_opcode. */
  unsigned char opcode_type;

  /* The number of outputs for this opcode. */
  unsigned char num_outputs;

  /* The base insn value for this opcode.  It may be modified by completers. */
  ia64_insn opcode;

  /* The mask of valid bits in OPCODE. Zeros indicate operand fields. */
  ia64_insn mask;

  /* The operands of this instruction.  Corresponds to the OPERANDS field
     in struct ia64_opcode. */
  unsigned char operands[5];

  /* The flags for this instruction.  Corresponds to the FLAGS field in
     struct ia64_opcode. */
  short flags;

  /* The tree of completers for this instruction; this is an offset into
     completer_table. */
  short completers;
};

谷歌搜索了一下并没有显示任何有用的结果,我很困惑。有谁知道'insn'代表什么?我觉得它应该代表指令,但它似乎也意味着其他东西。

【问题讨论】:

  • 如果this Intel patch 是任何指示,insn 可能意味着指令。
  • 是的,它必须意味着指令。我想不出别的了。
  • 再次查看该网站后,我可能错了。我的印象是官方代码的官方英特尔变更日志。它似乎来自a linux implementation of the Intel graphics drivers,所以不一定是它。但话又说回来,变化来自一个拥有英特尔电子邮件的人。
  • 如果您尝试创建 x86-64 反汇编程序,IA-64 是错误的地方。 Itanium 是一个完全独立的体系结构,具有完全不相关的机器代码格式。固定宽度 VLIW 包的复杂性与 x86 指令不同,因此它是一个糟糕的起点。

标签: c intel instruction-set disassembly


【解决方案1】:

在这里回答我自己的问题。 insn 唯一可行的含义似乎是指令。感谢您的链接,杰夫。

【讨论】:

    【解决方案2】:

    有些insn是实际的指令;其他代表 switch 语句的调度表;其他代表要跳转到的标签或各种声明性信息。 此链接中给出了对 INSN 的更详细说明 https://gcc.gnu.org/onlinedocs/gccint/Insns.html

    【讨论】:

    • 这是 GCC RTL 使用的缩写,而不是 Binutils objdump。当然,它是同一个英文单词(“instruction”)的缩写,但实际对象不同。它只是一个独立发明的明显缩写。我自己在 SO 答案中使用过它,实际上我想知道这个问题是否与我的答案之一有关,直到我看到它的年龄。
    猜你喜欢
    • 1970-01-01
    • 2022-01-20
    • 2012-11-07
    • 2013-12-26
    • 2015-11-18
    • 2017-11-19
    • 2011-07-01
    • 2011-03-16
    • 2019-05-03
    相关资源
    最近更新 更多