X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_instr_decoder.h;h=ce494e748f9157dbec4bb553a452d8f282deec3a;hp=53831c45f0670e15289940bac85346c86936a4d9;hb=ce3ab888e2ca5f14a89da45b4dc64122ff1e1050;hpb=9a32111c4074aafd55cd9590a24bd5c751a6fe61 diff --git a/palacios/include/palacios/vmm_instr_decoder.h b/palacios/include/palacios/vmm_instr_decoder.h index 53831c4..ce494e7 100644 --- a/palacios/include/palacios/vmm_instr_decoder.h +++ b/palacios/include/palacios/vmm_instr_decoder.h @@ -681,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; @@ -736,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: @@ -888,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; @@ -972,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: