From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhOr3-00074J-AO for qemu-devel@nongnu.org; Thu, 23 Oct 2014 16:19:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhOqu-0006iE-9W for qemu-devel@nongnu.org; Thu, 23 Oct 2014 16:19:29 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:34655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhOqu-0006hu-31 for qemu-devel@nongnu.org; Thu, 23 Oct 2014 16:19:20 -0400 Received: by mail-wg0-f41.google.com with SMTP id b13so1948821wgh.12 for ; Thu, 23 Oct 2014 13:19:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <544962C3.6040404@redhat.com> Date: Thu, 23 Oct 2014 22:19:15 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20141021130351.3780.41554.stgit@PASHA-ISP> <54493557.2040106@twiddle.net> In-Reply-To: <54493557.2040106@twiddle.net> 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: Richard Henderson , Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: fred.konrad@greensocs.com, zealot351@gmail.com, maria.klimushenkova@ispras.ru, mark.burton@greensocs.com, batuzovk@ispras.ru 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 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. And "&& !use_icount", even (it becomes "|| use_icount" in the ifs)? Paolo