From patchwork Tue Feb 19 17:39:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 221907 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 09B682C0099 for ; Wed, 20 Feb 2013 09:16:03 +1100 (EST) Received: from localhost ([::1]:59421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7vTl-0004n4-3B for incoming@patchwork.ozlabs.org; Tue, 19 Feb 2013 17:16:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7rBe-00054I-Dx for qemu-devel@nongnu.org; Tue, 19 Feb 2013 12:41:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7rBS-0007uQ-MC for qemu-devel@nongnu.org; Tue, 19 Feb 2013 12:41:01 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:45117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7rBS-0007u1-Fc for qemu-devel@nongnu.org; Tue, 19 Feb 2013 12:40:50 -0500 Received: by mail-pa0-f49.google.com with SMTP id kp6so3487225pab.22 for ; Tue, 19 Feb 2013 09:40:49 -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=5um9llAKGO8a07+jZfgzzQOOsOSs9HOc3HailIXFa6A=; b=vGywG7VmqjIrNKBqTWf+forHVDcmrJEchd/v0jGe8y0wkzEvzviZFtFj/eB4dZI6KB zx9XWL2gYEp3xY7oT9ixkFB3S3qSH2s4BFgswKyhH1a8BJnp+dZ81t6UxerzQMR6ymRQ rdASXDMPnPFeZfqJj79y/dAGeRfeT9xoQcisEEUQGUZu1GTnUQM9tp6/UM9Dq+lfYgsw vTBuahKbrjwFcH4rGKlnV6QmzPCLbRFz4jnf8omYFDbddHs706E0mG24uUR1aSADbxNA 3jFY4x8TQaMSNlj19kvoiwtBCT9TWGsk20x0P2ZGFkYdkc6WmKxZoeMTyn6zEpexbIPL OHLw== X-Received: by 10.68.189.169 with SMTP id gj9mr42993976pbc.67.1361295649488; Tue, 19 Feb 2013 09:40:49 -0800 (PST) Received: from anchor.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id 1sm18659295pbg.18.2013.02.19.09.40.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 19 Feb 2013 09:40:48 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 19 Feb 2013 09:39:41 -0800 Message-Id: <1361295631-21316-8-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1361295631-21316-1-git-send-email-rth@twiddle.net> References: <1361295631-21316-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.220.49 Cc: blauwirbel@gmail.com, pbonzini@redhat.com, afaerber@suse.de, aurelien@aurel32.net 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 48a3255..ed373c3 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]); }