From patchwork Tue May 29 10:49:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10434967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CDC84602BF for ; Tue, 29 May 2018 11:00:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB5F2286C6 for ; Tue, 29 May 2018 11:00:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFAC0286D6; Tue, 29 May 2018 11:00:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D76D286C6 for ; Tue, 29 May 2018 11:00:09 +0000 (UTC) Received: from localhost ([::1]:60132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcMK-0000zY-GG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 May 2018 07:00:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcD6-0001QA-Af for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNcD5-0003v2-A6 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:36 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:37012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcD4-0003uY-O5 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:35 -0400 Received: by mail-wm0-x22d.google.com with SMTP id l1-v6so39330946wmb.2 for ; Tue, 29 May 2018 03:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IfQTzvo9IYvv3/ZGWT95WYfUYxPdt+5UQumn6Xxm2Eg=; b=Uvp8jGCljsuOiCneviOBLl19BstIZLxmb2QlHBF2W9dyebG9faJO8O+meOmH5T+mDj HsznUAohXXXm+bJi/gXu7CryGrb+0oRKTfMDMGM/tJssxG8EH/gpSnQ5tSFTtHJHxRHX D9EBjnVss2wRLkqZZfQesO806QUgdalSt4fvuNrnov9JMnq2oe7VN6iyJhx9n3pUGi2O Kn8dLVCtAuhcmFotrLA55UwyQFODzUEsDHn6fWAP/kuh/M4utl+tnPoaYieqmw9VImS1 NeWJ/qAIqhgcpbwMPAfS2wQf/ibETlnqdJRcQ6ruvXXctO1bQEA7JtBg6n0rMC8RHhc3 X48w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IfQTzvo9IYvv3/ZGWT95WYfUYxPdt+5UQumn6Xxm2Eg=; b=q7IGiYNPcVWDATtf6qjJpDiJRDWkhmcf66Ik8M/bVw+pJ4AlcRT5HkGCGuU2nJKGRV fGNewxFkVlvghA34dzczsJ6ZPGwy0ld5ruzmNCTtq5behmW3yPJC9TImap30Y7Vcl8As Fy1bmMNeruEtgWMwnDclrs3KzJ+cJoSXozo2FUR1aiu8yzLdVGHyXXeGaZN5svoQTSQf fFKr/rfbRfjGRm/Qdd6nUYtyaVWE8jtgNfpmT1Rdezwsx6V++awEXt8YYphPGbhErWTa QUDp55dN3zk3OjLgq0w9eH5scNeGjrqtYJLz6FWmoYn/Za65sbygQ+BxF2RBq3AZOrXz ptqg== X-Gm-Message-State: ALKqPwfNDpS++Yv1we0Qlqmb2r8+h3vxisM99yfGp2j8BS0Li8j92k1n L760Ndt/kdP8jxbSryzLqd1BWw== X-Google-Smtp-Source: AB8JxZqLWjGrvqci+yA1aROHdH+jPLicXCT2sXkOq5SxEqUpgB+npJHbKkQEALnlNDGTBrrzt2Vynw== X-Received: by 2002:a2e:2a45:: with SMTP id q66-v6mr10720411ljq.40.1527591033328; Tue, 29 May 2018 03:50:33 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id n26-v6sm6840223lfe.61.2018.05.29.03.50.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:32 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:45 +0200 Message-Id: <20180529105011.1914-13-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22d Subject: [Qemu-devel] [PULL v1 12/38] target-microblaze: Remove pointer indirection for ld/st addresses X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 2a4546ec3d..ee17334959 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -848,7 +848,7 @@ static void dec_imm(DisasContext *dc) dc->clear_imm = 0; } -static inline void compute_ldst_addr(DisasContext *dc, TCGv_i32 *t) +static inline void compute_ldst_addr(DisasContext *dc, TCGv_i32 t) { bool extimm = dc->tb_flags & IMM_FLAG; /* Should be set to true if r1 is used by loadstores. */ @@ -863,10 +863,10 @@ static inline void compute_ldst_addr(DisasContext *dc, TCGv_i32 *t) if (!dc->type_b) { /* If any of the regs is r0, set t to the value of the other reg. */ if (dc->ra == 0) { - tcg_gen_mov_i32(*t, cpu_R[dc->rb]); + tcg_gen_mov_i32(t, cpu_R[dc->rb]); return; } else if (dc->rb == 0) { - tcg_gen_mov_i32(*t, cpu_R[dc->ra]); + tcg_gen_mov_i32(t, cpu_R[dc->ra]); return; } @@ -874,27 +874,27 @@ static inline void compute_ldst_addr(DisasContext *dc, TCGv_i32 *t) stackprot = true; } - tcg_gen_add_i32(*t, cpu_R[dc->ra], cpu_R[dc->rb]); + tcg_gen_add_i32(t, cpu_R[dc->ra], cpu_R[dc->rb]); if (stackprot) { - gen_helper_stackprot(cpu_env, *t); + gen_helper_stackprot(cpu_env, t); } return; } /* Immediate. */ if (!extimm) { if (dc->imm == 0) { - tcg_gen_mov_i32(*t, cpu_R[dc->ra]); + tcg_gen_mov_i32(t, cpu_R[dc->ra]); return; } - tcg_gen_movi_i32(*t, (int32_t)((int16_t)dc->imm)); - tcg_gen_add_i32(*t, cpu_R[dc->ra], *t); + tcg_gen_movi_i32(t, (int32_t)((int16_t)dc->imm)); + tcg_gen_add_i32(t, cpu_R[dc->ra], t); } else { - tcg_gen_add_i32(*t, cpu_R[dc->ra], *(dec_alu_op_b(dc))); + tcg_gen_add_i32(t, cpu_R[dc->ra], *(dec_alu_op_b(dc))); } if (stackprot) { - gen_helper_stackprot(cpu_env, *t); + gen_helper_stackprot(cpu_env, t); } return; } @@ -929,7 +929,7 @@ static void dec_load(DisasContext *dc) t_sync_flags(dc); addr = tcg_temp_new_i32(); - compute_ldst_addr(dc, &addr); + compute_ldst_addr(dc, addr); /* * When doing reverse accesses we need to do two things. @@ -1041,7 +1041,7 @@ static void dec_store(DisasContext *dc) sync_jmpstate(dc); /* SWX needs a temp_local. */ addr = ex ? tcg_temp_local_new_i32() : tcg_temp_new_i32(); - compute_ldst_addr(dc, &addr); + compute_ldst_addr(dc, addr); if (ex) { /* swx */ TCGv_i32 tval;