diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-06-04 17:34:54 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-06-04 17:34:54 +0000 |
commit | b6ce8f0aead41b263b28f94d9c34d824e4987be8 (patch) | |
tree | 22353a7d8bf82df6b43ad3d057f39bfbbd400b8a /target-mips | |
parent | 9575cb94930895225ec1f6538ba1f74dda0342aa (diff) |
Fix pointer calculation for MIPS64 targets.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4665 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips')
-rw-r--r-- | target-mips/translate.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c index 4327fcbc23..0baa112d68 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -740,14 +740,14 @@ static inline void gen_save_pc(target_ulong pc) { TCGv r_tmp = tcg_temp_new(TCG_TYPE_TL); TCGv r_tc_off = new_tmp(); - TCGv r_tc_off_tl = tcg_temp_new(TCG_TYPE_TL); + TCGv r_tc_off_ptr = tcg_temp_new(TCG_TYPE_PTR); TCGv r_ptr = tcg_temp_new(TCG_TYPE_PTR); tcg_gen_movi_tl(r_tmp, pc); tcg_gen_ld_i32(r_tc_off, cpu_env, offsetof(CPUState, current_tc)); tcg_gen_muli_i32(r_tc_off, r_tc_off, sizeof(target_ulong)); - tcg_gen_ext_i32_tl(r_tc_off_tl, r_tc_off); - tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_tl); + tcg_gen_ext_i32_ptr(r_tc_off_ptr, r_tc_off); + tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_ptr); tcg_gen_st_tl(r_tmp, r_ptr, offsetof(CPUState, PC)); dead_tmp(r_tc_off); } @@ -756,14 +756,14 @@ static inline void gen_breg_pc(void) { TCGv r_tmp = tcg_temp_new(TCG_TYPE_TL); TCGv r_tc_off = new_tmp(); - TCGv r_tc_off_tl = tcg_temp_new(TCG_TYPE_TL); + TCGv r_tc_off_ptr = tcg_temp_new(TCG_TYPE_PTR); TCGv r_ptr = tcg_temp_new(TCG_TYPE_PTR); tcg_gen_ld_tl(r_tmp, cpu_env, offsetof(CPUState, btarget)); tcg_gen_ld_i32(r_tc_off, cpu_env, offsetof(CPUState, current_tc)); tcg_gen_muli_i32(r_tc_off, r_tc_off, sizeof(target_ulong)); - tcg_gen_ext_i32_tl(r_tc_off_tl, r_tc_off); - tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_tl); + tcg_gen_ext_i32_ptr(r_tc_off_ptr, r_tc_off); + tcg_gen_add_ptr(r_ptr, cpu_env, r_tc_off_ptr); tcg_gen_st_tl(r_tmp, r_ptr, offsetof(CPUState, PC)); dead_tmp(r_tc_off); } |