Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kq9jS-00064t-GC for qemu-devel@nongnu.org; Wed, 15 Oct 2008 13:00:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kq9jR-00064h-7U for qemu-devel@nongnu.org; Wed, 15 Oct 2008 13:00:21 -0400 Received: from [199.232.76.173] (port=54464 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kq9jR-00064e-2k for qemu-devel@nongnu.org; Wed, 15 Oct 2008 13:00:21 -0400 Received: from savannah.gnu.org ([199.232.41.3]:52155 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kq9jQ-00064g-Lh for qemu-devel@nongnu.org; Wed, 15 Oct 2008 13:00:20 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Kq9jQ-0006tT-02 for qemu-devel@nongnu.org; Wed, 15 Oct 2008 17:00:20 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Kq9jP-0006tK-6C for qemu-devel@nongnu.org; Wed, 15 Oct 2008 17:00:19 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Wed, 15 Oct 2008 17:00:19 +0000 Subject: [Qemu-devel] [5491] PPC: convert SPE effective address computation to TCG Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5491 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5491 Author: aurel32 Date: 2008-10-15 17:00:18 +0000 (Wed, 15 Oct 2008) Log Message: ----------- PPC: convert SPE effective address computation to TCG Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-ppc/translate.c Modified: trunk/target-ppc/translate.c =================================================================== --- trunk/target-ppc/translate.c 2008-10-14 19:55:54 UTC (rev 5490) +++ trunk/target-ppc/translate.c 2008-10-15 17:00:18 UTC (rev 5491) @@ -5316,17 +5316,16 @@ } /* SPE load and stores */ -static always_inline void gen_addr_spe_imm_index (DisasContext *ctx, int sh) +static always_inline void gen_addr_spe_imm_index (TCGv EA, DisasContext *ctx, int sh) { target_long simm = rB(ctx->opcode); - if (rA(ctx->opcode) == 0) { - tcg_gen_movi_tl(cpu_T[0], simm << sh); - } else { - tcg_gen_mov_tl(cpu_T[0], cpu_gpr[rA(ctx->opcode)]); - if (likely(simm != 0)) - tcg_gen_addi_tl(cpu_T[0], cpu_T[0], simm << sh); - } + if (rA(ctx->opcode) == 0) + tcg_gen_movi_tl(EA, simm << sh); + else if (likely(simm != 0)) + tcg_gen_addi_tl(EA, cpu_gpr[rA(ctx->opcode)], simm << sh); + else + tcg_gen_mov_tl(EA, cpu_gpr[rA(ctx->opcode)]); } #define op_spe_ldst(name) (*gen_op_##name[ctx->mem_idx])() @@ -5346,7 +5345,7 @@ GEN_EXCP_NO_AP(ctx); \ return; \ } \ - gen_addr_spe_imm_index(ctx, sh); \ + gen_addr_spe_imm_index(cpu_T[0], ctx, sh); \ op_spe_ldst(spe_l##name); \ gen_store_gpr64(rD(ctx->opcode), cpu_T64[1]); \ } @@ -5375,7 +5374,7 @@ GEN_EXCP_NO_AP(ctx); \ return; \ } \ - gen_addr_spe_imm_index(ctx, sh); \ + gen_addr_spe_imm_index(cpu_T[0], ctx, sh); \ gen_load_gpr64(cpu_T64[1], rS(ctx->opcode)); \ op_spe_ldst(spe_st##name); \ }