BLU*_*LUC 3 c intel instruction-set 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;
};
Run Code Online (Sandbox Code Playgroud)
一些谷歌搜索没有显示任何有用的结果,我很难过。有谁知道'insn'代表什么?我觉得它应该代表指令,但它似乎也意味着别的东西。