summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-07-29 15:11:37 +0300
committerAvi Kivity <avi@redhat.com>2010-10-24 10:50:08 +0200
commit42a1c5209570ead6d89abecd99ab12947a41d20a (patch)
tree6924f395e56beb762702533c2a4ffabf59dc715b /arch/x86
parentfd853310a1ebaef257956208165873494bb805dc (diff)
downloadblackbird-op-linux-42a1c5209570ead6d89abecd99ab12947a41d20a.tar.gz
blackbird-op-linux-42a1c5209570ead6d89abecd99ab12947a41d20a.zip
KVM: x86 emulator: move group tables to top
No code changes. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/emulate.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 7059b1611970..edf093861105 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
OpenPOWER on IntegriCloud