X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_xed.c;h=25ca0769823b02f7e969009660e9988a35e28621;hb=d3c1f093de953d47c55c11692f27aa2220c840b4;hp=7c1c13e5065ce3589b83bde1fe16bf0f028bc332;hpb=2f94a8dfea7209ee001ab014f5668c360320f14f;p=palacios.git diff --git a/palacios/src/palacios/vmm_xed.c b/palacios/src/palacios/vmm_xed.c index 7c1c13e..25ca076 100644 --- a/palacios/src/palacios/vmm_xed.c +++ b/palacios/src/palacios/vmm_xed.c @@ -147,17 +147,16 @@ static int set_decoder_mode(struct guest_info * info, xed_state_t * state) { } /* -static int is_flags_reg(xed_reg_enum_t xed_reg) { - switch (xed_reg) { - case XED_REG_FLAGS: - case XED_REG_EFLAGS: - case XED_REG_RFLAGS: - return 1; - default: - return 0; - } -} - + static int is_flags_reg(xed_reg_enum_t xed_reg) { + switch (xed_reg) { + case XED_REG_FLAGS: + case XED_REG_EFLAGS: + case XED_REG_RFLAGS: + return 1; + default: + return 0; + } + } */ int v3_init_decoder(struct guest_info * info) { @@ -433,8 +432,6 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins default: PrintError("Unhandled Operand Type\n"); return -1; - - } } } @@ -472,10 +469,7 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins } v3_op->type = REG_OPERAND; - - } else { - switch (op_enum) { case XED_OPERAND_MEM0: @@ -517,7 +511,6 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins return -1; } } - } // set third operand @@ -545,17 +538,12 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins instr->third_operand.type = REG_OPERAND; - } else { PrintError("Unhandled third operand type %s\n", xed_operand_type_enum_t2str(op_type)); - return -1; + instr->num_operands = 2; } - - } - - return 0; } @@ -580,7 +568,7 @@ static int get_memory_operand(struct guest_info * info, xed_decoded_inst_t * xe int addr_width = v3_get_addr_width(info);; // struct v3_segment * seg_reg; - PrintDebug("Xen mode = %s\n", xed_machine_mode_enum_t2str(xed_state_get_machine_mode(info->decoder_state))); + PrintDebug("Xed mode = %s\n", xed_machine_mode_enum_t2str(xed_state_get_machine_mode(info->decoder_state))); PrintDebug("Address width: %s\n", xed_address_width_enum_t2str(xed_state_get_address_width(info->decoder_state))); PrintDebug("Stack Address width: %s\n",