Commit ab508019a15b3f5ecf3d5a8adf16ce7a7e02f9f8

Authored by blueswir1
1 parent 945ca823

Use the new concat_tl_i64 op for std and stda

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5283 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 18 deletions
target-sparc/translate.c
@@ -1715,14 +1715,10 @@ static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd) @@ -1715,14 +1715,10 @@ static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd)
1715 1715
1716 static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) 1716 static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd)
1717 { 1717 {
1718 - TCGv r_low, r_asi, r_size; 1718 + TCGv r_asi, r_size;
1719 1719
1720 gen_movl_reg_TN(rd + 1, cpu_tmp0); 1720 gen_movl_reg_TN(rd + 1, cpu_tmp0);
1721 - r_low = tcg_temp_new(TCG_TYPE_I32);  
1722 - tcg_gen_trunc_tl_i32(r_low, cpu_tmp0);  
1723 - tcg_gen_trunc_tl_i32(cpu_tmp32, hi);  
1724 - tcg_gen_concat_i32_i64(cpu_tmp64, r_low, cpu_tmp32);  
1725 - tcg_temp_free(r_low); 1721 + tcg_gen_concat_tl_i64(cpu_tmp64, cpu_tmp0, hi);
1726 r_asi = gen_get_asi(insn, addr); 1722 r_asi = gen_get_asi(insn, addr);
1727 r_size = tcg_const_i32(8); 1723 r_size = tcg_const_i32(8);
1728 tcg_gen_helper_0_4(helper_st_asi, addr, cpu_tmp64, r_asi, r_size); 1724 tcg_gen_helper_0_4(helper_st_asi, addr, cpu_tmp64, r_asi, r_size);
@@ -1818,14 +1814,10 @@ static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd) @@ -1818,14 +1814,10 @@ static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd)
1818 1814
1819 static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) 1815 static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd)
1820 { 1816 {
1821 - TCGv r_low, r_asi, r_size; 1817 + TCGv r_asi, r_size;
1822 1818
1823 gen_movl_reg_TN(rd + 1, cpu_tmp0); 1819 gen_movl_reg_TN(rd + 1, cpu_tmp0);
1824 - r_low = tcg_temp_new(TCG_TYPE_I32);  
1825 - tcg_gen_trunc_tl_i32(r_low, cpu_tmp0);  
1826 - tcg_gen_trunc_tl_i32(cpu_tmp32, hi);  
1827 - tcg_gen_concat_i32_i64(cpu_tmp64, r_low, cpu_tmp32);  
1828 - tcg_temp_free(r_low); 1820 + tcg_gen_concat_tl_i64(cpu_tmp64, cpu_tmp0, hi);
1829 r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26)); 1821 r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));
1830 r_size = tcg_const_i32(8); 1822 r_size = tcg_const_i32(8);
1831 tcg_gen_helper_0_4(helper_st_asi, addr, cpu_tmp64, r_asi, r_size); 1823 tcg_gen_helper_0_4(helper_st_asi, addr, cpu_tmp64, r_asi, r_size);
@@ -4477,7 +4469,7 @@ static void disas_sparc_insn(DisasContext * dc) @@ -4477,7 +4469,7 @@ static void disas_sparc_insn(DisasContext * dc)
4477 if (rd & 1) 4469 if (rd & 1)
4478 goto illegal_insn; 4470 goto illegal_insn;
4479 else { 4471 else {
4480 - TCGv r_low, r_const; 4472 + TCGv r_const;
4481 4473
4482 save_state(dc, cpu_cond); 4474 save_state(dc, cpu_cond);
4483 gen_address_mask(dc, cpu_addr); 4475 gen_address_mask(dc, cpu_addr);
@@ -4486,11 +4478,7 @@ static void disas_sparc_insn(DisasContext * dc) @@ -4486,11 +4478,7 @@ static void disas_sparc_insn(DisasContext * dc)
4486 r_const); // XXX remove 4478 r_const); // XXX remove
4487 tcg_temp_free(r_const); 4479 tcg_temp_free(r_const);
4488 gen_movl_reg_TN(rd + 1, cpu_tmp0); 4480 gen_movl_reg_TN(rd + 1, cpu_tmp0);
4489 - r_low = tcg_temp_new(TCG_TYPE_I32);  
4490 - tcg_gen_trunc_tl_i32(r_low, cpu_tmp0);  
4491 - tcg_gen_trunc_tl_i32(cpu_tmp32, cpu_val);  
4492 - tcg_gen_concat_i32_i64(cpu_tmp64, r_low, cpu_tmp32);  
4493 - tcg_temp_free(r_low); 4481 + tcg_gen_concat_tl_i64(cpu_tmp64, cpu_tmp0, cpu_val);
4494 tcg_gen_qemu_st64(cpu_tmp64, cpu_addr, dc->mem_idx); 4482 tcg_gen_qemu_st64(cpu_tmp64, cpu_addr, dc->mem_idx);
4495 } 4483 }
4496 break; 4484 break;