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.


Initial version of the Realtek 8139 network card driver. Includes initialization...
[palacios.releases.git] / palacios / src / palacios / vmm_decoder.c
index 6d1299a..10fb2dc 100644 (file)
@@ -8,3 +8,23 @@ int opcode_cmp(const uchar_t * op1, const uchar_t * op2) {
     return memcmp(op1 + 1, op2 + 1, op1[0]);
   }
 }
+
+
+void strip_rep_prefix(uchar_t * instr, int length) {
+  int read_ctr = 0;
+  int write_ctr = 0;
+  int found = 0;
+
+  while (read_ctr < length) {
+    if ((!found) && 
+       ( (instr[read_ctr] == 0xF2) ||
+         (instr[read_ctr] == 0xF3))) {
+      read_ctr++;
+      found = 1;
+    } else {
+      instr[write_ctr] = instr[read_ctr];
+      write_ctr++;
+      read_ctr++;
+    }
+  }
+}