X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_instr_decoder.h;h=ce494e748f9157dbec4bb553a452d8f282deec3a;hb=c3498e95bc8a73f4888d42166561f377af20ee5b;hp=6e33c462081d733ad2e327e299335d814124865a;hpb=284cd2cc7083fbb37293bf5e2638aeadd366807f;p=palacios.git diff --git a/palacios/include/palacios/vmm_instr_decoder.h b/palacios/include/palacios/vmm_instr_decoder.h index 6e33c46..ce494e7 100644 --- a/palacios/include/palacios/vmm_instr_decoder.h +++ b/palacios/include/palacios/vmm_instr_decoder.h @@ -191,6 +191,7 @@ static int get_operand_width(struct guest_info * info, struct x86_instr * instr, case XOR_MEM2_8: case XOR_IMM2_8: case INC_8: + case INT: case DEC_8: case NEG_8: case NOT_8: @@ -310,7 +311,7 @@ static int get_operand_width(struct guest_info * info, struct x86_instr * instr, return -1; } - case INT: + //case INT: case MOV_DR2: case MOV_2DR: case MOV_CR2: @@ -680,7 +681,6 @@ static int decode_rm_operand32(struct guest_info * core, } if (has_sib_byte) { - instr_cursor += 1; struct sib_byte * sib = (struct sib_byte *)(instr_cursor); int scale = 0x1 << sib->scale; @@ -735,6 +735,9 @@ static int decode_rm_operand32(struct guest_info * core, case 5: if (modrm->mod != 0) { base_addr += ADDR_MASK(gprs->rbp, 4); + } else { + mod_mode = DISP32; + base_addr = 0; } break; case 6: @@ -887,7 +890,6 @@ int decode_rm_operand64(struct guest_info * core, uint8_t * modrm_instr, } if (has_sib_byte) { - instr_cursor += 1; struct sib_byte * sib = (struct sib_byte *)(instr_cursor); int scale = 0x1 << sib->scale; uint8_t index_val = sib->index; @@ -971,6 +973,9 @@ int decode_rm_operand64(struct guest_info * core, uint8_t * modrm_instr, case 5: if (modrm->mod != 0) { base_addr += gprs->rbp; + } else { + mod_mode = DISP32; + base_addr = 0; } break; case 6: