提交 5315fbb2 编写于 作者: A Avi Kivity

KVM: x86 emulator: simplify ALU block (opcodes 00-3F) decode flags

Use the new byte/word dual opcode decode.
Signed-off-by: NAvi Kivity <avi@redhat.com>
Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
上级 8d8f4e9f
...@@ -2385,42 +2385,34 @@ static struct group_dual group9 = { { ...@@ -2385,42 +2385,34 @@ static struct group_dual group9 = { {
static struct opcode opcode_table[256] = { static struct opcode opcode_table[256] = {
/* 0x00 - 0x07 */ /* 0x00 - 0x07 */
D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock), D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm),
D(ByteOp | DstAcc | SrcImm), D(DstAcc | SrcImm),
D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64),
/* 0x08 - 0x0F */ /* 0x08 - 0x0F */
D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock), D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm),
D(ByteOp | DstAcc | SrcImm), D(DstAcc | SrcImm),
D(ImplicitOps | Stack | No64), N, D(ImplicitOps | Stack | No64), N,
/* 0x10 - 0x17 */ /* 0x10 - 0x17 */
D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock), D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm),
D(ByteOp | DstAcc | SrcImm), D(DstAcc | SrcImm),
D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64),
/* 0x18 - 0x1F */ /* 0x18 - 0x1F */
D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock), D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm),
D(ByteOp | DstAcc | SrcImm), D(DstAcc | SrcImm),
D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64), D(ImplicitOps | Stack | No64),
/* 0x20 - 0x27 */ /* 0x20 - 0x27 */
D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock), D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm), N, N,
D(ByteOp | DstAcc | SrcImmByte), D(DstAcc | SrcImm), N, N,
/* 0x28 - 0x2F */ /* 0x28 - 0x2F */
D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock), D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm),
D(ByteOp | DstAcc | SrcImmByte), D(DstAcc | SrcImm),
N, I(ByteOp | DstAcc | No64, em_das), N, I(ByteOp | DstAcc | No64, em_das),
/* 0x30 - 0x37 */ /* 0x30 - 0x37 */
D(ByteOp | DstMem | SrcReg | ModRM | Lock), D(DstMem | SrcReg | ModRM | Lock), D2bv(DstMem | SrcReg | ModRM | Lock), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm), N, N,
D(ByteOp | DstAcc | SrcImmByte), D(DstAcc | SrcImm), N, N,
/* 0x38 - 0x3F */ /* 0x38 - 0x3F */
D(ByteOp | DstMem | SrcReg | ModRM), D(DstMem | SrcReg | ModRM), D2bv(DstMem | SrcReg | ModRM), D2bv(DstReg | SrcMem | ModRM),
D(ByteOp | DstReg | SrcMem | ModRM), D(DstReg | SrcMem | ModRM), D2bv(DstAcc | SrcImm),
D(ByteOp | DstAcc | SrcImm), D(DstAcc | SrcImm),
N, N, N, N,
/* 0x40 - 0x4F */ /* 0x40 - 0x4F */
X16(D(DstReg)), X16(D(DstReg)),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册