insn代表什么?

时间:2014-07-12 01:13:35

标签: c intel isa disassembly

我需要提出一个x86(-64)反汇编程序,所以我开始阅读objdump的源代码。在搜索了一下后,我在一个文件中,'ia64-asmtab.h'。里面是结构'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'代表什么?我觉得它应该代表教学,但它似乎也意味着别的东西。

2 个答案:

答案 0 :(得分:3)

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

答案 1 :(得分:2)

有些内容是实际的指示;其他代表switch语句的调度表;其他人代表跳转到的标签或各种声明性信息。 有关INSN的更详细说明,请参见此链接 https://gcc.gnu.org/onlinedocs/gccint/Insns.html