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.


added initial 64 bit decoding support
[palacios-OLD.git] / palacios / src / palacios / vmm_v3dec.c
index 7dd716e..0b0d7a4 100644 (file)
@@ -78,7 +78,13 @@ int v3_decode(struct guest_info * core, addr_t instr_ptr, struct x86_instr * ins
     length = v3_get_prefixes((uint8_t *)instr_ptr, &(instr->prefixes));
 
 
-    // check for REX prefix
+       // REX prefix
+       if (v3_get_vm_cpu_mode(core) == LONG) {
+           if ((*(uint8_t *)(instr_ptr + length) & 0xf0) == 0x40) {
+                       *(uint8_t *)&(instr->prefixes.rex) = *(uint8_t *)(instr_ptr + length);
+                       length += 1;
+               }
+       }
 
 
     form = op_code_to_form((uint8_t *)(instr_ptr + length), &length);