【发布时间】: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