简体   繁体   English

insn代表什么?

[英]What does insn stand for?

I need to come up with an x86(-64) disassembler so I started reading the source code for objdump. 我需要拿出一个x86(-64)反汇编程序,因此我开始阅读objdump的源代码。 After searching around a bit I'm in a file, 'ia64-asmtab.h'. 经过一番搜索后,我进入了文件“ ia64-asmtab.h”。 Inside is a struct 'ia64_main_table': 里面是一个结构'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;
};

A bit of Googling around hasn't shown any useful results and I'm stumped. 有点谷歌搜索没有显示任何有用的结果,我很沮丧。 Does anyone know what 'insn' stands for? 有人知道“ insn”代表什么吗? I feel like it should stand for instruction, but it also seems to mean something else. 我觉得它应该代表教学,但这似乎还意味着其他。

Answering my own question here. 在这里回答我自己的问题。 The only feasible meaning of insn seems to be instruction. insn唯一可行的含义似乎是指令。 Thanks for the link, Jeff. 感谢您的链接,杰夫。

Some insns are actual instructions; 一些实例是实际的说明; others represent dispatch tables for switch statements; 其他代表switch语句的调度表; others represent labels to jump to or various sorts of declarative information. 其他代表跳转到的标签或各种声明性信息。 A more detailed description of INSN is given in this link https://gcc.gnu.org/onlinedocs/gccint/Insns.html 在此链接https://gcc.gnu.org/onlinedocs/gccint/Insns.html中提供了对INSN的更详细描述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM