KVM: x86 emulator: convert group 8 to new style

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Avi Kivity 2010-07-29 15:11:46 +03:00
parent 2f3a9bc9eb
commit 2cb20bc8af
1 changed files with 6 additions and 4 deletions

View File

@ -105,7 +105,7 @@
#define X16(x) X8(x), X8(x) #define X16(x) X8(x), X8(x)
enum { enum {
NoGrp, Group8, Group9, NoGrp, Group9,
}; };
struct opcode { struct opcode {
@ -162,11 +162,13 @@ static struct group_dual group7 = { {
D(SrcMem16 | ModRM | Mov | Priv), N, D(SrcMem16 | ModRM | Mov | Priv), N,
} }; } };
static struct opcode group_table[] = { static struct opcode group8[] = {
[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),
D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM | Lock), D(DstMem | SrcImmByte | ModRM | Lock),
};
static struct opcode group_table[] = {
[Group9*8] = [Group9*8] =
N, D(DstMem64 | ModRM | Lock), N, N, N, N, N, N, N, D(DstMem64 | ModRM | Lock), N, N, N, N, N, N,
}; };
@ -337,7 +339,7 @@ static struct opcode twobyte_table[256] = {
D(DstReg | SrcMem16 | ModRM | Mov), D(DstReg | SrcMem16 | ModRM | Mov),
/* 0xB8 - 0xBF */ /* 0xB8 - 0xBF */
N, N, N, N,
D(Group | Group8), D(DstMem | SrcReg | ModRM | BitOp | Lock), G(0, group8), D(DstMem | SrcReg | ModRM | BitOp | Lock),
N, N, D(ByteOp | DstReg | SrcMem | ModRM | Mov), N, N, D(ByteOp | DstReg | SrcMem | ModRM | Mov),
D(DstReg | SrcMem16 | ModRM | Mov), D(DstReg | SrcMem16 | ModRM | Mov),
/* 0xC0 - 0xCF */ /* 0xC0 - 0xCF */