X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=misc%2Fdecoder_test%2Ftest.c;h=f92238adbb49307ddc1a5d2e0940bb81b19caff8;hp=00b219f7c39e54d5216de5e180c1bffd461e290c;hb=9e5b4c4140241b45094c87ac15f75fead726981f;hpb=a91de70b95f386ce0cb8226cb12966a79adb6c42 diff --git a/misc/decoder_test/test.c b/misc/decoder_test/test.c index 00b219f..f92238a 100644 --- a/misc/decoder_test/test.c +++ b/misc/decoder_test/test.c @@ -63,6 +63,7 @@ static void init_guest_info(struct guest_info * info) { } static const char * mem = "MEMORY"; static const char * reg = "REGISTER"; +static const char * imm = "IMMEDIATE"; static const char * invalid = "INVALID"; static const char * get_op_type_str(operand_type_t type) { @@ -70,6 +71,8 @@ static const char * get_op_type_str(operand_type_t type) { return mem; } else if (type == REG_OPERAND) { return reg; + } else if (type == IMM_OPERAND) { + return imm; } else { return invalid; } @@ -88,6 +91,11 @@ static int print_op(struct x86_operand *op) { printf("\taddr=0x%x\n", op->operand); return 0; + case IMM_OPERAND: + printf("\tsize=%d\n", op->size); + printf("\tval=0x%x\n", op->operand); + return 0; + default: return -1; }