Guillaume Thouvenin wrote:
-       case 0x38 ... 0x3d:
+       case 0x38 ... 0x3b:
              cmp:              /* cmp */
                emulate_2op_SrcV("cmp", c->src, c->dst, ctxt->eflags);
                break;
+       case 0x3c ... 0x3d:     /* cmp al imm8 or ax imm16 or eax imm32 */
+               c->dst.type = OP_REG;
+               c->dst.bytes = c->op_bytes;
+               c->dst.ptr = &c->regs[VCPU_REGS_RAX];
+               if (c->op_bytes == 1)
+                       c->dst.val = *(u8 *)c->dst.ptr;
+               else if (c->op_bytes == 2)
+                       c->dst.val = *(u16 *)c->dst.ptr;
+               else
+                       c->dst.val = *(u32 *)c->dst.ptr;
+               c->dst.orig_val = c->dst.val;
+               goto cmp;

SrcAcc would remove the need for this change.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to