Commit 2f3a9bc9 authored by Avi Kivity's avatar Avi Kivity

KVM: x86 emulator: convert group 7 to new style

Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent b67f9f07
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
#define X16(x) X8(x), X8(x) #define X16(x) X8(x), X8(x)
enum { enum {
NoGrp, Group7, Group8, Group9, NoGrp, Group8, Group9,
}; };
struct opcode { struct opcode {
...@@ -152,11 +152,17 @@ static struct opcode group5[] = { ...@@ -152,11 +152,17 @@ static struct opcode group5[] = {
D(SrcMem | ModRM | Stack), N, D(SrcMem | ModRM | Stack), N,
}; };
static struct opcode group_table[] = { static struct group_dual group7 = { {
[Group7*8] =
N, N, D(ModRM | SrcMem | Priv), D(ModRM | SrcMem | Priv), N, N, D(ModRM | SrcMem | Priv), D(ModRM | SrcMem | Priv),
D(SrcNone | ModRM | DstMem | Mov), N, D(SrcNone | ModRM | DstMem | Mov), N,
D(SrcMem16 | ModRM | Mov | Priv), D(SrcMem | ModRM | ByteOp | Priv), D(SrcMem16 | ModRM | Mov | Priv), D(SrcMem | ModRM | ByteOp | Priv),
}, {
D(SrcNone | ModRM | Priv), N, N, D(SrcNone | ModRM | Priv),
D(SrcNone | ModRM | DstMem | Mov), N,
D(SrcMem16 | ModRM | Mov | Priv), N,
} };
static struct opcode group_table[] = {
[Group8*8] = [Group8*8] =
N, N, N, N, N, N, N, N,
D(DstMem | SrcImmByte | ModRM), D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM), D(DstMem | SrcImmByte | ModRM | Lock),
...@@ -166,10 +172,6 @@ static struct opcode group_table[] = { ...@@ -166,10 +172,6 @@ static struct opcode group_table[] = {
}; };
static struct opcode group2_table[] = { 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] = [Group9*8] =
N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N,
}; };
...@@ -290,7 +292,7 @@ static struct opcode opcode_table[256] = { ...@@ -290,7 +292,7 @@ static struct opcode opcode_table[256] = {
static struct opcode twobyte_table[256] = { static struct opcode twobyte_table[256] = {
/* 0x00 - 0x0F */ /* 0x00 - 0x0F */
N, D(Group | GroupDual | Group7), N, N, N, GD(0, &group7), N, N,
N, D(ImplicitOps), D(ImplicitOps | Priv), N, N, D(ImplicitOps), D(ImplicitOps | Priv), N,
D(ImplicitOps | Priv), D(ImplicitOps | Priv), N, N, D(ImplicitOps | Priv), D(ImplicitOps | Priv), N, N,
N, D(ImplicitOps | ModRM), N, N, N, D(ImplicitOps | ModRM), N, N,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment