Commit 95f9397c75fad78ccb9eb8e878035554f0e3763d
1 parent
4105de67
Fix offset handling for ASI loads and stores (Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4988 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
3 deletions
target-sparc/translate.c
| @@ -1641,13 +1641,11 @@ static inline void gen_clear_float_exceptions(void) | @@ -1641,13 +1641,11 @@ static inline void gen_clear_float_exceptions(void) | ||
| 1641 | #ifdef TARGET_SPARC64 | 1641 | #ifdef TARGET_SPARC64 |
| 1642 | static inline TCGv gen_get_asi(int insn, TCGv r_addr) | 1642 | static inline TCGv gen_get_asi(int insn, TCGv r_addr) |
| 1643 | { | 1643 | { |
| 1644 | - int asi, offset; | 1644 | + int asi; |
| 1645 | TCGv r_asi; | 1645 | TCGv r_asi; |
| 1646 | 1646 | ||
| 1647 | if (IS_IMM) { | 1647 | if (IS_IMM) { |
| 1648 | r_asi = tcg_temp_new(TCG_TYPE_I32); | 1648 | r_asi = tcg_temp_new(TCG_TYPE_I32); |
| 1649 | - offset = GET_FIELD(insn, 25, 31); | ||
| 1650 | - tcg_gen_addi_tl(r_addr, r_addr, offset); | ||
| 1651 | tcg_gen_ld_i32(r_asi, cpu_env, offsetof(CPUSPARCState, asi)); | 1649 | tcg_gen_ld_i32(r_asi, cpu_env, offsetof(CPUSPARCState, asi)); |
| 1652 | } else { | 1650 | } else { |
| 1653 | asi = GET_FIELD(insn, 19, 26); | 1651 | asi = GET_FIELD(insn, 19, 26); |