]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Simplify decode_register_operand() calling convention
authorAvi Kivity <avi@qumranet.com>
Wed, 31 Oct 2007 09:21:06 +0000 (11:21 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:59 +0000 (17:52 +0200)
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>
drivers/kvm/x86_emulate.c

index 884e4a2e47e66dbba5db8e11b4bd2877d6095fd4..b352a6c4d4a2a20f56aaaae2e24760423c8cd33f 100644 (file)
@@ -518,10 +518,10 @@ static int test_cc(unsigned int condition, unsigned int flags)
 
 static void decode_register_operand(struct operand *op,
                                    struct decode_cache *c,
-                                   int highbyte_regs,
                                    int inhibit_bytereg)
 {
        unsigned reg = c->modrm_reg;
+       int highbyte_regs = c->rex_prefix == 0;
 
        if (!(c->d & ModRM))
                reg = (c->b & 7) | ((c->rex_prefix & 1) << 3);
@@ -837,7 +837,7 @@ modrm_done:
        case SrcNone:
                break;
        case SrcReg:
-               decode_register_operand(&c->src, c, c->rex_prefix == 0, 0);
+               decode_register_operand(&c->src, c, 0);
                break;
        case SrcMem16:
                c->src.bytes = 2;
@@ -895,7 +895,7 @@ modrm_done:
                /* Special instructions do their own operand decoding. */
                return 0;
        case DstReg:
-               decode_register_operand(&c->dst, c, c->rex_prefix == 0,
+               decode_register_operand(&c->dst, c,
                         c->twobyte && (c->b == 0xb6 || c->b == 0xb7));
                break;
        case DstMem: