From patchwork Thu Sep 27 01:55:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187267 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 F1B772C00AD for ; Thu, 27 Sep 2012 12:55:14 +1000 (EST) Received: from localhost ([::1]:36643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TH3LJ-0002pk-Sn for incoming@patchwork.ozlabs.org; Wed, 26 Sep 2012 21:56:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TH3KW-00013F-2A for qemu-devel@nongnu.org; Wed, 26 Sep 2012 21:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TH3KV-0005nG-44 for qemu-devel@nongnu.org; Wed, 26 Sep 2012 21:55:55 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TH3KU-0005h9-Uf for qemu-devel@nongnu.org; Wed, 26 Sep 2012 21:55:55 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so913009pad.4 for ; Wed, 26 Sep 2012 18:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=PNqgCYdm2lF9+XMYct2tgqGmppAOqzIb+UBB9UX2uxA=; b=jPFKN8NZe/XqYBSgCcKLYr+z7mSKh/2nZyZLNE6ZEWSBOq5X3sa1uIcsZWW2VaCIjF ZA/wzeq1e2+xpGHQI2ZlhfnEz+jcWKVSCK9wZ25lccDPvM138jmIuaOO/C525Ign7Ixy PyyPo+DIiRxq0+dNHuyrb4DybBwvVvLfaybWy0sESiZyjVvqmSA5gl+i3ByLKe7XiN6Y tOm0Tz/vIxcXl8pDiw7tag++U8uSVZ6cs0U87pVUfuiUPfOxdhTdkETxylaz1xCniiFr v7K2zBeKEV0u3bRe1iHx+j0oY0b212Tuln+vi9Rxcx0TVUbxPd1lrTSCtb4C3sltdjyl qsBw== Received: by 10.68.212.131 with SMTP id nk3mr7280746pbc.109.1348710954516; Wed, 26 Sep 2012 18:55:54 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id o1sm2830071pax.21.2012.09.26.18.55.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Sep 2012 18:55:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2012 18:55:34 -0700 Message-Id: <1348710942-3040-5-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1348710942-3040-1-git-send-email-rth@twiddle.net> References: <1348710942-3040-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.45 Cc: Blue Swirl Subject: [Qemu-devel] [PATCH 04/12] tcg-sparc: Fix qemu_st for 32-bit 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 The datalo variable is still live in the miss path. Use another when reconstructing the full data value. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 9d4b11a..e55b792 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-target.c @@ -985,7 +985,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int sizeop) { int addrlo_idx = 1, datalo, datahi, addr_reg; #if defined(CONFIG_SOFTMMU) - int memi_idx, memi, n; + int memi_idx, memi, n, datafull; uint32_t *label_ptr; #endif @@ -1002,12 +1002,13 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int sizeop) addr_reg = tcg_out_tlb_load(s, addrlo_idx, memi, sizeop, args, offsetof(CPUTLBEntry, addr_write)); + datafull = datalo; if (TCG_TARGET_REG_BITS == 32 && sizeop == 3) { /* Reconstruct the full 64-bit value. */ tcg_out_arithi(s, TCG_REG_T1, datalo, 0, SHIFT_SRL); tcg_out_arithi(s, TCG_REG_O2, datahi, 32, SHIFT_SLLX); tcg_out_arith(s, TCG_REG_O2, TCG_REG_T1, TCG_REG_O2, ARITH_OR); - datalo = TCG_REG_O2; + datafull = TCG_REG_O2; } /* The fast path is exactly one insn. Thus we can perform the entire @@ -1018,7 +1019,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int sizeop) | ((TARGET_LONG_BITS == 64) << 21) | (1 << 29) | (1 << 19))); /* delay slot */ - tcg_out_ldst_rr(s, datalo, addr_reg, TCG_REG_O1, qemu_st_opc[sizeop]); + tcg_out_ldst_rr(s, datafull, addr_reg, TCG_REG_O1, qemu_st_opc[sizeop]); /* TLB Miss. */