I need to come up with an x86(-64) disassembler so I started reading the source code for objdump. After searching around a bit I'm in a file, 'ia64-asmtab.h'. Inside is a 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;
};
A bit of Googling around hasn't shown any useful results and I'm stumped. Does anyone know what 'insn' stands for? I feel like it should stand for instruction, but it also seems to mean something else.