public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: [PATCH 04/22] KVM: x86 emulator: move group tables to top
Date: Thu, 29 Jul 2010 15:11:37 +0300	[thread overview]
Message-ID: <1280405515-22459-5-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1280405515-22459-1-git-send-email-avi@redhat.com>

No code changes.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 arch/x86/kvm/emulate.c |   76 ++++++++++++++++++++++++------------------------
 1 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index cd8a219..91359b5 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -115,6 +115,44 @@ struct opcode {
 #define D(_y) { .flags = (_y) }
 #define N    D(0)
 
+static struct opcode group_table[] = {
+	[Group1*8] =
+	X7(D(Lock)), N,
+	[Group1A*8] =
+	D(DstMem | SrcNone | ModRM | Mov | Stack), N, N, N, N, N, N, N,
+	[Group3*8] =
+	D(DstMem | SrcImm | ModRM), D(DstMem | SrcImm | ModRM),
+	D(DstMem | SrcNone | ModRM | Lock), D(DstMem | SrcNone | ModRM | Lock),
+	X4(D(Undefined)),
+	[Group4*8] =
+	D(ByteOp | DstMem | SrcNone | ModRM | Lock), D(ByteOp | DstMem | SrcNone | ModRM | Lock),
+	N, N, N, N, N, N,
+	[Group5*8] =
+	D(DstMem | SrcNone | ModRM | Lock), D(DstMem | SrcNone | ModRM | Lock),
+	D(SrcMem | ModRM | Stack), N,
+	D(SrcMem | ModRM | Stack), D(SrcMemFAddr | ModRM | ImplicitOps),
+	D(SrcMem | ModRM | Stack), N,
+	[Group7*8] =
+	N, N, D(ModRM | SrcMem | Priv), D(ModRM | SrcMem | Priv),
+	D(SrcNone | ModRM | DstMem | Mov), N,
+	D(SrcMem16 | ModRM | Mov | Priv), D(SrcMem | ModRM | ByteOp | Priv),
+	[Group8*8] =
+	N, N, N, N,
+	D(DstMem | SrcImmByte | ModRM), D(DstMem | SrcImmByte | ModRM | Lock),
+	D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM | Lock),
+	[Group9*8] =
+	N, D(DstMem64 | ModRM | Lock), N, N, N, N, N, N,
+};
+
+static struct opcode group2_table[] = {
+	[Group7*8] =
+	D(SrcNone | ModRM | Priv), N, N, D(SrcNone | ModRM | Priv),
+	D(SrcNone | ModRM | DstMem | Mov), N,
+	D(SrcMem16 | ModRM | Mov | Priv), N,
+	[Group9*8] =
+	N, N, N, N, N, N, N, N,
+};
+
 static struct opcode opcode_table[256] = {
 	/* 0x00 - 0x07 */
 	D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock),
@@ -291,44 +329,6 @@ static struct opcode twobyte_table[256] = {
 	N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N
 };
 
-static struct opcode group_table[] = {
-	[Group1*8] =
-	X7(D(Lock)), N,
-	[Group1A*8] =
-	D(DstMem | SrcNone | ModRM | Mov | Stack), N, N, N, N, N, N, N,
-	[Group3*8] =
-	D(DstMem | SrcImm | ModRM), D(DstMem | SrcImm | ModRM),
-	D(DstMem | SrcNone | ModRM | Lock), D(DstMem | SrcNone | ModRM | Lock),
-	X4(D(Undefined)),
-	[Group4*8] =
-	D(ByteOp | DstMem | SrcNone | ModRM | Lock), D(ByteOp | DstMem | SrcNone | ModRM | Lock),
-	N, N, N, N, N, N,
-	[Group5*8] =
-	D(DstMem | SrcNone | ModRM | Lock), D(DstMem | SrcNone | ModRM | Lock),
-	D(SrcMem | ModRM | Stack), N,
-	D(SrcMem | ModRM | Stack), D(SrcMemFAddr | ModRM | ImplicitOps),
-	D(SrcMem | ModRM | Stack), N,
-	[Group7*8] =
-	N, N, D(ModRM | SrcMem | Priv), D(ModRM | SrcMem | Priv),
-	D(SrcNone | ModRM | DstMem | Mov), N,
-	D(SrcMem16 | ModRM | Mov | Priv), D(SrcMem | ModRM | ByteOp | Priv),
-	[Group8*8] =
-	N, N, N, N,
-	D(DstMem | SrcImmByte | ModRM), D(DstMem | SrcImmByte | ModRM | Lock),
-	D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM | Lock),
-	[Group9*8] =
-	N, D(DstMem64 | ModRM | Lock), N, N, N, N, N, N,
-};
-
-static struct opcode group2_table[] = {
-	[Group7*8] =
-	D(SrcNone | ModRM | Priv), N, N, D(SrcNone | ModRM | Priv),
-	D(SrcNone | ModRM | DstMem | Mov), N,
-	D(SrcMem16 | ModRM | Mov | Priv), N,
-	[Group9*8] =
-	N, N, N, N, N, N, N, N,
-};
-
 #undef D
 #undef N
 
-- 
1.7.1


  parent reply	other threads:[~2010-07-29 12:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 12:11 [PATCH 00/22] Direct decode in emulator Avi Kivity
2010-07-29 12:11 ` [PATCH 01/22] KVM: x86 emulator: drop parentheses in repreat macros Avi Kivity
2010-07-29 12:11 ` [PATCH 02/22] KVM: x86 emulator: introduce 'struct opcode' Avi Kivity
2010-07-29 12:11 ` [PATCH 03/22] KVM: x86 emulator: Add wrappers for easily defining opcodes Avi Kivity
2010-07-29 12:11 ` Avi Kivity [this message]
2010-07-29 12:11 ` [PATCH 05/22] KVM: x86 emulator: reserve group code 0 Avi Kivity
2010-07-29 12:11 ` [PATCH 06/22] KVM: x86 emulator: allow specifying group directly in opcode Avi Kivity
2010-07-29 12:11 ` [PATCH 07/22] KVM: x86 emulator: convert group 1 to new style Avi Kivity
2010-07-29 12:11 ` [PATCH 08/22] KVM: x86 emulator: convert group 1A " Avi Kivity
2010-07-29 12:11 ` [PATCH 09/22] KVM: x86 emulator: convert group 3 " Avi Kivity
2010-07-29 12:11 ` [PATCH 10/22] KVM: x86 emulator: convert group 4 " Avi Kivity
2010-07-29 12:11 ` [PATCH 11/22] KVM: x86 emulator: convert group 5 " Avi Kivity
2010-07-29 12:11 ` [PATCH 12/22] KVM: x86 emulator: convert group 7 " Avi Kivity
2010-07-29 12:11 ` [PATCH 13/22] KVM: x86 emulator: convert group 8 " Avi Kivity
2010-07-29 12:11 ` [PATCH 14/22] KVM: x86 emulator: convert group 9 " Avi Kivity
2010-07-29 12:11 ` [PATCH 15/22] KVM: x86 emulator: drop support for old-style groups Avi Kivity
2010-07-29 12:11 ` [PATCH 16/22] KVM: x86 emulator: move ByteOp and Dst back to bits 0:3 Avi Kivity
2010-07-29 12:11 ` [PATCH 17/22] KVM: x86 emulator: store x86_emulate_ops in emulation context Avi Kivity
2010-07-29 12:11 ` [PATCH 18/22] KVM: x86 emulator: allow storing emulator execution function in decode tables Avi Kivity
2010-07-29 12:11 ` [PATCH 19/22] KVM: x86 emulator: move x86_decode_insn() downwards Avi Kivity
2010-07-29 12:11 ` [PATCH 20/22] KVM: x86 emulator: move decode tables downwards Avi Kivity
2010-07-29 12:11 ` [PATCH 21/22] KVM: x86 emulator: allow repeat macro arguments to contain commas Avi Kivity
2010-07-29 12:11 ` [PATCH 22/22] KVM: x86 emulator: convert some push instructions to direct decode Avi Kivity
2010-07-31  1:58 ` [PATCH 00/22] Direct decode in emulator Marcelo Tosatti

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=1280405515-22459-5-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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