Commit 1e87e3ef authored by Avi Kivity's avatar Avi Kivity

KVM: x86 emulator: simplify REX.W check

(x && (x & y)) == (x & y)
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent d4709c78
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment