Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197695
b: refs/heads/master
c: d927112
h: refs/heads/master
i:
  197693: 4a9838d
  197691: 4a97bee
  197687: 09856c2
  197679: 8857869
  197663: 43bb52c
  197631: 25ce0b3
v: v3
  • Loading branch information
Gleb Natapov authored and Avi Kivity committed May 17, 2010
1 parent ca04e77 commit f449065
Show file tree
Hide file tree
Showing 2 changed files with 9 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: a682e35449abc83d260a8219015c7cb4b25ecced
refs/heads/master: d9271123a46011af26da680baeb7fdf67b498abf
15 changes: 8 additions & 7 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2411,13 +2411,13 @@ int emulator_task_switch(struct x86_emulate_ctxt *ctxt,
}

static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned long base,
int reg, unsigned long **ptr)
int reg, struct operand *op)
{
struct decode_cache *c = &ctxt->decode;
int df = (ctxt->eflags & EFLG_DF) ? -1 : 1;

register_address_increment(c, &c->regs[reg], df * c->src.bytes);
*ptr = (unsigned long *)register_address(c, base, c->regs[reg]);
register_address_increment(c, &c->regs[reg], df * op->bytes);
op->ptr = (unsigned long *)register_address(c, base, c->regs[reg]);
}

int
Expand Down Expand Up @@ -2483,7 +2483,6 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
goto done;
}
}
register_address_increment(c, &c->regs[VCPU_REGS_RCX], -1);
c->eip = ctxt->eip;
}

Expand Down Expand Up @@ -2936,11 +2935,13 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)

if ((c->d & SrcMask) == SrcSI)
string_addr_inc(ctxt, seg_override_base(ctxt, c), VCPU_REGS_RSI,
&c->src.ptr);
&c->src);

if ((c->d & DstMask) == DstDI)
string_addr_inc(ctxt, es_base(ctxt), VCPU_REGS_RDI,
&c->dst.ptr);
string_addr_inc(ctxt, es_base(ctxt), VCPU_REGS_RDI, &c->dst);

if (c->rep_prefix && (c->d & String))
register_address_increment(c, &c->regs[VCPU_REGS_RCX], -1);

/* Commit shadow register state. */
memcpy(ctxt->vcpu->arch.regs, c->regs, sizeof c->regs);
Expand Down

0 comments on commit f449065

Please sign in to comment.