diff options
author | Avi Kivity <avi@qumranet.com> | 2007-10-31 05:21:06 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:59 -0500 |
commit | 9f1ef3f8f5f8ade2561d969181b152c225b82a3e (patch) | |
tree | 1070f885c4412ed9594809f55515f2d1b719dee4 /drivers/kvm/x86_emulate.c | |
parent | 33615aa956521923eab0552994b5961cd3034042 (diff) |
KVM: Simplify decode_register_operand() calling convention
Now that rex_prefix is part of the decode cache, there is no need to pass
it along.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86_emulate.c')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 884e4a2e47e6..b352a6c4d4a2 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -518,10 +518,10 @@ static int test_cc(unsigned int condition, unsigned int flags) | |||
518 | 518 | ||
519 | static void decode_register_operand(struct operand *op, | 519 | static void decode_register_operand(struct operand *op, |
520 | struct decode_cache *c, | 520 | struct decode_cache *c, |
521 | int highbyte_regs, | ||
522 | int inhibit_bytereg) | 521 | int inhibit_bytereg) |
523 | { | 522 | { |
524 | unsigned reg = c->modrm_reg; | 523 | unsigned reg = c->modrm_reg; |
524 | int highbyte_regs = c->rex_prefix == 0; | ||
525 | 525 | ||
526 | if (!(c->d & ModRM)) | 526 | if (!(c->d & ModRM)) |
527 | reg = (c->b & 7) | ((c->rex_prefix & 1) << 3); | 527 | reg = (c->b & 7) | ((c->rex_prefix & 1) << 3); |
@@ -837,7 +837,7 @@ modrm_done: | |||
837 | case SrcNone: | 837 | case SrcNone: |
838 | break; | 838 | break; |
839 | case SrcReg: | 839 | case SrcReg: |
840 | decode_register_operand(&c->src, c, c->rex_prefix == 0, 0); | 840 | decode_register_operand(&c->src, c, 0); |
841 | break; | 841 | break; |
842 | case SrcMem16: | 842 | case SrcMem16: |
843 | c->src.bytes = 2; | 843 | c->src.bytes = 2; |
@@ -895,7 +895,7 @@ modrm_done: | |||
895 | /* Special instructions do their own operand decoding. */ | 895 | /* Special instructions do their own operand decoding. */ |
896 | return 0; | 896 | return 0; |
897 | case DstReg: | 897 | case DstReg: |
898 | decode_register_operand(&c->dst, c, c->rex_prefix == 0, | 898 | decode_register_operand(&c->dst, c, |
899 | c->twobyte && (c->b == 0xb6 || c->b == 0xb7)); | 899 | c->twobyte && (c->b == 0xb6 || c->b == 0xb7)); |
900 | break; | 900 | break; |
901 | case DstMem: | 901 | case DstMem: |