From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhQFR-0007yG-J5 for qemu-devel@nongnu.org; Sun, 21 Sep 2008 10:49:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhQFQ-0007xv-1u for qemu-devel@nongnu.org; Sun, 21 Sep 2008 10:49:17 -0400 Received: from [199.232.76.173] (port=34434 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhQFP-0007xq-SO for qemu-devel@nongnu.org; Sun, 21 Sep 2008 10:49:15 -0400 Received: from savannah.gnu.org ([199.232.41.3]:60702 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 1KhQFO-0003ST-V3 for qemu-devel@nongnu.org; Sun, 21 Sep 2008 10:49:15 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KhQFJ-0006tW-Te for qemu-devel@nongnu.org; Sun, 21 Sep 2008 14:49:09 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KhQFJ-0006tS-Ib for qemu-devel@nongnu.org; Sun, 21 Sep 2008 14:49:09 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sun, 21 Sep 2008 14:49:09 +0000 Subject: [Qemu-devel] [5281] Use the new concat_i32_i64 op for std and stda 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: 5281 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5281 Author: blueswir1 Date: 2008-09-21 14:49:09 +0000 (Sun, 21 Sep 2008) Log Message: ----------- Use the new concat_i32_i64 op for std and stda Modified Paths: -------------- trunk/target-sparc/helper.h trunk/target-sparc/op_helper.c trunk/target-sparc/translate.c Modified: trunk/target-sparc/helper.h =================================================================== --- trunk/target-sparc/helper.h 2008-09-21 13:48:32 UTC (rev 5280) +++ trunk/target-sparc/helper.h 2008-09-21 14:49:09 UTC (rev 5281) @@ -44,7 +44,6 @@ DEF_HELPER(void, helper_flush, (target_ulong addr)) DEF_HELPER(target_ulong, helper_udiv, (target_ulong a, target_ulong b)) DEF_HELPER(target_ulong, helper_sdiv, (target_ulong a, target_ulong b)) -DEF_HELPER(uint64_t, helper_pack64, (target_ulong high, target_ulong low)) DEF_HELPER(void, helper_stdf, (target_ulong addr, int mem_idx)) DEF_HELPER(void, helper_lddf, (target_ulong addr, int mem_idx)) DEF_HELPER(void, helper_ldqf, (target_ulong addr, int mem_idx)) Modified: trunk/target-sparc/op_helper.c =================================================================== --- trunk/target-sparc/op_helper.c 2008-09-21 13:48:32 UTC (rev 5280) +++ trunk/target-sparc/op_helper.c 2008-09-21 14:49:09 UTC (rev 5281) @@ -2281,11 +2281,6 @@ } } -uint64_t helper_pack64(target_ulong high, target_ulong low) -{ - return ((uint64_t)high << 32) | (uint64_t)(low & 0xffffffff); -} - void helper_stdf(target_ulong addr, int mem_idx) { helper_check_align(addr, 7); Modified: trunk/target-sparc/translate.c =================================================================== --- trunk/target-sparc/translate.c 2008-09-21 13:48:32 UTC (rev 5280) +++ trunk/target-sparc/translate.c 2008-09-21 14:49:09 UTC (rev 5281) @@ -1715,13 +1715,14 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) { - TCGv r_temp, r_asi, r_size; + TCGv r_low, r_asi, r_size; - r_temp = tcg_temp_new(TCG_TYPE_TL); - gen_movl_reg_TN(rd + 1, r_temp); - tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, hi, - r_temp); - tcg_temp_free(r_temp); + gen_movl_reg_TN(rd + 1, cpu_tmp0); + r_low = tcg_temp_new(TCG_TYPE_I32); + tcg_gen_trunc_tl_i32(r_low, cpu_tmp0); + tcg_gen_trunc_tl_i32(cpu_tmp32, hi); + tcg_gen_concat_i32_i64(cpu_tmp64, r_low, cpu_tmp32); + tcg_temp_free(r_low); r_asi = gen_get_asi(insn, addr); r_size = tcg_const_i32(8); tcg_gen_helper_0_4(helper_st_asi, addr, cpu_tmp64, r_asi, r_size); @@ -1817,12 +1818,14 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) { - TCGv r_temp, r_asi, r_size; + TCGv r_low, r_asi, r_size; - r_temp = tcg_temp_new(TCG_TYPE_TL); - gen_movl_reg_TN(rd + 1, r_temp); - tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, hi, r_temp); - tcg_temp_free(r_temp); + gen_movl_reg_TN(rd + 1, cpu_tmp0); + r_low = tcg_temp_new(TCG_TYPE_I32); + tcg_gen_trunc_tl_i32(r_low, cpu_tmp0); + tcg_gen_trunc_tl_i32(cpu_tmp32, hi); + tcg_gen_concat_i32_i64(cpu_tmp64, r_low, cpu_tmp32); + tcg_temp_free(r_low); r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26)); r_size = tcg_const_i32(8); tcg_gen_helper_0_4(helper_st_asi, addr, cpu_tmp64, r_asi, r_size); @@ -4482,10 +4485,11 @@ tcg_gen_helper_0_2(helper_check_align, cpu_addr, r_const); // XXX remove tcg_temp_free(r_const); - r_low = tcg_temp_new(TCG_TYPE_TL); - gen_movl_reg_TN(rd + 1, r_low); - tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, cpu_val, - r_low); + gen_movl_reg_TN(rd + 1, cpu_tmp0); + r_low = tcg_temp_new(TCG_TYPE_I32); + tcg_gen_trunc_tl_i32(r_low, cpu_tmp0); + tcg_gen_trunc_tl_i32(cpu_tmp32, cpu_val); + tcg_gen_concat_i32_i64(cpu_tmp64, r_low, cpu_tmp32); tcg_temp_free(r_low); tcg_gen_qemu_st64(cpu_tmp64, cpu_addr, dc->mem_idx); }