uint_t br_taken : 1; // 0x3E
uint_t op_size : 1; // 0x66
uint_t addr_size : 1; // 0x67
+ struct {
+ uint_t rm : 1; // REX.B
+ uint_t sib_idx : 1; // REX.X
+ uint_t reg : 1; // REX.R
+ uint_t op_size : 1; // REX.W
+ uint8_t rsvd : 4;
+ } __attribute__((packed)) rex;
} __attribute__((packed));
struct x86_instr {
struct x86_prefixes prefixes;
- uint_t instr_length;
+ uint8_t instr_length;
v3_op_type_t op_type;
uint_t num_operands;
struct x86_operand dst_operand;
struct x86_operand third_operand;
addr_t str_op_length;
addr_t is_str_op;
- void * decoder_data;
+ // void * decoder_data;
};
uint8_t v3_get_prefixes(uint8_t * instr, struct x86_prefixes * prefixes);
+void v3_print_instr(struct x86_instr * instr);
#define PREFIX_LOCK 0xF0