SMSW,
CLTS,
INVLPG,
+ INT,
MOV_CR2,
MOV_2CR,
case XOR_MEM2_8:
case XOR_IMM2_8:
case INC_8:
+ case INT:
case DEC_8:
case NEG_8:
case NOT_8:
case MOV_MEM2:
case MOV_2MEM:
case MOV_MEM2AX:
- case MOV_AX2MEM:
- case MOV_IMM2:
+ case MOV_AX2MEM:
case MOVS:
case MOVSX:
case MOVZX:
case OR_IMM2SX_8:
case SUB_IMM2SX_8:
case XOR_IMM2SX_8:
+ case MOV_IMM2:
switch (v3_get_vm_cpu_mode(info)) {
case REAL:
return (instr->prefixes.op_size) ? 4 : 2;
if (instr->prefixes.rex_op_size) {
return 8;
} else {
- return 4;
+ return (instr->prefixes.op_size) ? 2 : 4;
}
case PROTECTED:
case PROTECTED_PAE:
PrintError("Unsupported CPU mode: %d\n", info->cpu_mode);
return -1;
}
-
case INVLPG:
switch (v3_get_vm_cpu_mode(info)) {
case REAL:
return -1;
}
+ //case INT:
case MOV_DR2:
case MOV_2DR:
case MOV_CR2:
}
- /*
- Segments should be ignored
- // get appropriate segment
- if (instr->prefixes.cs_override) {
- seg = &(core->segments.cs);
- } else if (instr->prefixes.es_override) {
- seg = &(core->segments.es);
- } else if (instr->prefixes.ss_override) {
- seg = &(core->segments.ss);
- } else if (instr->prefixes.fs_override) {
- seg = &(core->segments.fs);
- } else if (instr->prefixes.gs_override) {
- seg = &(core->segments.gs);
- } else {
- seg = &(core->segments.ds);
- }
- */
+
+ //Segments should be ignored
+ // get appropriate segment
+
+ if (instr->prefixes.cs_override) {
+ seg = &(core->segments.cs);
+ } else if (instr->prefixes.es_override) {
+ seg = &(core->segments.es);
+ } else if (instr->prefixes.ss_override) {
+ seg = &(core->segments.ss);
+ } else if (instr->prefixes.fs_override) {
+ seg = &(core->segments.fs);
+ } else if (instr->prefixes.gs_override) {
+ seg = &(core->segments.gs);
+ } else {
+ seg = &(core->segments.ds);
+ }
+
operand->operand = ADDR_MASK(get_addr_linear(core, base_addr, seg),
get_addr_width(core, instr));
case REAL:
return decode_rm_operand16(core, instr_ptr, instr, operand, reg_code);
case LONG:
- if (instr->prefixes.rex_op_size) {
+ if (instr->prefixes.rex) {
return decode_rm_operand64(core, instr_ptr, instr, operand, reg_code);
}
case PROTECTED:
case 0xf4:
return HLT;
+ case 0xcd:
+ return INT;
case 0xf6: {
struct modrm_byte * modrm = (struct modrm_byte *)&(instr[1]);
case SETO: return "SETO";
case STOS_8: return "STOS_8";
case STOS: return "STOS";
+ case INT: return "INT";
case INVALID_INSTR:
default: