diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-08-05 16:34:39 +0800 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 10:50:59 +0200 |
commit | d3ad6243293d92c82530a50c77d71bb0a0a42fdc (patch) | |
tree | 203846ec7528cef3086a417a84ea646344db0b86 /arch/x86/kvm/emulate.c | |
parent | a58ddea556f8877ccf7caa046b6d6b32982f5b1d (diff) |
KVM: x86 emulator: simplify two-byte opcode check
Two-byte opcode always start with 0x0F and the decode flags
of opcode 0xF0 is always 0, so remove dup check.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ddbad15c9486..a9a4a0b78a7d 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2375,13 +2375,11 @@ done_prefixes: /* Opcode byte(s). */ opcode = opcode_table[c->b]; - if (opcode.flags == 0) { - /* Two-byte opcode? */ - if (c->b == 0x0f) { - c->twobyte = 1; - c->b = insn_fetch(u8, 1, c->eip); - opcode = twobyte_table[c->b]; - } + /* Two-byte opcode? */ + if (c->b == 0x0f) { + c->twobyte = 1; + c->b = insn_fetch(u8, 1, c->eip); + opcode = twobyte_table[c->b]; } c->d = opcode.flags; |