Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215719
b: refs/heads/master
c: ba7ff2b
h: refs/heads/master
i:
  215717: 1a41a19
  215715: edbb773
  215711: 6f6dbe2
v: v3
  • Loading branch information
Wei Yongjun authored and Avi Kivity committed Oct 24, 2010
1 parent 086f11b commit 867b32b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3885f18fe3034a10b3e3923885d70d31ba522844
refs/heads/master: ba7ff2b76dcf05c4681c2648019b8301ada6f3df
11 changes: 4 additions & 7 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,9 @@ static void fetch_bit_operand(struct decode_cache *c)

c->dst.addr.mem += (sv >> 3);
}

/* only subword offset */
c->src.val &= (c->dst.bytes << 3) - 1;
}

static int read_emulated(struct x86_emulate_ctxt *ctxt,
Expand Down Expand Up @@ -2336,7 +2339,7 @@ static struct opcode twobyte_table[256] = {
D(DstReg | SrcMem16 | ModRM | Mov),
/* 0xB8 - 0xBF */
N, N,
G(0, group8), D(DstMem | SrcReg | ModRM | BitOp | Lock),
G(BitOp, group8), D(DstMem | SrcReg | ModRM | BitOp | Lock),
N, N, D(ByteOp | DstReg | SrcMem | ModRM | Mov),
D(DstReg | SrcMem16 | ModRM | Mov),
/* 0xC0 - 0xCF */
Expand Down Expand Up @@ -3419,8 +3422,6 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
break;
case 0xab:
bts: /* bts */
/* only subword offset */
c->src.val &= (c->dst.bytes << 3) - 1;
emulate_2op_SrcV_nobyte("bts", c->src, c->dst, ctxt->eflags);
break;
case 0xac: /* shrd imm8, r, r/m */
Expand Down Expand Up @@ -3448,8 +3449,6 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
break;
case 0xb3:
btr: /* btr */
/* only subword offset */
c->src.val &= (c->dst.bytes << 3) - 1;
emulate_2op_SrcV_nobyte("btr", c->src, c->dst, ctxt->eflags);
break;
case 0xb6 ... 0xb7: /* movzx */
Expand All @@ -3471,8 +3470,6 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
break;
case 0xbb:
btc: /* btc */
/* only subword offset */
c->src.val &= (c->dst.bytes << 3) - 1;
emulate_2op_SrcV_nobyte("btc", c->src, c->dst, ctxt->eflags);
break;
case 0xbe ... 0xbf: /* movsx */
Expand Down

0 comments on commit 867b32b

Please sign in to comment.