diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-08-05 23:36:51 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:51:09 -0400 |
commit | 943858e27544cd10e6095093a40be911a31892b1 (patch) | |
tree | 4eb78bbe7d191d7149b56eee6bccc931d7d3f19f | |
parent | c483c02ad35256206d6c45d7170fef1e33a43e9c (diff) |
KVM: x86 emulator: introduce DstImmUByte for dst operand decode
Introduce DstImmUByte for dst operand decode, which
will be used for out instruction.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | 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 78541e8fd149..dc074a0c60ca 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #define DstAcc (4<<1) /* Destination Accumulator */ | 54 | #define DstAcc (4<<1) /* Destination Accumulator */ |
55 | #define DstDI (5<<1) /* Destination is in ES:(E)DI */ | 55 | #define DstDI (5<<1) /* Destination is in ES:(E)DI */ |
56 | #define DstMem64 (6<<1) /* 64bit memory operand */ | 56 | #define DstMem64 (6<<1) /* 64bit memory operand */ |
57 | #define DstImmUByte (7<<1) /* 8-bit unsigned immediate operand */ | ||
57 | #define DstMask (7<<1) | 58 | #define DstMask (7<<1) |
58 | /* Source operand type. */ | 59 | /* Source operand type. */ |
59 | #define SrcNone (0<<4) /* No source operand. */ | 60 | #define SrcNone (0<<4) /* No source operand. */ |
@@ -2693,6 +2694,12 @@ done_prefixes: | |||
2693 | decode_register_operand(&c->dst, c, | 2694 | decode_register_operand(&c->dst, c, |
2694 | c->twobyte && (c->b == 0xb6 || c->b == 0xb7)); | 2695 | c->twobyte && (c->b == 0xb6 || c->b == 0xb7)); |
2695 | break; | 2696 | break; |
2697 | case DstImmUByte: | ||
2698 | c->dst.type = OP_IMM; | ||
2699 | c->dst.addr.mem = c->eip; | ||
2700 | c->dst.bytes = 1; | ||
2701 | c->dst.val = insn_fetch(u8, 1, c->eip); | ||
2702 | break; | ||
2696 | case DstMem: | 2703 | case DstMem: |
2697 | case DstMem64: | 2704 | case DstMem64: |
2698 | c->dst = memop; | 2705 | c->dst = memop; |