Skip to content

Commit

Permalink
KVM: x86 emulator: use SrcAcc to simplify stos decoding
Browse files Browse the repository at this point in the history
Use SrcAcc to simplify stos decoding.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Wei Yongjun authored and Avi Kivity committed Oct 24, 2010
1 parent 6e154e5 commit 06cb704
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,8 @@ static struct opcode opcode_table[256] = {
D(ByteOp | SrcSI | DstDI | Mov | String), D(SrcSI | DstDI | Mov | String),
D(ByteOp | SrcSI | DstDI | String), D(SrcSI | DstDI | String),
/* 0xA8 - 0xAF */
D(DstAcc | SrcImmByte | ByteOp), D(DstAcc | SrcImm), D(ByteOp | DstDI | Mov | String), D(DstDI | Mov | String),
D(DstAcc | SrcImmByte | ByteOp), D(DstAcc | SrcImm),
D(ByteOp | SrcAcc | DstDI | Mov | String), D(SrcAcc | DstDI | Mov | String),
D(ByteOp | SrcSI | DstAcc | Mov | String), D(SrcSI | DstAcc | Mov | String),
D(ByteOp | DstDI | String), D(DstDI | String),
/* 0xB0 - 0xB7 */
Expand Down Expand Up @@ -2996,8 +2997,6 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
case 0xa8 ... 0xa9: /* test ax, imm */
goto test;
case 0xaa ... 0xab: /* stos */
c->dst.val = c->regs[VCPU_REGS_RAX];
break;
case 0xac ... 0xad: /* lods */
goto mov;
case 0xae ... 0xaf: /* scas */
Expand Down

0 comments on commit 06cb704

Please sign in to comment.