From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLf4e-0005yd-6G for qemu-devel@nongnu.org; Tue, 09 Oct 2012 15:02:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLf4Z-0007SZ-EA for qemu-devel@nongnu.org; Tue, 09 Oct 2012 15:02:36 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:39759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLf4Z-0007S9-7y for qemu-devel@nongnu.org; Tue, 09 Oct 2012 15:02:31 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so5575456pbb.4 for ; Tue, 09 Oct 2012 12:02:30 -0700 (PDT) Sender: Richard Henderson Message-ID: <507474C5.4040504@twiddle.net> Date: Tue, 09 Oct 2012 12:02:29 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1349526621-13939-1-git-send-email-pbonzini@redhat.com> <1349526621-13939-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1349526621-13939-6-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/14] i386: move eflags computation closer to gen_op_set_cc_op List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 10/06/2012 05:30 AM, Paolo Bonzini wrote: > In some cases this is just simple code movement, ensuring the invariant > that cpu_cc_op matches s->cc_op when calling the helpers. The next patches > need this because gen_compute_eflags and gen_compute_eflags_c will take > care of setting cpu_cc_op. > > Also, for shifts, always compute EFLAGS first since it is needed whenever > the shift is non-zero, i.e. most of the time. This makes it possible > to remove some writes of CC_OP_EFLAGS to cpu_cc_op and more importantly > removes cases where s->cc_op becomes CC_OP_DYNAMIC. These are slow and > we want to avoid them: CC_OP_EFLAGS is quite efficient once we paid the > initial cost of computing the flags. > > Finally, always follow gen_compute_eflags(cpu_cc_src) by setting s->cc_op > and discarding cpu_cc_dst. > > Signed-off-by: Paolo Bonzini I was about to quibble with some of this, but I see you've cleaned up all my quibbles with subsequent patches. Reviewed-by: Richard Henderson r~