struct cr0_32 * dst_reg = (struct cr0_32 *)(dec_instr.dst_operand.operand);
struct cr0_32 * shadow_cr0 = (struct cr0_32 *)&(info->ctrl_regs.cr0);
- PrintDebug("MOVCR2 (mode=%s)\n", info->cpu_mode);
+ PrintDebug("MOVCR2 (mode=%s)\n", v3_cpu_mode_to_str(info->cpu_mode));
if (info->shdw_pg_mode == SHADOW_PAGING) {
struct cr0_32 * guest_cr0 = (struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
if ((!xed_operand_is_register(op_enum)) ||
(!is_flags_reg(xed_decoded_inst_get_reg(&xed_instr, op_enum)))) {
// special case
- PrintDebug("Special Case not handled\n");
+ PrintError("Special Case not handled\n");
return -1;
}
}
if (get_opcode(iform, &(instr->opcode)) == -1) {
- PrintDebug("Could not get opcode. (iform=%s)\n", xed_iform_enum_t2str(iform));
+ PrintError("Could not get opcode. (iform=%s)\n", xed_iform_enum_t2str(iform));
return -1;
}
// set third operand
if (instr->num_operands >= 3) {
const xed_operand_t * op = xed_inst_operand(xi, 2);
- // xed_operand_type_enum_t op_type = xed_operand_type(op);
+ xed_operand_type_enum_t op_type = xed_operand_type(op);
xed_operand_enum_t op_enum = xed_operand_name(op);
if (xed_operand_is_register(op_enum)) {
} else {
- // PrintError("Unhandled third operand type %s\n", xed_operand_type_enum_t2str(op_type));
+ PrintError("Unhandled third operand type %s\n", xed_operand_type_enum_t2str(op_type));
return -1;
}
*opcode = (addr_t)&V3_OPCODE_MOV2CR;
break;
+ case XED_IFORM_SMSW_GPRv:
+ *opcode = (addr_t)&V3_OPCODE_SMSW;
+ break;
case XED_IFORM_LMSW_GPR16:
*opcode = (addr_t)&V3_OPCODE_LMSW;
*opcode = (addr_t)&V3_OPCODE_CLTS;
break;
+
+
default:
*opcode = 0;
return -1;