From patchwork Thu Jan 24 04:02:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 215215 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 962D82C0040 for ; Thu, 24 Jan 2013 15:36:36 +1100 (EST) Received: from localhost ([::1]:34811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyE48-0003Zw-Fk for incoming@patchwork.ozlabs.org; Wed, 23 Jan 2013 23:05:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyE2j-0000qF-Sp for qemu-devel@nongnu.org; Wed, 23 Jan 2013 23:04:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyE2f-0004B2-VY for qemu-devel@nongnu.org; Wed, 23 Jan 2013 23:04:01 -0500 Received: from mail-pb0-f43.google.com ([209.85.160.43]:58325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyE2f-0004Am-Gj for qemu-devel@nongnu.org; Wed, 23 Jan 2013 23:03:57 -0500 Received: by mail-pb0-f43.google.com with SMTP id jt11so3780040pbb.16 for ; Wed, 23 Jan 2013 20:03:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=5J7LZKz8kg5bxmaOotN8K1U3aGETs6IyQ7hwf5s9+5Q=; b=fXhAokue6yYKE8/qZCack20NePXU9zchbdOquy3gud3RTFp4k1BK0eRhB/0WbME3BN gvog9r/cN7Uy6Q66DiZW21Ylw4U3kv5OFRNVenQgYa9FbJLHvQ61VJlau0rJI26Ap5qx cX6mnp68wvRz1W/Lm1qoPwbRLSjZQb6LYLcXYBaxxAeEpf2U1ZVvRHNcooDDa+GOt7mS SfOZdgEfz0lYxREy3uzU8CNADdk8wQA5zKN2QzXdM01/HBiQ2fzpZgu3+luHSF52AIno mdDETbpvvlNaTBSC3kRnwgEGZ5Qyh76DGauoW9CpuBL6cSsngL1+IGBvsZySk4fvxU8U y+OA== X-Received: by 10.66.9.2 with SMTP id v2mr1447138paa.18.1359000236727; Wed, 23 Jan 2013 20:03:56 -0800 (PST) Received: from anchor.twiddle.home (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id ot3sm14027480pbb.38.2013.01.23.20.03.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Jan 2013 20:03:55 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 23 Jan 2013 20:02:51 -0800 Message-Id: <1359000221-19834-8-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1359000221-19834-1-git-send-email-rth@twiddle.net> References: <1359000221-19834-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.43 Cc: Blue Swirl , Paolo Bonzini Subject: [Qemu-devel] [PATCH 07/57] target-i386: move carry computation for inc/dec closer to gen_op_set_cc_op X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Paolo Bonzini This ensures 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. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 84da28f..18b39e9 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -1373,6 +1373,7 @@ static void gen_inc(DisasContext *s1, int ot, int d, int c) gen_op_ld_T0_A0(ot + s1->mem_index); if (s1->cc_op != CC_OP_DYNAMIC) gen_op_set_cc_op(s1->cc_op); + gen_compute_eflags_c(cpu_cc_src); if (c > 0) { tcg_gen_addi_tl(cpu_T[0], cpu_T[0], 1); s1->cc_op = CC_OP_INCB + ot; @@ -1384,7 +1385,6 @@ static void gen_inc(DisasContext *s1, int ot, int d, int c) gen_op_mov_reg_T0(ot, d); else gen_op_st_T0_A0(ot + s1->mem_index); - gen_compute_eflags_c(cpu_cc_src); tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]); }