From patchwork Wed Oct 10 16:02:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 190718 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 D3AA52C008B for ; Thu, 11 Oct 2012 03:57:07 +1100 (EST) Received: from localhost ([::1]:59770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLylN-0007NF-ID for incoming@patchwork.ozlabs.org; Wed, 10 Oct 2012 12:04:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLykZ-0005jv-4L for qemu-devel@nongnu.org; Wed, 10 Oct 2012 12:03:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLykO-0007eH-27 for qemu-devel@nongnu.org; Wed, 10 Oct 2012 12:03:11 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:62773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLykN-0007dd-Re for qemu-devel@nongnu.org; Wed, 10 Oct 2012 12:02:59 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so850998pbb.4 for ; Wed, 10 Oct 2012 09:02:59 -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=DCW344kKmua0iYrqRpzZuRF3IlwCNItiBiIjVWAh5Sw=; b=MdF8+HYNfno6CGTTGt/WDDpseMwT0jbd+/zrE+XgW5NUQ3vPXs3K9uodNUxI6uBu+Z hegkP53wPxh9MTl5u3l9qT3iyxIXDbhiL3xC4UczXvAogGSc+Jc2o3r+99EJ0WG5PTXj zJaYz/0bSa3FcEcZQpksxNhRgZZIB/guM/MeUTCosi6ydtxjCcjT89hK7T+g4KvtEob+ +85I59/X83DWTvPl62isXCzT7YNh51v4hg1aR3mSz0shOyFk0Ldl0da8/gUno+S3SIz+ eXJrk1blfFOMA4+nq8EMFml3mGPCqtNP1DLwjEG4yDWwquYqjdGwEfNeLvJtUiWrxP29 0TIQ== Received: by 10.68.225.199 with SMTP id rm7mr75705964pbc.150.1349884979476; Wed, 10 Oct 2012 09:02:59 -0700 (PDT) Received: from anchor.twiddle.home.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id sj5sm1216694pbc.30.2012.10.10.09.02.58 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 09:02:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 10 Oct 2012 09:02:39 -0700 Message-Id: <1349884967-4608-6-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1349884967-4608-1-git-send-email-rth@twiddle.net> References: <1349884967-4608-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.160.45 Cc: Blue Swirl Subject: [Qemu-devel] [PATCH 05/13] 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 bdc282d..3144044 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. */