X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_decoder.c;h=6d1299a4b67c4b9e06fc0b116bb37f9d6d783925;hb=aad69eda8e2354cf146054e57ad25fe201a1cb52;hp=77ece9b1a93d001e676d5e3ead50937d5ff12379;hpb=98b605668d81bfe0965d482d9d0da647f5cca267;p=palacios.git diff --git a/palacios/src/palacios/vmm_decoder.c b/palacios/src/palacios/vmm_decoder.c index 77ece9b..6d1299a 100644 --- a/palacios/src/palacios/vmm_decoder.c +++ b/palacios/src/palacios/vmm_decoder.c @@ -1,37 +1,10 @@ #include - -/* The full blown instruction parser... */ -int v3_parse_instr(struct guest_info * info, - char * instr_ptr, - uint_t * instr_length, - addr_t * opcode, - uint_t * opcode_length, - struct x86_prefix_list * prefixes, - struct x86_operand * src_operand, - struct x86_operand * dst_operand, - struct x86_operand * extra_operand) { - - V3_ASSERT(src_operand != NULL); - V3_ASSERT(dst_operand != NULL); - V3_ASSERT(extra_operand != NULL); - V3_ASSERT(instr_length != NULL); - V3_ASSERT(info != NULL); - - - // Ignore prefixes for now - while (is_prefix_byte(*instr_ptr)) { - instr_ptr++; - *instr_length++; +int opcode_cmp(const uchar_t * op1, const uchar_t * op2) { + if (op1[0] != op2[0]) { + return op1[0] - op2[0];; + } else { + return memcmp(op1 + 1, op2 + 1, op1[0]); } - - - // Opcode table lookup, see xen/kvm - - - - - - return 0; }