summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-01 14:42:51 +0300
committerAvi Kivity <avi@redhat.com>2010-10-24 10:50:34 +0200
commit1e87e3efe764285133866a14ddc71cf211f022c2 (patch)
tree9e514242f2b0802863f8c77f755a90ed47960494 /arch/x86/kvm/emulate.c
parentd4709c78eeff2b272e0b9727748b72371b0e71ab (diff)
KVM: x86 emulator: simplify REX.W check
(x && (x & y)) == (x & y) Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 7d2c715f1a2a..a832019138f3 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2358,9 +2358,8 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt)
done_prefixes:
/* REX prefix. */
- if (c->rex_prefix)
- if (c->rex_prefix & 8)
- c->op_bytes = 8; /* REX.W */
+ if (c->rex_prefix & 8)
+ c->op_bytes = 8; /* REX.W */
/* Opcode byte(s). */
opcode = opcode_table[c->b];