Commit 6d4d85ec authored by Gleb Natapov's avatar Gleb Natapov

KVM: emulator: cleanup decode_register_operand() a bit

Make code shorter.
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
parent aa9ac1a6
...@@ -1045,13 +1045,9 @@ static void decode_register_operand(struct x86_emulate_ctxt *ctxt, ...@@ -1045,13 +1045,9 @@ static void decode_register_operand(struct x86_emulate_ctxt *ctxt,
} }
op->type = OP_REG; op->type = OP_REG;
if (ctxt->d & ByteOp) { op->bytes = (ctxt->d & ByteOp) ? 1 : ctxt->op_bytes;
op->addr.reg = decode_register(ctxt, reg, true); op->addr.reg = decode_register(ctxt, reg, ctxt->d & ByteOp);
op->bytes = 1;
} else {
op->addr.reg = decode_register(ctxt, reg, false);
op->bytes = ctxt->op_bytes;
}
fetch_register_operand(op); fetch_register_operand(op);
op->orig_val = op->val; op->orig_val = op->val;
} }
......
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