Commit b6ce8f0aead41b263b28f94d9c34d824e4987be8
1 parent
9575cb94
Fix pointer calculation for MIPS64 targets.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4665 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
6 deletions
target-mips/translate.c
| ... | ... | @@ -740,14 +740,14 @@ static inline void gen_save_pc(target_ulong pc) |
| 740 | 740 | { |
| 741 | 741 | TCGv r_tmp = tcg_temp_new(TCG_TYPE_TL); |
| 742 | 742 | TCGv r_tc_off = new_tmp(); |
| 743 | - TCGv r_tc_off_tl = tcg_temp_new(TCG_TYPE_TL); | |
| 743 | + TCGv r_tc_off_ptr = tcg_temp_new(TCG_TYPE_PTR); | |
| 744 | 744 | TCGv r_ptr = tcg_temp_new(TCG_TYPE_PTR); |
| 745 | 745 | |
| 746 | 746 | tcg_gen_movi_tl(r_tmp, pc); |
| 747 | 747 | tcg_gen_ld_i32(r_tc_off, cpu_env, offsetof(CPUState, current_tc)); |
| 748 | 748 | tcg_gen_muli_i32(r_tc_off, r_tc_off, sizeof(target_ulong)); |
| 749 | - tcg_gen_ext_i32_tl(r_tc_off_tl, r_tc_off); | |
| 750 | - tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_tl); | |
| 749 | + tcg_gen_ext_i32_ptr(r_tc_off_ptr, r_tc_off); | |
| 750 | + tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_ptr); | |
| 751 | 751 | tcg_gen_st_tl(r_tmp, r_ptr, offsetof(CPUState, PC)); |
| 752 | 752 | dead_tmp(r_tc_off); |
| 753 | 753 | } |
| ... | ... | @@ -756,14 +756,14 @@ static inline void gen_breg_pc(void) |
| 756 | 756 | { |
| 757 | 757 | TCGv r_tmp = tcg_temp_new(TCG_TYPE_TL); |
| 758 | 758 | TCGv r_tc_off = new_tmp(); |
| 759 | - TCGv r_tc_off_tl = tcg_temp_new(TCG_TYPE_TL); | |
| 759 | + TCGv r_tc_off_ptr = tcg_temp_new(TCG_TYPE_PTR); | |
| 760 | 760 | TCGv r_ptr = tcg_temp_new(TCG_TYPE_PTR); |
| 761 | 761 | |
| 762 | 762 | tcg_gen_ld_tl(r_tmp, cpu_env, offsetof(CPUState, btarget)); |
| 763 | 763 | tcg_gen_ld_i32(r_tc_off, cpu_env, offsetof(CPUState, current_tc)); |
| 764 | 764 | tcg_gen_muli_i32(r_tc_off, r_tc_off, sizeof(target_ulong)); |
| 765 | - tcg_gen_ext_i32_tl(r_tc_off_tl, r_tc_off); | |
| 766 | - tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_tl); | |
| 765 | + tcg_gen_ext_i32_ptr(r_tc_off_ptr, r_tc_off); | |
| 766 | + tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_ptr); | |
| 767 | 767 | tcg_gen_st_tl(r_tmp, r_ptr, offsetof(CPUState, PC)); |
| 768 | 768 | dead_tmp(r_tc_off); |
| 769 | 769 | } | ... | ... |