From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JsDEB-0000l2-1h for qemu-devel@nongnu.org; Sat, 03 May 2008 04:36:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JsDEA-0000kH-0F for qemu-devel@nongnu.org; Sat, 03 May 2008 04:36:18 -0400 Received: from [199.232.76.173] (port=42442 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsDE9-0000k2-Ae for qemu-devel@nongnu.org; Sat, 03 May 2008 04:36:17 -0400 Received: from savannah.gnu.org ([199.232.41.3] 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 1JsDE9-0002g9-2P for qemu-devel@nongnu.org; Sat, 03 May 2008 04:36:17 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JsDE8-0002mx-Ef for qemu-devel@nongnu.org; Sat, 03 May 2008 08:36:16 +0000 Received: from edgar_igl by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JsDE8-0002mt-A7 for qemu-devel@nongnu.org; Sat, 03 May 2008 08:36:16 +0000 MIME-Version: 1.0 Errors-To: edgar_igl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: "Edgar E. Iglesias" Message-Id: Date: Sat, 03 May 2008 08:36:16 +0000 Subject: [Qemu-devel] [4306] CRIS: Eliminate a few unneeded moves to/from T0/T1. 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: 4306 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4306 Author: edgar_igl Date: 2008-05-03 08:36:16 +0000 (Sat, 03 May 2008) Log Message: ----------- CRIS: Eliminate a few unneeded moves to/from T0/T1. Modified Paths: -------------- trunk/target-cris/translate.c Modified: trunk/target-cris/translate.c =================================================================== --- trunk/target-cris/translate.c 2008-05-03 08:35:16 UTC (rev 4305) +++ trunk/target-cris/translate.c 2008-05-03 08:36:16 UTC (rev 4306) @@ -449,11 +449,10 @@ tb = dc->tb; if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) { tcg_gen_goto_tb(n); - tcg_gen_movi_tl(cpu_T[0], dest); - t_gen_mov_env_TN(pc, cpu_T[0]); + tcg_gen_movi_tl(env_pc, dest); tcg_gen_exit_tb((long)tb + n); } else { - t_gen_mov_env_TN(pc, cpu_T[0]); + tcg_gen_mov_tl(env_pc, cpu_T[0]); tcg_gen_exit_tb(0); } } @@ -916,6 +915,8 @@ tcg_gen_ext8s_i32(d, s); else if (size == 2) tcg_gen_ext16s_i32(d, s); + else + tcg_gen_mov_tl(d, s); } static inline void t_gen_zext(TCGv d, TCGv s, int size) @@ -925,6 +926,8 @@ tcg_gen_andi_i32(d, s, 0xff); else if (size == 2) tcg_gen_andi_i32(d, s, 0xffff); + else + tcg_gen_mov_tl(d, s); } #if DISAS_CRIS @@ -968,11 +971,10 @@ static void dec_prep_move_r(DisasContext *dc, int rs, int rd, int size, int s_ext) { - t_gen_mov_TN_reg(cpu_T[1], rs); if (s_ext) - t_gen_sext(cpu_T[1], cpu_T[1], size); + t_gen_sext(cpu_T[1], cpu_R[rs], size); else - t_gen_zext(cpu_T[1], cpu_T[1], size); + t_gen_zext(cpu_T[1], cpu_R[rs], size); } /* Prepare T0 and T1 for a register alu operation. @@ -983,11 +985,10 @@ { dec_prep_move_r(dc, rs, rd, size, s_ext); - t_gen_mov_TN_reg(cpu_T[0], rd); if (s_ext) - t_gen_sext(cpu_T[0], cpu_T[0], size); + t_gen_sext(cpu_T[0], cpu_R[rd], size); else - t_gen_zext(cpu_T[0], cpu_T[0], size); + t_gen_zext(cpu_T[0], cpu_R[rd], size); } /* Prepare T0 and T1 for a memory + alu operation.