#define Src2ImmByte (2<<29)
#define Src2One (3<<29)
#define Src2Imm16 (4<<29)
+#define Src2Mem16 (5<<29) /* Used for Ep encoding. First argument has to be
+ in memory and second argument is located
+ immediately after the first one in memory. */
#define Src2Mask (7<<29)
enum {
c->src2.bytes = 1;
c->src2.val = 1;
break;
+ case Src2Mem16:
+ c->src2.bytes = 2;
+ c->src2.type = OP_MEM;
+ break;
}
/* Decode and fetch the destination operand: register or memory. */
c->src.orig_val = c->src.val;
}
+ if (c->src2.type == OP_MEM) {
+ c->src2.ptr = (unsigned long *)(memop + c->src.bytes);
+ c->src2.val = 0;
+ rc = ops->read_emulated((unsigned long)c->src2.ptr,
+ &c->src2.val,
+ c->src2.bytes,
+ ctxt->vcpu);
+ if (rc != X86EMUL_CONTINUE)
+ goto done;
+ }
+
if ((c->d & DstMask) == ImplicitOps)
goto special_insn;