Commit c93e7817ee963d9441f6706d6f194ff02cec690f
1 parent
5578ceab
Fix wrwim masking (Luis Pureza)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5043 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
0 deletions
target-sparc/translate.c
| @@ -3451,6 +3451,9 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -3451,6 +3451,9 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 3451 | } | 3451 | } |
| 3452 | #else | 3452 | #else |
| 3453 | tcg_gen_trunc_tl_i32(cpu_tmp32, cpu_tmp0); | 3453 | tcg_gen_trunc_tl_i32(cpu_tmp32, cpu_tmp0); |
| 3454 | + if (dc->def->nwindows != 32) | ||
| 3455 | + tcg_gen_andi_tl(cpu_tmp32, cpu_tmp32, | ||
| 3456 | + (1 << dc->def->nwindows) - 1); | ||
| 3454 | tcg_gen_st_i32(cpu_tmp32, cpu_env, | 3457 | tcg_gen_st_i32(cpu_tmp32, cpu_env, |
| 3455 | offsetof(CPUSPARCState, wim)); | 3458 | offsetof(CPUSPARCState, wim)); |
| 3456 | #endif | 3459 | #endif |