summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-01 11:42:51 (GMT)
committerAvi Kivity <avi@redhat.com>2010-10-24 08:50:34 (GMT)
commit1e87e3efe764285133866a14ddc71cf211f022c2 (patch)
tree9e514242f2b0802863f8c77f755a90ed47960494
parentd4709c78eeff2b272e0b9727748b72371b0e71ab (diff)
downloadlinux-fsl-qoriq-1e87e3efe764285133866a14ddc71cf211f022c2.tar.xz
KVM: x86 emulator: simplify REX.W check
(x && (x & y)) == (x & y) Signed-off-by: Avi Kivity <avi@redhat.com>
-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 7d2c715..a832019 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];