aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-07-29 08:11:47 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:50:18 -0400
commit9f5d3220e3047536f702ed67309f6a581c0bed8b (patch)
tree2baa2120dd86fdedd14a7c195d407691e540ccd9
parent2cb20bc8af313b400e5c2c94886e0d87e2ec4e4d (diff)
KVM: x86 emulator: convert group 9 to new style
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--arch/x86/kvm/emulate.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index b5599b5cac97..2fe731c82299 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -105,7 +105,7 @@
105#define X16(x) X8(x), X8(x) 105#define X16(x) X8(x), X8(x)
106 106
107enum { 107enum {
108 NoGrp, Group9, 108 NoGrp,
109}; 109};
110 110
111struct opcode { 111struct opcode {
@@ -168,14 +168,16 @@ static struct opcode group8[] = {
168 D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM | Lock), 168 D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM | Lock),
169}; 169};
170 170
171static struct opcode group_table[] = { 171static struct group_dual group9 = { {
172 [Group9*8] =
173 N, D(DstMem64 | ModRM | Lock), N, N, N, N, N, N, 172 N, D(DstMem64 | ModRM | Lock), N, N, N, N, N, N,
173}, {
174 N, N, N, N, N, N, N, N,
175} };
176
177static struct opcode group_table[] = {
174}; 178};
175 179
176static struct opcode group2_table[] = { 180static struct opcode group2_table[] = {
177 [Group9*8] =
178 N, N, N, N, N, N, N, N,
179}; 181};
180 182
181static struct opcode opcode_table[256] = { 183static struct opcode opcode_table[256] = {
@@ -344,7 +346,7 @@ static struct opcode twobyte_table[256] = {
344 D(DstReg | SrcMem16 | ModRM | Mov), 346 D(DstReg | SrcMem16 | ModRM | Mov),
345 /* 0xC0 - 0xCF */ 347 /* 0xC0 - 0xCF */
346 N, N, N, D(DstMem | SrcReg | ModRM | Mov), 348 N, N, N, D(DstMem | SrcReg | ModRM | Mov),
347 N, N, N, D(Group | GroupDual | Group9), 349 N, N, N, GD(0, &group9),
348 N, N, N, N, N, N, N, N, 350 N, N, N, N, N, N, N, N,
349 /* 0xD0 - 0xDF */ 351 /* 0xD0 - 0xDF */
350 N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, 352 N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N,