2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
21 #include <palacios/vmm_decoder.h>
24 int v3_opcode_cmp(const uchar_t * op1, const uchar_t * op2) {
25 if (op1[0] != op2[0]) {
26 return op1[0] - op2[0];;
28 return memcmp(op1 + 1, op2 + 1, op1[0]);
33 void v3_strip_rep_prefix(uchar_t * instr, int length) {
38 while (read_ctr < length) {
40 ( (instr[read_ctr] == 0xF2) ||
41 (instr[read_ctr] == 0xF3))) {
45 instr[write_ctr] = instr[read_ctr];