From: Avi Kivity Date: Sun, 1 Aug 2010 11:42:51 +0000 (+0300) Subject: KVM: x86 emulator: simplify REX.W check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1e87e3efe764285133866a14ddc71cf211f022c2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 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];