From: Avi Kivity Date: Sun, 1 Aug 2010 11:42:51 +0000 (+0300) Subject: KVM: x86 emulator: simplify REX.W check X-Git-Tag: v2.6.37-rc1~142^2~265 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=1e87e3efe764285133866a14ddc71cf211f022c2;p=~andy%2Flinux KVM: x86 emulator: simplify REX.W check (x && (x & y)) == (x & y) Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 7d2c715f1a2..a832019138f 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];