Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=111de5d60c589bca02b49dce076ca588618e0d1c
Commit:     111de5d60c589bca02b49dce076ca588618e0d1c
Parent:     b9fa9d6bc6ac617170c4cf21ca764eb187618c0d
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 27 19:14:21 2007 +0200
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 17:53:16 2008 +0200

    KVM: x86 emulator: unify two switches
    
    The rep prefix cleanup left two switch () statements next to each other.
    Unify them.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/x86_emulate.c |   50 ++++++++++++++++++++------------------------
 1 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 53377f0..499d1ad 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1541,31 +1541,6 @@ special_insn:
        case 0x9d: /* popf */
                c->dst.ptr = (unsigned long *) &ctxt->eflags;
                goto pop_instruction;
-       case 0xc3: /* ret */
-               c->dst.ptr = &c->eip;
-               goto pop_instruction;
-       case 0xf4:              /* hlt */
-               ctxt->vcpu->halt_request = 1;
-               goto done;
-       case 0xf5:      /* cmc */
-               /* complement carry flag from eflags reg */
-               ctxt->eflags ^= EFLG_CF;
-               c->dst.type = OP_NONE;  /* Disable writeback. */
-               break;
-       case 0xf8: /* clc */
-               ctxt->eflags &= ~EFLG_CF;
-               c->dst.type = OP_NONE;  /* Disable writeback. */
-               break;
-       case 0xfa: /* cli */
-               ctxt->eflags &= ~X86_EFLAGS_IF;
-               c->dst.type = OP_NONE;  /* Disable writeback. */
-               break;
-       case 0xfb: /* sti */
-               ctxt->eflags |= X86_EFLAGS_IF;
-               c->dst.type = OP_NONE;  /* Disable writeback. */
-               break;
-       }
-       switch (c->b) {
        case 0xa4 ... 0xa5:     /* movs */
                c->dst.type = OP_MEM;
                c->dst.bytes = (c->d & ByteOp) ? 1 : c->op_bytes;
@@ -1652,6 +1627,9 @@ special_insn:
        case 0xae ... 0xaf:     /* scas */
                DPRINTF("Urk! I don't handle SCAS.\n");
                goto cannot_emulate;
+       case 0xc3: /* ret */
+               c->dst.ptr = &c->eip;
+               goto pop_instruction;
        case 0xe8: /* call (near) */ {
                long int rel;
                switch (c->op_bytes) {
@@ -1676,8 +1654,26 @@ special_insn:
                JMP_REL(c->src.val);
                c->dst.type = OP_NONE; /* Disable writeback. */
                break;
-
-
+       case 0xf4:              /* hlt */
+               ctxt->vcpu->halt_request = 1;
+               goto done;
+       case 0xf5:      /* cmc */
+               /* complement carry flag from eflags reg */
+               ctxt->eflags ^= EFLG_CF;
+               c->dst.type = OP_NONE;  /* Disable writeback. */
+               break;
+       case 0xf8: /* clc */
+               ctxt->eflags &= ~EFLG_CF;
+               c->dst.type = OP_NONE;  /* Disable writeback. */
+               break;
+       case 0xfa: /* cli */
+               ctxt->eflags &= ~X86_EFLAGS_IF;
+               c->dst.type = OP_NONE;  /* Disable writeback. */
+               break;
+       case 0xfb: /* sti */
+               ctxt->eflags |= X86_EFLAGS_IF;
+               c->dst.type = OP_NONE;  /* Disable writeback. */
+               break;
        }
        goto writeback;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to