Commit 8d96d20941f578e7ed3f4d8f1548116a96cd865a

Authored by blueswir1
1 parent f3f478a7

More TCG type fixes

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4589 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 8 additions and 11 deletions
target-sparc/translate.c
@@ -1648,15 +1648,14 @@ static inline void gen_stf_asi(TCGv addr, int insn, int size, int rd) @@ -1648,15 +1648,14 @@ static inline void gen_stf_asi(TCGv addr, int insn, int size, int rd)
1648 1648
1649 static inline void gen_swap_asi(TCGv dst, TCGv addr, int insn) 1649 static inline void gen_swap_asi(TCGv dst, TCGv addr, int insn)
1650 { 1650 {
1651 - TCGv r_temp, r_asi; 1651 + TCGv r_asi;
1652 1652
1653 - r_temp = tcg_temp_new(TCG_TYPE_I32);  
1654 r_asi = gen_get_asi(insn, addr); 1653 r_asi = gen_get_asi(insn, addr);
1655 - tcg_gen_helper_1_4(helper_ld_asi, r_temp, addr, r_asi, 1654 + tcg_gen_helper_1_4(helper_ld_asi, cpu_tmp64, addr, r_asi,
1656 tcg_const_i32(4), tcg_const_i32(0)); 1655 tcg_const_i32(4), tcg_const_i32(0));
1657 tcg_gen_helper_0_4(helper_st_asi, addr, dst, r_asi, 1656 tcg_gen_helper_0_4(helper_st_asi, addr, dst, r_asi,
1658 tcg_const_i32(4)); 1657 tcg_const_i32(4));
1659 - tcg_gen_extu_i32_tl(dst, r_temp); 1658 + tcg_gen_trunc_i64_tl(dst, cpu_tmp64);
1660 } 1659 }
1661 1660
1662 static inline void gen_ldda_asi(TCGv lo, TCGv hi, TCGv addr, int insn) 1661 static inline void gen_ldda_asi(TCGv lo, TCGv hi, TCGv addr, int insn)
@@ -1675,7 +1674,7 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) @@ -1675,7 +1674,7 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd)
1675 { 1674 {
1676 TCGv r_temp, r_asi; 1675 TCGv r_temp, r_asi;
1677 1676
1678 - r_temp = tcg_temp_new(TCG_TYPE_I32); 1677 + r_temp = tcg_temp_new(TCG_TYPE_TL);
1679 gen_movl_reg_TN(rd + 1, r_temp); 1678 gen_movl_reg_TN(rd + 1, r_temp);
1680 tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, hi, 1679 tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, hi,
1681 r_temp); 1680 r_temp);
@@ -1731,15 +1730,13 @@ static inline void gen_st_asi(TCGv src, TCGv addr, int insn, int size) @@ -1731,15 +1730,13 @@ static inline void gen_st_asi(TCGv src, TCGv addr, int insn, int size)
1731 static inline void gen_swap_asi(TCGv dst, TCGv addr, int insn) 1730 static inline void gen_swap_asi(TCGv dst, TCGv addr, int insn)
1732 { 1731 {
1733 int asi; 1732 int asi;
1734 - TCGv r_temp;  
1735 1733
1736 - r_temp = tcg_temp_new(TCG_TYPE_I32);  
1737 asi = GET_FIELD(insn, 19, 26); 1734 asi = GET_FIELD(insn, 19, 26);
1738 - tcg_gen_helper_1_4(helper_ld_asi, r_temp, addr, tcg_const_i32(asi), 1735 + tcg_gen_helper_1_4(helper_ld_asi, cpu_tmp64, addr, tcg_const_i32(asi),
1739 tcg_const_i32(4), tcg_const_i32(0)); 1736 tcg_const_i32(4), tcg_const_i32(0));
1740 tcg_gen_helper_0_4(helper_st_asi, addr, dst, tcg_const_i32(asi), 1737 tcg_gen_helper_0_4(helper_st_asi, addr, dst, tcg_const_i32(asi),
1741 tcg_const_i32(4)); 1738 tcg_const_i32(4));
1742 - tcg_gen_extu_i32_tl(dst, r_temp); 1739 + tcg_gen_trunc_i64_tl(dst, cpu_tmp64);
1743 } 1740 }
1744 1741
1745 static inline void gen_ldda_asi(TCGv lo, TCGv hi, TCGv addr, int insn) 1742 static inline void gen_ldda_asi(TCGv lo, TCGv hi, TCGv addr, int insn)
@@ -1759,7 +1756,7 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) @@ -1759,7 +1756,7 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd)
1759 int asi; 1756 int asi;
1760 TCGv r_temp; 1757 TCGv r_temp;
1761 1758
1762 - r_temp = tcg_temp_new(TCG_TYPE_I32); 1759 + r_temp = tcg_temp_new(TCG_TYPE_TL);
1763 gen_movl_reg_TN(rd + 1, r_temp); 1760 gen_movl_reg_TN(rd + 1, r_temp);
1764 tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, hi, r_temp); 1761 tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, hi, r_temp);
1765 asi = GET_FIELD(insn, 19, 26); 1762 asi = GET_FIELD(insn, 19, 26);
@@ -4314,7 +4311,7 @@ static void disas_sparc_insn(DisasContext * dc) @@ -4314,7 +4311,7 @@ static void disas_sparc_insn(DisasContext * dc)
4314 ABI32_MASK(cpu_addr); 4311 ABI32_MASK(cpu_addr);
4315 tcg_gen_helper_0_2(helper_check_align, cpu_addr, 4312 tcg_gen_helper_0_2(helper_check_align, cpu_addr,
4316 tcg_const_i32(7)); // XXX remove 4313 tcg_const_i32(7)); // XXX remove
4317 - r_low = tcg_temp_new(TCG_TYPE_I32); 4314 + r_low = tcg_temp_new(TCG_TYPE_TL);
4318 gen_movl_reg_TN(rd + 1, r_low); 4315 gen_movl_reg_TN(rd + 1, r_low);
4319 tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, cpu_val, 4316 tcg_gen_helper_1_2(helper_pack64, cpu_tmp64, cpu_val,
4320 r_low); 4317 r_low);