From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhLpW-0002WH-HX for qemu-devel@nongnu.org; Thu, 23 Oct 2014 13:05:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhLpN-00028n-5V for qemu-devel@nongnu.org; Thu, 23 Oct 2014 13:05:42 -0400 Received: from mail-yh0-x235.google.com ([2607:f8b0:4002:c01::235]:37693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhLpM-00028f-Uv for qemu-devel@nongnu.org; Thu, 23 Oct 2014 13:05:33 -0400 Received: by mail-yh0-f53.google.com with SMTP id z6so1503738yhz.26 for ; Thu, 23 Oct 2014 10:05:32 -0700 (PDT) Sender: Richard Henderson Message-ID: <54493557.2040106@twiddle.net> Date: Thu, 23 Oct 2014 10:05:27 -0700 From: Richard Henderson MIME-Version: 1.0 References: <20141021130351.3780.41554.stgit@PASHA-ISP> In-Reply-To: <20141021130351.3780.41554.stgit@PASHA-ISP> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] i386: fix icount processing for repz instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: mark.burton@greensocs.com, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, pbonzini@redhat.com, zealot351@gmail.com, fred.konrad@greensocs.com 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 !repz_opt modes. The first one was used > + always except single step mode. And this setting > + disables jumps optimization and control paths become > + equivalent in run and single step modes. > + Now there will be no jump optimization for repz in > + trace and replay modes and there will always be an > + additional step for ecx=0. > + */ > + || use_icount; My aesthetics are offended by the placement of this comment. Please write /* Comment */ dc->repz_opt = x || y; That said, surely that test should be !use_icount. r~