public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: mtosatti@redhat.com, gleb@redhat.com, takuya.yoshikawa@gmail.com,
	kvm@vger.kernel.org
Subject: Re: [PATCH 1/3] KVM: x86 emulator: Make one byte instruction emulation separate
Date: Thu, 10 Mar 2011 11:05:38 +0200	[thread overview]
Message-ID: <4D789462.3020207@redhat.com> (raw)
In-Reply-To: <20110310163519.9f4c9d69.yoshikawa.takuya@oss.ntt.co.jp>

On 03/10/2011 09:35 AM, Takuya Yoshikawa wrote:
> x86_emulate_insn() is too long and has many confusing goto statements.
>
> This patch is the first part of a work which tries to split it into
> a few meaningful functions: just encapsulates the switch statement for
> the one byte instruction emulation as emulate_onebyte_insn().

I, too, dislike the switch statements.  So I started on a path to 
eliminate it completely - take a look at struct opcode::execute.  If 
present, it is executed instead of the code in the switch statements.

The plan is to migrate all of the contents of the switch statements into 
->execute() callbacks.  This way, all of the information about an 
instruction is present in the decode tables.

-- 
error compiling committee.c: too many arguments to function


  parent reply	other threads:[~2011-03-10  9:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10  7:35 [PATCH 1/3] KVM: x86 emulator: Make one byte instruction emulation separate Takuya Yoshikawa
2011-03-10  7:37 ` [PATCH 2/3] KVM: x86 emulator: Make two " Takuya Yoshikawa
2011-03-10  7:39 ` [PATCH 3/3] KVM: x86 emulator: Remove unnecessary goto statements from x86_emulate_insn() Takuya Yoshikawa
2011-03-10  9:05 ` Avi Kivity [this message]
2011-03-10  9:26   ` [PATCH 1/3] KVM: x86 emulator: Make one byte instruction emulation separate Takuya Yoshikawa
2011-03-10  9:27     ` Avi Kivity
2011-03-10  9:50       ` Takuya Yoshikawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D789462.3020207@redhat.com \
    --to=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=takuya.yoshikawa@gmail.com \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox