Re: [Qemu-devel] [PATCH] i386: fix icount processing for repz instructions

2014-10-23 Thread Paolo Bonzini
On 10/23/2014 07:05 PM, Richard Henderson wrote: > On 10/21/2014 06:03 AM, Pavel Dovgalyuk wrote: >> +dc->repz_opt = dc->jmp_opt >> +/* Do not optimize repz jumps at all in icount mode, >> because >> + rep movsS instructions are execured with differe

Re: [Qemu-devel] [PATCH] i386: fix icount processing for repz instructions

2014-10-23 Thread Richard Henderson
On 10/21/2014 06:03 AM, Pavel Dovgalyuk wrote: > +dc->repz_opt = dc->jmp_opt > +/* Do not optimize repz jumps at all in icount mode, > because > + rep movsS instructions are execured with different > paths > + in repz_opt and !re

[Qemu-devel] [PATCH] i386: fix icount processing for repz instructions

2014-10-21 Thread Pavel Dovgalyuk
TCG generates optimized code for i386 repz instructions. It means that when ecx becomes 0, execution of the string instruction breaks immediately without an additional iteration for ecx==0 (which will only check ecx and set the flags). Omitting this iteration leads to different instructions countin