All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] KVM: x86 emulator: introduce DstImmUByte for dst operand decode
@ 2010-08-06  3:36 Wei Yongjun
  2010-08-06  3:45 ` [PATCH 2/3] KVM: x86 emulator: change OUT instruction to use dst instead of src Wei Yongjun
  2010-08-17  9:44 ` [PATCH 1/3] KVM: x86 emulator: introduce DstImmUByte for dst operand decode Avi Kivity
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2010-08-06  3:36 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

Introduce DstImmUByte for dst operand decode, which
will be used for out instruction.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 arch/x86/kvm/emulate.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index a2a079f..f952fd0 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -54,6 +54,7 @@
 #define DstAcc      (4<<1)	/* Destination Accumulator */
 #define DstDI       (5<<1)	/* Destination is in ES:(E)DI */
 #define DstMem64    (6<<1)	/* 64bit memory operand */
+#define DstImmUByte (7<<1)	/* 8-bit unsigned immediate operand */
 #define DstMask     (7<<1)
 /* Source operand type. */
 #define SrcNone     (0<<4)	/* No source operand. */
@@ -2632,6 +2633,12 @@ done_prefixes:
 		decode_register_operand(&c->dst, c,
 			 c->twobyte && (c->b == 0xb6 || c->b == 0xb7));
 		break;
+	case DstImmUByte:
+		c->dst.type = OP_IMM;
+		c->dst.addr.mem = c->eip;
+		c->dst.bytes = 1;
+		c->dst.val = insn_fetch(u8, 1, c->eip);
+		break;
 	case DstMem:
 	case DstMem64:
 		c->dst = memop;
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-17  9:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06  3:36 [PATCH 1/3] KVM: x86 emulator: introduce DstImmUByte for dst operand decode Wei Yongjun
2010-08-06  3:45 ` [PATCH 2/3] KVM: x86 emulator: change OUT instruction to use dst instead of src Wei Yongjun
2010-08-06  3:46   ` [PATCH 3/3] KVM: x86 emulator: remove dup code of in/out instruction Wei Yongjun
2010-08-17  9:44 ` [PATCH 1/3] KVM: x86 emulator: introduce DstImmUByte for dst operand decode Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.