diff options
author | Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net> | 2008-12-04 14:27:38 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 16:55:42 +0200 |
commit | bfcadf83ec5aafe600e73dd427d997db7bcc1d12 (patch) | |
tree | 955241dfdd3cc4c9cee5c67a04aa0a75f2a91bb8 /arch | |
parent | 0dc8d10f7d848b63c8d32cf6fd31ba7def792ac9 (diff) | |
download | linux-bfcadf83ec5aafe600e73dd427d997db7bcc1d12.tar.gz linux-bfcadf83ec5aafe600e73dd427d997db7bcc1d12.tar.bz2 linux-bfcadf83ec5aafe600e73dd427d997db7bcc1d12.zip |
KVM: x86 emulator: add a new "implied 1" Src decode type
Add SrcOne operand type when we need to decode an implied '1' like with
regular shift instruction
Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/x86_emulate.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 7f5cd62362c5..0c75306e7a07 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -58,6 +58,7 @@ #define SrcMem32 (4<<4) /* Memory operand (32-bit). */ #define SrcImm (5<<4) /* Immediate operand. */ #define SrcImmByte (6<<4) /* 8-bit sign-extended immediate operand. */ +#define SrcOne (7<<4) /* Implied '1' */ #define SrcMask (7<<4) /* Generic ModRM decode. */ #define ModRM (1<<7) @@ -1004,6 +1005,10 @@ done_prefixes: c->src.bytes = 1; c->src.val = insn_fetch(s8, 1, c->eip); break; + case SrcOne: + c->src.bytes = 1; + c->src.val = 1; + break; } /* |