Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


changes
[palacios.git] / misc / decoder_test / test.c
index 00b219f..f92238a 100644 (file)
@@ -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;
   }